@react-spring/core
Advanced tools
Comparing version 9.0.0-canary.808.1.ae166ee to 9.0.0-canary.808.2.958e7ba
@@ -214,3 +214,2 @@ import { RefObject, ReactNode } from 'react'; | ||
*/ | ||
w0: number; | ||
/** | ||
@@ -316,8 +315,7 @@ * Partially overwrite the existing config. | ||
/** Events sent to children of `FrameValue` objects */ | ||
export type Event<T = any> = { | ||
type Event<T = any> = { | ||
parent: FrameValue<T>; | ||
} & (ChangeEvent<T> | PriorityEvent | ResetEvent<T> | StartEvent); | ||
/** An object that handles `FrameValue` events */ | ||
export type Observer<T = any> = FluidObserver<Event<T>>; | ||
export {}; | ||
type Observer<T = any> = FluidObserver<Event<T>>; | ||
} | ||
@@ -324,0 +322,0 @@ |
29
index.js
@@ -477,10 +477,12 @@ import { useIsomorphicLayoutEffect, each, is, toArray, FluidValue, getFluidConfig, isAnimatedString, isEqual, noop, usePrev, useOnce, useForceUpdate, createInterpolator, Globals } from '@react-spring/shared'; | ||
this.round = none; | ||
/** | ||
* @internal | ||
* The angular frequency in rad/ms | ||
*/ | ||
} | ||
/* might be reintroduced later */ | ||
this.w0 = 0; | ||
} | ||
/** | ||
* @internal | ||
* The angular frequency in rad/ms | ||
*/ | ||
// w0 = 0 | ||
/** | ||
* Partially overwrite the existing config. | ||
@@ -500,6 +502,7 @@ */ | ||
this.friction = damping * Math.sqrt(this.tension * mass) / 0.5; | ||
} // Cache the angular frequency in rad/ms | ||
} | ||
/* might be reintroduced later */ | ||
// Cache the angular frequency in rad/ms | ||
// this.w0 = Math.sqrt(this.tension / mass) / 1000 | ||
this.w0 = Math.sqrt(this.tension / mass) / 1000; | ||
} | ||
@@ -723,3 +726,3 @@ | ||
if (anim.immediate) { | ||
node.done = canFinish; | ||
node.done = canFinish || (idle = false); | ||
@@ -784,4 +787,6 @@ if (node.setValue(to)) { | ||
let isBouncing = false; | ||
const step = 0.05 / config.w0; | ||
let isBouncing = false; //const step = 0.05 / config.w0 | ||
const step = 1; // 1ms | ||
const numSteps = Math.ceil(dt / step); | ||
@@ -788,0 +793,0 @@ |
{ | ||
"name": "@react-spring/core", | ||
"version": "9.0.0-canary.808.1.ae166ee", | ||
"version": "9.0.0-canary.808.2.958e7ba", | ||
"description": "Cross-platform animation engine for React", | ||
@@ -34,4 +34,4 @@ "keywords": [ | ||
"@babel/runtime": "^7.3.1", | ||
"animated": "link:../animated", | ||
"shared": "link:../shared", | ||
"animated": "9.0.0-canary.808.2.958e7ba", | ||
"shared": "9.0.0-canary.808.2.958e7ba", | ||
"use-memo-one": "^1.1.0" | ||
@@ -38,0 +38,0 @@ }, |
@@ -156,2 +156,3 @@ import { AnimatedValue } from 'animated' | ||
/* might be reintroduced later */ | ||
/** | ||
@@ -161,3 +162,3 @@ * @internal | ||
*/ | ||
w0 = 0 | ||
// w0 = 0 | ||
@@ -176,5 +177,6 @@ /** | ||
/* might be reintroduced later */ | ||
// Cache the angular frequency in rad/ms | ||
this.w0 = Math.sqrt(this.tension / mass) / 1000 | ||
// this.w0 = Math.sqrt(this.tension / mass) / 1000 | ||
} | ||
} |
@@ -141,3 +141,3 @@ import { each, InterpolatorArgs, FluidValue, FluidObserver } from '@react-spring/shared' | ||
export namespace FrameValue { | ||
export declare namespace FrameValue { | ||
/** A parent changed its value */ | ||
@@ -144,0 +144,0 @@ interface ChangeEvent<T = any> { |
@@ -130,3 +130,3 @@ import { | ||
if (anim.immediate) { | ||
node.done = canFinish | ||
node.done = canFinish || (idle = false) | ||
if (node.setValue(to)) { | ||
@@ -210,3 +210,4 @@ changed = true | ||
const step = 0.05 / config.w0 | ||
//const step = 0.05 / config.w0 | ||
const step = 1 // 1ms | ||
const numSteps = Math.ceil(dt / step) | ||
@@ -213,0 +214,0 @@ for (let n = 0; n < numSteps; ++n) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 2 instances in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
353664
7699
1
0