physics-animator 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/Animator.d.ts +9 -8
- package/package.json +1 -1
package/dist/types/Animator.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { EventSignal } from "@haxiomic/event-signal";
|
|
|
2
2
|
import { IFieldAnimator } from "./animators/IFieldAnimator.js";
|
|
3
3
|
import { SpringParameters } from "./animators/SpringAnimator.js";
|
|
4
4
|
import { EasingStepFn } from "./animators/TweenAnimator.js";
|
|
5
|
+
type Public<T> = Pick<T, keyof T>;
|
|
5
6
|
/**
|
|
6
7
|
* Physically based animation of numeric properties of objects
|
|
7
8
|
*
|
|
@@ -44,14 +45,14 @@ export declare class Animator {
|
|
|
44
45
|
protected beforeChange: EventSignal<void, void>;
|
|
45
46
|
protected afterChange: EventSignal<void, void>;
|
|
46
47
|
constructor(onBeforeStep?: (dt_s: number) => void, onAfterStep?: (dt_s: number) => void);
|
|
47
|
-
setTo<Obj
|
|
48
|
-
animateTo<Obj
|
|
49
|
-
springTo<Obj
|
|
50
|
-
customTweenTo<Obj
|
|
51
|
-
linearTo<Obj
|
|
52
|
-
easeInOutTo<Obj
|
|
53
|
-
easeInTo<Obj
|
|
54
|
-
easeOutTo<Obj
|
|
48
|
+
setTo<Obj>(object: Obj, target: Partial<Public<Obj>>): void;
|
|
49
|
+
animateTo<Obj, Parameters, State, FieldType>(object: Obj, target: Partial<Public<Obj>>, animator?: IFieldAnimator<Parameters, State, FieldType>, params?: Parameters | null): void;
|
|
50
|
+
springTo<Obj>(object: Obj, target: Partial<Public<Obj>>, params: SpringParameters | null): void;
|
|
51
|
+
customTweenTo<Obj>(object: Obj, target: Partial<Public<Obj>>, duration_s: number, easingFn: EasingStepFn): void;
|
|
52
|
+
linearTo<Obj>(object: Obj, target: Partial<Public<Obj>>, duration_s: number): void;
|
|
53
|
+
easeInOutTo<Obj>(object: Obj, target: Partial<Public<Obj>>, duration_s: number): void;
|
|
54
|
+
easeInTo<Obj>(object: Obj, target: Partial<Public<Obj>>, duration_s: number): void;
|
|
55
|
+
easeOutTo<Obj>(object: Obj, target: Partial<Public<Obj>>, duration_s: number): void;
|
|
55
56
|
onCompleteField<Obj, Name extends keyof Obj>(object: Obj, field: Name, callback: (object: Obj, field: Name) => void, once?: 'once'): {
|
|
56
57
|
priority: number;
|
|
57
58
|
listener: (event: {
|
package/package.json
CHANGED