samcan 0.0.2 → 0.1.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/{license → LICENSE} +3 -1
- package/README.md +3 -0
- package/dist/camera/index.cjs +370 -0
- package/dist/camera/index.d.cts +54 -0
- package/dist/camera/index.d.ts +54 -0
- package/dist/camera/index.js +70 -0
- package/dist/document/index.cjs +735 -0
- package/dist/document/index.d.cts +174 -0
- package/dist/document/index.d.ts +174 -0
- package/dist/document/index.js +161 -0
- package/dist/editor/index.cjs +5007 -0
- package/dist/editor/index.d.cts +374 -0
- package/dist/editor/index.d.ts +374 -0
- package/dist/editor/index.js +2401 -0
- package/dist/engine/index.cjs +3752 -0
- package/dist/engine/index.d.cts +183 -0
- package/dist/engine/index.d.ts +183 -0
- package/dist/engine/index.js +111 -0
- package/dist/index.cjs +8899 -0
- package/dist/index.d.cts +962 -0
- package/dist/index.d.ts +962 -46
- package/dist/index.js +1008 -49
- package/dist/math/index.cjs +2230 -0
- package/dist/math/index.d.cts +302 -0
- package/dist/math/index.d.ts +302 -0
- package/dist/math/index.js +1109 -0
- package/dist/renderer/index.cjs +1865 -0
- package/dist/renderer/index.d.cts +91 -0
- package/dist/renderer/index.d.ts +91 -0
- package/dist/renderer/index.js +89 -0
- package/dist/shared/chunk-35pkr0zs.js +110 -0
- package/dist/shared/chunk-7sr7q84y.js +80 -0
- package/dist/shared/chunk-87399bz7.js +89 -0
- package/dist/shared/chunk-8ynnz57m.js +129 -0
- package/dist/shared/chunk-d6gxvapt.js +500 -0
- package/dist/shared/chunk-hewznwbd.js +305 -0
- package/dist/shared/chunk-jdvrd5tv.js +623 -0
- package/dist/shared/chunk-rvag1j46.js +461 -0
- package/dist/shared/chunk-rzxyjwk8.js +397 -0
- package/dist/shared/chunk-s3qdcmcq.js +1392 -0
- package/dist/shared/chunk-v53jprrn.js +68 -0
- package/dist/shared/chunk-wa3772hp.js +117 -0
- package/dist/spatial/index.cjs +954 -0
- package/dist/spatial/index.d.cts +136 -0
- package/dist/spatial/index.d.ts +136 -0
- package/dist/spatial/index.js +301 -0
- package/dist/stroke/index.cjs +1010 -0
- package/dist/stroke/index.d.cts +143 -0
- package/dist/stroke/index.d.ts +143 -0
- package/dist/stroke/index.js +343 -0
- package/package.json +122 -58
- package/dist/bundle.js +0 -5888
- package/dist/core/animation/animationruntime.d.ts +0 -238
- package/dist/core/animation/animationruntime.d.ts.map +0 -1
- package/dist/core/animation/animationruntime.js +0 -530
- package/dist/core/animation/animationruntime.js.map +0 -1
- package/dist/core/animation/animationstate.d.ts +0 -85
- package/dist/core/animation/animationstate.d.ts.map +0 -1
- package/dist/core/animation/animationstate.js +0 -119
- package/dist/core/animation/animationstate.js.map +0 -1
- package/dist/core/animation/animationtrack.d.ts +0 -55
- package/dist/core/animation/animationtrack.d.ts.map +0 -1
- package/dist/core/animation/animationtrack.js +0 -185
- package/dist/core/animation/animationtrack.js.map +0 -1
- package/dist/core/animation/easing.d.ts +0 -80
- package/dist/core/animation/easing.d.ts.map +0 -1
- package/dist/core/animation/easing.js +0 -126
- package/dist/core/animation/easing.js.map +0 -1
- package/dist/core/animation/index.d.ts +0 -11
- package/dist/core/animation/index.d.ts.map +0 -1
- package/dist/core/animation/index.js +0 -10
- package/dist/core/animation/index.js.map +0 -1
- package/dist/core/animation/interpolator.d.ts +0 -82
- package/dist/core/animation/interpolator.d.ts.map +0 -1
- package/dist/core/animation/interpolator.js +0 -108
- package/dist/core/animation/interpolator.js.map +0 -1
- package/dist/core/animation/keyframe.d.ts +0 -52
- package/dist/core/animation/keyframe.d.ts.map +0 -1
- package/dist/core/animation/keyframe.js +0 -65
- package/dist/core/animation/keyframe.js.map +0 -1
- package/dist/core/animation/logger.d.ts +0 -8
- package/dist/core/animation/logger.d.ts.map +0 -1
- package/dist/core/animation/logger.js +0 -20
- package/dist/core/animation/logger.js.map +0 -1
- package/dist/core/animation/statemachine.d.ts +0 -178
- package/dist/core/animation/statemachine.d.ts.map +0 -1
- package/dist/core/animation/statemachine.js +0 -378
- package/dist/core/animation/statemachine.js.map +0 -1
- package/dist/core/animation/statetransition.d.ts +0 -142
- package/dist/core/animation/statetransition.d.ts.map +0 -1
- package/dist/core/animation/statetransition.js +0 -189
- package/dist/core/animation/statetransition.js.map +0 -1
- package/dist/core/animation/timeline.d.ts +0 -62
- package/dist/core/animation/timeline.d.ts.map +0 -1
- package/dist/core/animation/timeline.js +0 -102
- package/dist/core/animation/timeline.js.map +0 -1
- package/dist/core/api.d.ts +0 -245
- package/dist/core/api.d.ts.map +0 -1
- package/dist/core/api.js +0 -369
- package/dist/core/api.js.map +0 -1
- package/dist/core/asset/assetmanager.d.ts +0 -196
- package/dist/core/asset/assetmanager.d.ts.map +0 -1
- package/dist/core/asset/assetmanager.js +0 -502
- package/dist/core/asset/assetmanager.js.map +0 -1
- package/dist/core/asset/index.d.ts +0 -3
- package/dist/core/asset/index.d.ts.map +0 -1
- package/dist/core/asset/index.js +0 -3
- package/dist/core/asset/index.js.map +0 -1
- package/dist/core/asset/types.d.ts +0 -36
- package/dist/core/asset/types.d.ts.map +0 -1
- package/dist/core/asset/types.js +0 -1
- package/dist/core/asset/types.js.map +0 -1
- package/dist/core/command/basecommand.d.ts +0 -29
- package/dist/core/command/basecommand.d.ts.map +0 -1
- package/dist/core/command/basecommand.js +0 -36
- package/dist/core/command/basecommand.js.map +0 -1
- package/dist/core/command/command.d.ts +0 -55
- package/dist/core/command/command.d.ts.map +0 -1
- package/dist/core/command/command.js +0 -1
- package/dist/core/command/command.js.map +0 -1
- package/dist/core/command/commandhistory.d.ts +0 -76
- package/dist/core/command/commandhistory.d.ts.map +0 -1
- package/dist/core/command/commandhistory.js +0 -122
- package/dist/core/command/commandhistory.js.map +0 -1
- package/dist/core/command/editorcommands.d.ts +0 -108
- package/dist/core/command/editorcommands.d.ts.map +0 -1
- package/dist/core/command/editorcommands.js +0 -274
- package/dist/core/command/editorcommands.js.map +0 -1
- package/dist/core/command/index.d.ts +0 -5
- package/dist/core/command/index.d.ts.map +0 -1
- package/dist/core/command/index.js +0 -5
- package/dist/core/command/index.js.map +0 -1
- package/dist/core/editor/events/emitter.d.ts +0 -45
- package/dist/core/editor/events/emitter.d.ts.map +0 -1
- package/dist/core/editor/events/emitter.js +0 -88
- package/dist/core/editor/events/emitter.js.map +0 -1
- package/dist/core/error/animationerror.d.ts +0 -27
- package/dist/core/error/animationerror.d.ts.map +0 -1
- package/dist/core/error/animationerror.js +0 -41
- package/dist/core/error/animationerror.js.map +0 -1
- package/dist/core/error/asseterror.d.ts +0 -32
- package/dist/core/error/asseterror.d.ts.map +0 -1
- package/dist/core/error/asseterror.js +0 -48
- package/dist/core/error/asseterror.js.map +0 -1
- package/dist/core/error/index.d.ts +0 -7
- package/dist/core/error/index.d.ts.map +0 -1
- package/dist/core/error/index.js +0 -7
- package/dist/core/error/index.js.map +0 -1
- package/dist/core/error/pluginerror.d.ts +0 -22
- package/dist/core/error/pluginerror.d.ts.map +0 -1
- package/dist/core/error/pluginerror.js +0 -33
- package/dist/core/error/pluginerror.js.map +0 -1
- package/dist/core/error/renderererror.d.ts +0 -26
- package/dist/core/error/renderererror.d.ts.map +0 -1
- package/dist/core/error/renderererror.js +0 -40
- package/dist/core/error/renderererror.js.map +0 -1
- package/dist/core/error/samcanerror.d.ts +0 -72
- package/dist/core/error/samcanerror.d.ts.map +0 -1
- package/dist/core/error/samcanerror.js +0 -108
- package/dist/core/error/samcanerror.js.map +0 -1
- package/dist/core/error/serializationerror.d.ts +0 -31
- package/dist/core/error/serializationerror.d.ts.map +0 -1
- package/dist/core/error/serializationerror.js +0 -46
- package/dist/core/error/serializationerror.js.map +0 -1
- package/dist/core/index.d.ts +0 -12
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -12
- package/dist/core/index.js.map +0 -1
- package/dist/core/math/color.d.ts +0 -56
- package/dist/core/math/color.d.ts.map +0 -1
- package/dist/core/math/color.js +0 -125
- package/dist/core/math/color.js.map +0 -1
- package/dist/core/math/index.d.ts +0 -14
- package/dist/core/math/index.d.ts.map +0 -1
- package/dist/core/math/index.js +0 -14
- package/dist/core/math/index.js.map +0 -1
- package/dist/core/math/matrix.d.ts +0 -101
- package/dist/core/math/matrix.d.ts.map +0 -1
- package/dist/core/math/matrix.js +0 -177
- package/dist/core/math/matrix.js.map +0 -1
- package/dist/core/math/paint.d.ts +0 -104
- package/dist/core/math/paint.d.ts.map +0 -1
- package/dist/core/math/paint.js +0 -204
- package/dist/core/math/paint.js.map +0 -1
- package/dist/core/math/path/index.d.ts +0 -94
- package/dist/core/math/path/index.d.ts.map +0 -1
- package/dist/core/math/path/index.js +0 -180
- package/dist/core/math/path/index.js.map +0 -1
- package/dist/core/math/path/operations.d.ts +0 -38
- package/dist/core/math/path/operations.d.ts.map +0 -1
- package/dist/core/math/path/operations.js +0 -149
- package/dist/core/math/path/operations.js.map +0 -1
- package/dist/core/math/pool.d.ts +0 -54
- package/dist/core/math/pool.d.ts.map +0 -1
- package/dist/core/math/pool.js +0 -97
- package/dist/core/math/pool.js.map +0 -1
- package/dist/core/math/pools.d.ts +0 -29
- package/dist/core/math/pools.d.ts.map +0 -1
- package/dist/core/math/pools.js +0 -50
- package/dist/core/math/pools.js.map +0 -1
- package/dist/core/math/rectangle.d.ts +0 -68
- package/dist/core/math/rectangle.d.ts.map +0 -1
- package/dist/core/math/rectangle.js +0 -124
- package/dist/core/math/rectangle.js.map +0 -1
- package/dist/core/math/utils.d.ts +0 -68
- package/dist/core/math/utils.d.ts.map +0 -1
- package/dist/core/math/utils.js +0 -110
- package/dist/core/math/utils.js.map +0 -1
- package/dist/core/math/vector2.d.ts +0 -85
- package/dist/core/math/vector2.d.ts.map +0 -1
- package/dist/core/math/vector2.js +0 -134
- package/dist/core/math/vector2.js.map +0 -1
- package/dist/core/plugin/animationcontroller.d.ts +0 -43
- package/dist/core/plugin/animationcontroller.d.ts.map +0 -1
- package/dist/core/plugin/animationcontroller.js +0 -11
- package/dist/core/plugin/animationcontroller.js.map +0 -1
- package/dist/core/plugin/index.d.ts +0 -6
- package/dist/core/plugin/index.d.ts.map +0 -1
- package/dist/core/plugin/index.js +0 -4
- package/dist/core/plugin/index.js.map +0 -1
- package/dist/core/plugin/plugin.d.ts +0 -53
- package/dist/core/plugin/plugin.d.ts.map +0 -1
- package/dist/core/plugin/plugin.js +0 -29
- package/dist/core/plugin/plugin.js.map +0 -1
- package/dist/core/plugin/pluginregistry.d.ts +0 -71
- package/dist/core/plugin/pluginregistry.d.ts.map +0 -1
- package/dist/core/plugin/pluginregistry.js +0 -143
- package/dist/core/plugin/pluginregistry.js.map +0 -1
- package/dist/core/renderer/batchmanager.d.ts +0 -68
- package/dist/core/renderer/batchmanager.d.ts.map +0 -1
- package/dist/core/renderer/batchmanager.js +0 -82
- package/dist/core/renderer/batchmanager.js.map +0 -1
- package/dist/core/renderer/canvas2drenderer.d.ts +0 -139
- package/dist/core/renderer/canvas2drenderer.d.ts.map +0 -1
- package/dist/core/renderer/canvas2drenderer.js +0 -499
- package/dist/core/renderer/canvas2drenderer.js.map +0 -1
- package/dist/core/renderer/dirtyregionmanager.d.ts +0 -54
- package/dist/core/renderer/dirtyregionmanager.d.ts.map +0 -1
- package/dist/core/renderer/dirtyregionmanager.js +0 -129
- package/dist/core/renderer/dirtyregionmanager.js.map +0 -1
- package/dist/core/renderer/index.d.ts +0 -8
- package/dist/core/renderer/index.d.ts.map +0 -1
- package/dist/core/renderer/index.js +0 -6
- package/dist/core/renderer/index.js.map +0 -1
- package/dist/core/renderer/renderer.d.ts +0 -154
- package/dist/core/renderer/renderer.d.ts.map +0 -1
- package/dist/core/renderer/renderer.js +0 -1
- package/dist/core/renderer/renderer.js.map +0 -1
- package/dist/core/renderer/rendererfactory.d.ts +0 -66
- package/dist/core/renderer/rendererfactory.d.ts.map +0 -1
- package/dist/core/renderer/rendererfactory.js +0 -219
- package/dist/core/renderer/rendererfactory.js.map +0 -1
- package/dist/core/renderer/webglrenderer.d.ts +0 -185
- package/dist/core/renderer/webglrenderer.d.ts.map +0 -1
- package/dist/core/renderer/webglrenderer.js +0 -1007
- package/dist/core/renderer/webglrenderer.js.map +0 -1
- package/dist/core/scene/index.d.ts +0 -4
- package/dist/core/scene/index.d.ts.map +0 -1
- package/dist/core/scene/index.js +0 -4
- package/dist/core/scene/index.js.map +0 -1
- package/dist/core/scene/node.d.ts +0 -162
- package/dist/core/scene/node.d.ts.map +0 -1
- package/dist/core/scene/node.js +0 -402
- package/dist/core/scene/node.js.map +0 -1
- package/dist/core/scene/nodes/artboard.d.ts +0 -42
- package/dist/core/scene/nodes/artboard.d.ts.map +0 -1
- package/dist/core/scene/nodes/artboard.js +0 -64
- package/dist/core/scene/nodes/artboard.js.map +0 -1
- package/dist/core/scene/nodes/groupnode.d.ts +0 -10
- package/dist/core/scene/nodes/groupnode.d.ts.map +0 -1
- package/dist/core/scene/nodes/groupnode.js +0 -12
- package/dist/core/scene/nodes/groupnode.js.map +0 -1
- package/dist/core/scene/nodes/imagenode.d.ts +0 -38
- package/dist/core/scene/nodes/imagenode.d.ts.map +0 -1
- package/dist/core/scene/nodes/imagenode.js +0 -77
- package/dist/core/scene/nodes/imagenode.js.map +0 -1
- package/dist/core/scene/nodes/index.d.ts +0 -5
- package/dist/core/scene/nodes/index.d.ts.map +0 -1
- package/dist/core/scene/nodes/index.js +0 -5
- package/dist/core/scene/nodes/index.js.map +0 -1
- package/dist/core/scene/nodes/shapenode.d.ts +0 -76
- package/dist/core/scene/nodes/shapenode.d.ts.map +0 -1
- package/dist/core/scene/nodes/shapenode.js +0 -212
- package/dist/core/scene/nodes/shapenode.js.map +0 -1
- package/dist/core/scene/transform.d.ts +0 -27
- package/dist/core/scene/transform.d.ts.map +0 -1
- package/dist/core/scene/transform.js +0 -52
- package/dist/core/scene/transform.js.map +0 -1
- package/dist/core/serialization/index.d.ts +0 -3
- package/dist/core/serialization/index.d.ts.map +0 -1
- package/dist/core/serialization/index.js +0 -2
- package/dist/core/serialization/index.js.map +0 -1
- package/dist/core/serialization/serializer.d.ts +0 -323
- package/dist/core/serialization/serializer.d.ts.map +0 -1
- package/dist/core/serialization/serializer.js +0 -1173
- package/dist/core/serialization/serializer.js.map +0 -1
- package/dist/core/serialization/types.d.ts +0 -242
- package/dist/core/serialization/types.d.ts.map +0 -1
- package/dist/core/serialization/types.js +0 -1
- package/dist/core/serialization/types.js.map +0 -1
- package/dist/core/timing/clock.d.ts +0 -43
- package/dist/core/timing/clock.d.ts.map +0 -1
- package/dist/core/timing/clock.js +0 -78
- package/dist/core/timing/clock.js.map +0 -1
- package/dist/core/timing/index.d.ts +0 -3
- package/dist/core/timing/index.d.ts.map +0 -1
- package/dist/core/timing/index.js +0 -3
- package/dist/core/timing/index.js.map +0 -1
- package/dist/core/timing/scheduler.d.ts +0 -72
- package/dist/core/timing/scheduler.d.ts.map +0 -1
- package/dist/core/timing/scheduler.js +0 -163
- package/dist/core/timing/scheduler.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/wrapper/react/index.d.ts +0 -5
- package/dist/wrapper/react/index.d.ts.map +0 -1
- package/dist/wrapper/react/index.js +0 -3
- package/dist/wrapper/react/index.js.map +0 -1
- package/dist/wrapper/react/samcan-player.d.ts +0 -26
- package/dist/wrapper/react/samcan-player.d.ts.map +0 -1
- package/dist/wrapper/react/samcan-player.js +0 -19
- package/dist/wrapper/react/samcan-player.js.map +0 -1
- package/dist/wrapper/react/use-samcan-player.d.ts +0 -33
- package/dist/wrapper/react/use-samcan-player.d.ts.map +0 -1
- package/dist/wrapper/react/use-samcan-player.js +0 -65
- package/dist/wrapper/react/use-samcan-player.js.map +0 -1
- package/readme.md +0 -96
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { Timeline } from "./timeline";
|
|
2
|
-
/**
|
|
3
|
-
* AnimationState represents a named animation state with its own timeline
|
|
4
|
-
* States can be managed by a StateMachine for interactive animations
|
|
5
|
-
*
|
|
6
|
-
*/
|
|
7
|
-
export class AnimationState {
|
|
8
|
-
_id;
|
|
9
|
-
_name;
|
|
10
|
-
_timeline;
|
|
11
|
-
_speed;
|
|
12
|
-
_loop;
|
|
13
|
-
_active = false;
|
|
14
|
-
/**
|
|
15
|
-
* Create a new animation state
|
|
16
|
-
* @param id Unique identifier for the state
|
|
17
|
-
* @param name Human-readable name for the state
|
|
18
|
-
* @param timeline The timeline containing the animation data
|
|
19
|
-
* @param speed Playback speed multiplier (default: 1.0)
|
|
20
|
-
* @param loop Whether the state should loop (default: false)
|
|
21
|
-
*/
|
|
22
|
-
constructor(id, name, timeline, speed = 1.0, loop = false) {
|
|
23
|
-
this._id = id;
|
|
24
|
-
this._name = name;
|
|
25
|
-
this._timeline = timeline;
|
|
26
|
-
this._speed = speed;
|
|
27
|
-
this._loop = loop;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Get the unique identifier for this state
|
|
31
|
-
*/
|
|
32
|
-
get id() {
|
|
33
|
-
return this._id;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Get the human-readable name of this state
|
|
37
|
-
*/
|
|
38
|
-
get name() {
|
|
39
|
-
return this._name;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Set the human-readable name of this state
|
|
43
|
-
*/
|
|
44
|
-
set name(value) {
|
|
45
|
-
this._name = value;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Get the timeline associated with this state
|
|
49
|
-
*/
|
|
50
|
-
get timeline() {
|
|
51
|
-
return this._timeline;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Set the timeline associated with this state
|
|
55
|
-
*/
|
|
56
|
-
set timeline(value) {
|
|
57
|
-
this._timeline = value;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Get the playback speed multiplier
|
|
61
|
-
* Values > 1.0 speed up playback, values < 1.0 slow it down
|
|
62
|
-
*/
|
|
63
|
-
get speed() {
|
|
64
|
-
return this._speed;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Set the playback speed multiplier
|
|
68
|
-
* Values > 1.0 speed up playback, values < 1.0 slow it down
|
|
69
|
-
*/
|
|
70
|
-
set speed(value) {
|
|
71
|
-
this._speed = Math.max(0.1, Math.min(10.0, value));
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Get whether this state loops
|
|
75
|
-
*/
|
|
76
|
-
get loop() {
|
|
77
|
-
return this._loop;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Set whether this state loops
|
|
81
|
-
*/
|
|
82
|
-
set loop(value) {
|
|
83
|
-
this._loop = value;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Get whether this state is currently active
|
|
87
|
-
*/
|
|
88
|
-
get active() {
|
|
89
|
-
return this._active;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Activate this state
|
|
93
|
-
* Called by the state machine when transitioning to this state
|
|
94
|
-
*/
|
|
95
|
-
activate() {
|
|
96
|
-
this._active = true;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Deactivate this state
|
|
100
|
-
* Called by the state machine when transitioning away from this state
|
|
101
|
-
*/
|
|
102
|
-
deactivate() {
|
|
103
|
-
this._active = false;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Get the duration of this state's timeline in seconds
|
|
107
|
-
*/
|
|
108
|
-
get duration() {
|
|
109
|
-
return this._timeline.duration;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Evaluate the state's timeline at the given time
|
|
113
|
-
* @param time The time in seconds to evaluate at
|
|
114
|
-
*/
|
|
115
|
-
evaluate(time) {
|
|
116
|
-
this._timeline.evaluate(time);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
//# sourceMappingURL=animationstate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"animationstate.js","sourceRoot":"","sources":["../../../core/animation/animationstate.ts"],"names":[],"m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I,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAA;IACrB,CAAC;IAED;;OAEG;IACH,IAAI,IAAI,CAAC,KAAc;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACtB,CAAC;IAED;;OAEG;IACH,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAA;IACvB,CAAC;IAED;;;OAGG;IACH,QAAQ;QACJ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;IACvB,CAAC;IAED;;;OAGG;IACH,UAAU;QACN,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;IACxB,CAAC;IAED;;OAEG;IACH,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAA;IAClC,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,IAAY;QACjB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;CACJ"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { SceneNode } from "../scene/node";
|
|
2
|
-
import { Keyframe } from "./keyframe";
|
|
3
|
-
/**
|
|
4
|
-
* Represents an animation track that animates a specific property of a SceneNode
|
|
5
|
-
* Manages keyframes and evaluates interpolated values at given times
|
|
6
|
-
*/
|
|
7
|
-
export declare class AnimationTrack {
|
|
8
|
-
private _target;
|
|
9
|
-
private _property;
|
|
10
|
-
private _keyframes;
|
|
11
|
-
constructor(target: SceneNode, property: string);
|
|
12
|
-
/**
|
|
13
|
-
* Get the target node being animated
|
|
14
|
-
*/
|
|
15
|
-
get target(): SceneNode;
|
|
16
|
-
/**
|
|
17
|
-
* Get the property path being animated (e.g., 'opacity', 'transform.position.x')
|
|
18
|
-
*/
|
|
19
|
-
get property(): string;
|
|
20
|
-
/**
|
|
21
|
-
* Get all keyframes in this track
|
|
22
|
-
*/
|
|
23
|
-
get keyframes(): ReadonlyArray<Keyframe>;
|
|
24
|
-
/**
|
|
25
|
-
* Add a keyframe to this track
|
|
26
|
-
* Keyframes are automatically sorted by time
|
|
27
|
-
*/
|
|
28
|
-
addKeyframe(keyframe: Keyframe): void;
|
|
29
|
-
/**
|
|
30
|
-
* Remove a keyframe from this track
|
|
31
|
-
*/
|
|
32
|
-
removeKeyframe(keyframe: Keyframe): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Evaluate the track at a given time and apply the value to the target property
|
|
35
|
-
* @param time The time in seconds to evaluate at
|
|
36
|
-
*/
|
|
37
|
-
evaluate(time: number): unknown;
|
|
38
|
-
/**
|
|
39
|
-
* Linear interpolation between two values
|
|
40
|
-
*/
|
|
41
|
-
private interpolateLinear;
|
|
42
|
-
/**
|
|
43
|
-
* Cubic interpolation between two values (ease-in-out)
|
|
44
|
-
*/
|
|
45
|
-
private interpolateCubic;
|
|
46
|
-
/**
|
|
47
|
-
* Bezier interpolation between two values (smooth curve)
|
|
48
|
-
*/
|
|
49
|
-
private interpolateBezier;
|
|
50
|
-
/**
|
|
51
|
-
* Apply a value to the target property
|
|
52
|
-
*/
|
|
53
|
-
private applyValue;
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=animationtrack.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"animationtrack.d.ts","sourceRoot":"","sources":["../../../core/animation/animationtrack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC;;;GAGG;AACH,qBAAa,cAAc;IACvB,OAAO,CAAC,OAAO,CAAW;IAC1B,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,UAAU,CAAiB;gBAEvB,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM;IAK/C;;OAEG;IACH,IAAI,MAAM,IAAI,SAAS,CAEtB;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,aAAa,CAAC,QAAQ,CAAC,CAEvC;IAED;;;OAGG;IACH,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAMrC;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO;IAU3C;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAmF/B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAUzB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAaxB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAYzB;;OAEG;IACH,OAAO,CAAC,UAAU;CA8BrB"}
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import { Keyframe } from "./keyframe";
|
|
2
|
-
/**
|
|
3
|
-
* Represents an animation track that animates a specific property of a SceneNode
|
|
4
|
-
* Manages keyframes and evaluates interpolated values at given times
|
|
5
|
-
*/
|
|
6
|
-
export class AnimationTrack {
|
|
7
|
-
_target;
|
|
8
|
-
_property;
|
|
9
|
-
_keyframes = [];
|
|
10
|
-
constructor(target, property) {
|
|
11
|
-
this._target = target;
|
|
12
|
-
this._property = property;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Get the target node being animated
|
|
16
|
-
*/
|
|
17
|
-
get target() {
|
|
18
|
-
return this._target;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Get the property path being animated (e.g., 'opacity', 'transform.position.x')
|
|
22
|
-
*/
|
|
23
|
-
get property() {
|
|
24
|
-
return this._property;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Get all keyframes in this track
|
|
28
|
-
*/
|
|
29
|
-
get keyframes() {
|
|
30
|
-
return this._keyframes;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Add a keyframe to this track
|
|
34
|
-
* Keyframes are automatically sorted by time
|
|
35
|
-
*/
|
|
36
|
-
addKeyframe(keyframe) {
|
|
37
|
-
this._keyframes.push(keyframe);
|
|
38
|
-
// Sort keyframes by time
|
|
39
|
-
this._keyframes.sort((a, b) => a.time - b.time);
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Remove a keyframe from this track
|
|
43
|
-
*/
|
|
44
|
-
removeKeyframe(keyframe) {
|
|
45
|
-
const index = this._keyframes.indexOf(keyframe);
|
|
46
|
-
if (index === -1) {
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
this._keyframes.splice(index, 1);
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Evaluate the track at a given time and apply the value to the target property
|
|
54
|
-
* @param time The time in seconds to evaluate at
|
|
55
|
-
*/
|
|
56
|
-
evaluate(time) {
|
|
57
|
-
if (this._keyframes.length === 0) {
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
60
|
-
// If time is before first keyframe, use first keyframe value
|
|
61
|
-
if (time <= this._keyframes[0].time) {
|
|
62
|
-
const value = this._keyframes[0].value;
|
|
63
|
-
this.applyValue(value);
|
|
64
|
-
return value;
|
|
65
|
-
}
|
|
66
|
-
// If time is after last keyframe, use last keyframe value
|
|
67
|
-
const lastKeyframe = this._keyframes[this._keyframes.length - 1];
|
|
68
|
-
if (time >= lastKeyframe.time) {
|
|
69
|
-
const value = lastKeyframe.value;
|
|
70
|
-
this.applyValue(value);
|
|
71
|
-
return value;
|
|
72
|
-
}
|
|
73
|
-
// Find the two keyframes to interpolate between
|
|
74
|
-
let fromKeyframe = null;
|
|
75
|
-
let toKeyframe = null;
|
|
76
|
-
for (let i = 0; i < this._keyframes.length - 1; i++) {
|
|
77
|
-
const current = this._keyframes[i];
|
|
78
|
-
const next = this._keyframes[i + 1];
|
|
79
|
-
if (time >= current.time && time <= next.time) {
|
|
80
|
-
fromKeyframe = current;
|
|
81
|
-
toKeyframe = next;
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
if (fromKeyframe === null || toKeyframe === null) {
|
|
86
|
-
return undefined;
|
|
87
|
-
}
|
|
88
|
-
// Calculate interpolation factor (0 to 1)
|
|
89
|
-
const duration = toKeyframe.time - fromKeyframe.time;
|
|
90
|
-
let t = duration > 0 ? (time - fromKeyframe.time) / duration : 0;
|
|
91
|
-
// Apply easing function if present
|
|
92
|
-
if (fromKeyframe.easing) {
|
|
93
|
-
t = fromKeyframe.easing(t);
|
|
94
|
-
}
|
|
95
|
-
// Interpolate based on type
|
|
96
|
-
let value;
|
|
97
|
-
switch (fromKeyframe.interpolation) {
|
|
98
|
-
case "step":
|
|
99
|
-
value = fromKeyframe.value;
|
|
100
|
-
break;
|
|
101
|
-
case "linear":
|
|
102
|
-
value = this.interpolateLinear(fromKeyframe.value, toKeyframe.value, t);
|
|
103
|
-
break;
|
|
104
|
-
case "cubic":
|
|
105
|
-
value = this.interpolateCubic(fromKeyframe.value, toKeyframe.value, t);
|
|
106
|
-
break;
|
|
107
|
-
case "bezier":
|
|
108
|
-
value = this.interpolateBezier(fromKeyframe.value, toKeyframe.value, t);
|
|
109
|
-
break;
|
|
110
|
-
default:
|
|
111
|
-
value = fromKeyframe.value;
|
|
112
|
-
}
|
|
113
|
-
this.applyValue(value);
|
|
114
|
-
return value;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Linear interpolation between two values
|
|
118
|
-
*/
|
|
119
|
-
interpolateLinear(from, to, t) {
|
|
120
|
-
// Handle numbers
|
|
121
|
-
if (typeof from === "number" && typeof to === "number") {
|
|
122
|
-
return from + (to - from) * t;
|
|
123
|
-
}
|
|
124
|
-
// For non-numeric types, use step interpolation
|
|
125
|
-
return t < 0.5 ? from : to;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Cubic interpolation between two values (ease-in-out)
|
|
129
|
-
*/
|
|
130
|
-
interpolateCubic(from, to, t) {
|
|
131
|
-
// Handle numbers with cubic easing
|
|
132
|
-
if (typeof from === "number" && typeof to === "number") {
|
|
133
|
-
// Cubic ease-in-out: smooth acceleration and deceleration
|
|
134
|
-
const easedT = t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;
|
|
135
|
-
return from + (to - from) * easedT;
|
|
136
|
-
}
|
|
137
|
-
// For non-numeric types, use step interpolation
|
|
138
|
-
return t < 0.5 ? from : to;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Bezier interpolation between two values (smooth curve)
|
|
142
|
-
*/
|
|
143
|
-
interpolateBezier(from, to, t) {
|
|
144
|
-
// Handle numbers with bezier easing
|
|
145
|
-
if (typeof from === "number" && typeof to === "number") {
|
|
146
|
-
// Bezier curve approximation (0.42, 0, 0.58, 1)
|
|
147
|
-
const easedT = t * t * (3 - 2 * t);
|
|
148
|
-
return from + (to - from) * easedT;
|
|
149
|
-
}
|
|
150
|
-
// For non-numeric types, use step interpolation
|
|
151
|
-
return t < 0.5 ? from : to;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Apply a value to the target property
|
|
155
|
-
*/
|
|
156
|
-
applyValue(value) {
|
|
157
|
-
// Parse property path (e.g., 'opacity' or 'transform.position.x')
|
|
158
|
-
const parts = this._property.split(".");
|
|
159
|
-
// Navigate to the target object using Record type for type safety
|
|
160
|
-
let target = this._target;
|
|
161
|
-
for (let i = 0; i < parts.length - 1; i++) {
|
|
162
|
-
const part = parts[i];
|
|
163
|
-
if (part && target[part] !== undefined) {
|
|
164
|
-
target = target[part];
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
// Property path doesn't exist
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
// Set the final property
|
|
172
|
-
const finalProp = parts[parts.length - 1];
|
|
173
|
-
if (finalProp && target[finalProp] !== undefined) {
|
|
174
|
-
target[finalProp] = value;
|
|
175
|
-
// Notify target of change
|
|
176
|
-
if (this._property.startsWith("transform.")) {
|
|
177
|
-
this._target.notifyTransformChanged();
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
180
|
-
this._target.markDirty();
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
//# sourceMappingURL=animationtrack.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"animationtrack.js","sourceRoot":"","sources":["../../../core/animation/animationtrack.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC;;;GAGG;AACH,MAAM,OAAO,cAAc;IACf,OAAO,CAAW;IAClB,SAAS,CAAQ;IACjB,UAAU,GAAe,EAAE,CAAA;IAEnC,YAAY,MAAiB,EAAE,QAAgB;QAC3C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;QACrB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;IAC7B,CAAC;IAED;;OAEG;IACH,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAA;IACvB,CAAC;IAED;;OAEG;IACH,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAA;IACzB,CAAC;IAED;;OAEG;IACH,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAA;IAC1B,CAAC;IAED;;;OAGG;IACH,WAAW,CAAC,QAAkB;QAC1B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC9B,yBAAyB;QACzB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAA;IACnD,CAAC;IAED;;OAEG;IACH,cAAc,CAAC,QAAkB;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QAC/C,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;YACf,OAAO,KAAK,CAAA;QAChB,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,MAAM,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,CAAC;QACL,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Easing function type for smooth interpolation
|
|
3
|
-
*/
|
|
4
|
-
export type EasingFunction = (time: number) => number;
|
|
5
|
-
/**
|
|
6
|
-
* Collection of easing functions for animation
|
|
7
|
-
*/
|
|
8
|
-
export declare const Easing: {
|
|
9
|
-
/** Linear easing */
|
|
10
|
-
linear: (t: number) => number;
|
|
11
|
-
/** Quadratic easing */
|
|
12
|
-
quadratic: (t: number) => number;
|
|
13
|
-
/** Cubic easing */
|
|
14
|
-
cubic: (t: number) => number;
|
|
15
|
-
/** Elastic easing */
|
|
16
|
-
elastic: (t: number) => number;
|
|
17
|
-
/** Ease in quadratic */
|
|
18
|
-
inQuad: (t: number) => number;
|
|
19
|
-
/** Ease out quadratic */
|
|
20
|
-
outQuad: (t: number) => number;
|
|
21
|
-
/** Ease in out quadratic */
|
|
22
|
-
inOutQuad: (t: number) => number;
|
|
23
|
-
/** Ease in cubic */
|
|
24
|
-
inCubic: (t: number) => number;
|
|
25
|
-
/** Ease out cubic */
|
|
26
|
-
outCubic: (t: number) => number;
|
|
27
|
-
/** Ease in out cubic */
|
|
28
|
-
inOutCubic: (t: number) => number;
|
|
29
|
-
/** Ease in quartic */
|
|
30
|
-
inQuart: (t: number) => number;
|
|
31
|
-
/** Ease out quartic */
|
|
32
|
-
outQuart: (t: number) => number;
|
|
33
|
-
/** Ease in out quartic */
|
|
34
|
-
inOutQuart: (t: number) => number;
|
|
35
|
-
/** Ease in quintic */
|
|
36
|
-
inQuint: (t: number) => number;
|
|
37
|
-
/** Ease out quintic */
|
|
38
|
-
outQuint: (t: number) => number;
|
|
39
|
-
/** Ease in out quintic */
|
|
40
|
-
inOutQuint: (t: number) => number;
|
|
41
|
-
/** Ease in sine */
|
|
42
|
-
inSine: (t: number) => number;
|
|
43
|
-
/** Ease out sine */
|
|
44
|
-
outSine: (t: number) => number;
|
|
45
|
-
/** Ease in out sine */
|
|
46
|
-
inOutSine: (t: number) => number;
|
|
47
|
-
/** Ease in exponential */
|
|
48
|
-
inExpo: (t: number) => number;
|
|
49
|
-
/** Ease out exponential */
|
|
50
|
-
outExpo: (t: number) => number;
|
|
51
|
-
/** Ease in out exponential */
|
|
52
|
-
inOutExpo: (t: number) => number;
|
|
53
|
-
/** Ease in circular */
|
|
54
|
-
inCirc: (t: number) => number;
|
|
55
|
-
/** Ease out circular */
|
|
56
|
-
outCirc: (t: number) => number;
|
|
57
|
-
/** Ease in out circular */
|
|
58
|
-
inOutCirc: (t: number) => number;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Linear easing function
|
|
62
|
-
*/
|
|
63
|
-
export declare const linear: (t: number) => number;
|
|
64
|
-
/**
|
|
65
|
-
* Ease-in quadratic easing function
|
|
66
|
-
*/
|
|
67
|
-
export declare const easeIn: (t: number) => number;
|
|
68
|
-
/**
|
|
69
|
-
* Ease-out quadratic easing function
|
|
70
|
-
*/
|
|
71
|
-
export declare const easeOut: (t: number) => number;
|
|
72
|
-
/**
|
|
73
|
-
* Ease-in-out quadratic easing function
|
|
74
|
-
*/
|
|
75
|
-
export declare const easeInOut: (t: number) => number;
|
|
76
|
-
/**
|
|
77
|
-
* Create a cubic bezier easing function
|
|
78
|
-
*/
|
|
79
|
-
export declare function cubicBezier(x1: number, y1: number, x2: number, y2: number): EasingFunction;
|
|
80
|
-
//# sourceMappingURL=easing.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"easing.d.ts","sourceRoot":"","sources":["../../../core/animation/easing.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;AAErD;;GAEG;AACH,eAAO,MAAM,MAAM;IACf,oBAAoB;gBACR,MAAM;IAClB,uBAAuB;mBACR,MAAM;IACrB,mBAAmB;eACR,MAAM;IACjB,qBAAqB;iBACR,MAAM;IAEnB,wBAAwB;gBACZ,MAAM;IAClB,yBAAyB;iBACZ,MAAM;IACnB,4BAA4B;mBACb,MAAM;IACrB,oBAAoB;iBACP,MAAM;IACnB,qBAAqB;kBACP,MAAM;IACpB,wBAAwB;oBACR,MAAM;IAEtB,sBAAsB;iBACT,MAAM;IACnB,uBAAuB;kBACT,MAAM;IACpB,0BAA0B;oBACV,MAAM;IAEtB,sBAAsB;iBACT,MAAM;IACnB,uBAAuB;kBACT,MAAM;IACpB,0BAA0B;oBACV,MAAM;IAEtB,mBAAmB;gBACP,MAAM;IAClB,oBAAoB;iBACP,MAAM;IACnB,uBAAuB;mBACR,MAAM;IACrB,0BAA0B;gBACd,MAAM;IAClB,2BAA2B;iBACd,MAAM;IACnB,8BAA8B;mBACf,MAAM;IAMrB,uBAAuB;gBACX,MAAM;IAClB,wBAAwB;iBACX,MAAM;IACnB,2BAA2B;mBACZ,MAAM;CAMxB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,MApEH,MAAM,WAoEa,CAAA;AAEnC;;GAEG;AACH,eAAO,MAAM,MAAM,MAhEH,MAAM,WAgEa,CAAA;AAEnC;;GAEG;AACH,eAAO,MAAM,OAAO,MAnEH,MAAM,WAmEc,CAAA;AAErC;;GAEG;AACH,eAAO,MAAM,SAAS,MAtEH,MAAM,WAsEgB,CAAA;AAEzC;;GAEG;AACH,wBAAgB,WAAW,CACvB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACX,cAAc,CA8ChB"}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Collection of easing functions for animation
|
|
3
|
-
*/
|
|
4
|
-
export const Easing = {
|
|
5
|
-
/** Linear easing */
|
|
6
|
-
linear: (t) => t,
|
|
7
|
-
/** Quadratic easing */
|
|
8
|
-
quadratic: (t) => t * (-(t * t) * t + 4 * t * t - 6 * t + 4),
|
|
9
|
-
/** Cubic easing */
|
|
10
|
-
cubic: (t) => t * (4 * t * t - 9 * t + 6),
|
|
11
|
-
/** Elastic easing */
|
|
12
|
-
elastic: (t) => t * (33 * t * t * t * t - 106 * t * t * t + 126 * t * t - 67 * t + 15),
|
|
13
|
-
/** Ease in quadratic */
|
|
14
|
-
inQuad: (t) => t * t,
|
|
15
|
-
/** Ease out quadratic */
|
|
16
|
-
outQuad: (t) => t * (2 - t),
|
|
17
|
-
/** Ease in out quadratic */
|
|
18
|
-
inOutQuad: (t) => (t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t),
|
|
19
|
-
/** Ease in cubic */
|
|
20
|
-
inCubic: (t) => t * t * t,
|
|
21
|
-
/** Ease out cubic */
|
|
22
|
-
outCubic: (t) => --t * t * t + 1,
|
|
23
|
-
/** Ease in out cubic */
|
|
24
|
-
inOutCubic: (t) => t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,
|
|
25
|
-
/** Ease in quartic */
|
|
26
|
-
inQuart: (t) => t * t * t * t,
|
|
27
|
-
/** Ease out quartic */
|
|
28
|
-
outQuart: (t) => 1 - --t * t * t * t,
|
|
29
|
-
/** Ease in out quartic */
|
|
30
|
-
inOutQuart: (t) => t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t,
|
|
31
|
-
/** Ease in quintic */
|
|
32
|
-
inQuint: (t) => t * t * t * t * t,
|
|
33
|
-
/** Ease out quintic */
|
|
34
|
-
outQuint: (t) => 1 + --t * t * t * t * t,
|
|
35
|
-
/** Ease in out quintic */
|
|
36
|
-
inOutQuint: (t) => t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t,
|
|
37
|
-
/** Ease in sine */
|
|
38
|
-
inSine: (t) => -Math.cos(t * (Math.PI / 2)) + 1,
|
|
39
|
-
/** Ease out sine */
|
|
40
|
-
outSine: (t) => Math.sin(t * (Math.PI / 2)),
|
|
41
|
-
/** Ease in out sine */
|
|
42
|
-
inOutSine: (t) => -(Math.cos(Math.PI * t) - 1) / 2,
|
|
43
|
-
/** Ease in exponential */
|
|
44
|
-
inExpo: (t) => Math.pow(2, 10 * (t - 1)),
|
|
45
|
-
/** Ease out exponential */
|
|
46
|
-
outExpo: (t) => -Math.pow(2, -10 * t) + 1,
|
|
47
|
-
/** Ease in out exponential */
|
|
48
|
-
inOutExpo: (t) => {
|
|
49
|
-
t /= 0.5;
|
|
50
|
-
if (t < 1)
|
|
51
|
-
return Math.pow(2, 10 * (t - 1)) / 2;
|
|
52
|
-
t--;
|
|
53
|
-
return (-Math.pow(2, -10 * t) + 2) / 2;
|
|
54
|
-
},
|
|
55
|
-
/** Ease in circular */
|
|
56
|
-
inCirc: (t) => -Math.sqrt(1 - t * t) + 1,
|
|
57
|
-
/** Ease out circular */
|
|
58
|
-
outCirc: (t) => Math.sqrt(1 - (t = t - 1) * t),
|
|
59
|
-
/** Ease in out circular */
|
|
60
|
-
inOutCirc: (t) => {
|
|
61
|
-
t /= 0.5;
|
|
62
|
-
if (t < 1)
|
|
63
|
-
return -(Math.sqrt(1 - t * t) - 1) / 2;
|
|
64
|
-
t -= 2;
|
|
65
|
-
return (Math.sqrt(1 - t * t) + 1) / 2;
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Linear easing function
|
|
70
|
-
*/
|
|
71
|
-
export const linear = Easing.linear;
|
|
72
|
-
/**
|
|
73
|
-
* Ease-in quadratic easing function
|
|
74
|
-
*/
|
|
75
|
-
export const easeIn = Easing.inQuad;
|
|
76
|
-
/**
|
|
77
|
-
* Ease-out quadratic easing function
|
|
78
|
-
*/
|
|
79
|
-
export const easeOut = Easing.outQuad;
|
|
80
|
-
/**
|
|
81
|
-
* Ease-in-out quadratic easing function
|
|
82
|
-
*/
|
|
83
|
-
export const easeInOut = Easing.inOutQuad;
|
|
84
|
-
/**
|
|
85
|
-
* Create a cubic bezier easing function
|
|
86
|
-
*/
|
|
87
|
-
export function cubicBezier(x1, y1, x2, y2) {
|
|
88
|
-
const sampleCurveX = (t) => {
|
|
89
|
-
return ((1 - 3 * x2 + 3 * x1) * t * t * t +
|
|
90
|
-
(3 * x2 - 6 * x1) * t * t +
|
|
91
|
-
3 * x1 * t);
|
|
92
|
-
};
|
|
93
|
-
const sampleCurveY = (t) => {
|
|
94
|
-
return ((1 - 3 * y2 + 3 * y1) * t * t * t +
|
|
95
|
-
(3 * y2 - 6 * y1) * t * t +
|
|
96
|
-
3 * y1 * t);
|
|
97
|
-
};
|
|
98
|
-
const sampleCurveDerivativeX = (t) => {
|
|
99
|
-
return (3 * (1 - 3 * x2 + 3 * x1) * t * t +
|
|
100
|
-
2 * (3 * x2 - 6 * x1) * t +
|
|
101
|
-
3 * x1);
|
|
102
|
-
};
|
|
103
|
-
const solveCurveX = (x) => {
|
|
104
|
-
let t = x;
|
|
105
|
-
for (let i = 0; i < 8; i++) {
|
|
106
|
-
const xError = sampleCurveX(t) - x;
|
|
107
|
-
if (Math.abs(xError) < 0.001) {
|
|
108
|
-
return t;
|
|
109
|
-
}
|
|
110
|
-
const dx = sampleCurveDerivativeX(t);
|
|
111
|
-
if (Math.abs(dx) < 0.000001) {
|
|
112
|
-
break;
|
|
113
|
-
}
|
|
114
|
-
t -= xError / dx;
|
|
115
|
-
}
|
|
116
|
-
return t;
|
|
117
|
-
};
|
|
118
|
-
return (t) => {
|
|
119
|
-
if (t <= 0)
|
|
120
|
-
return 0;
|
|
121
|
-
if (t >= 1)
|
|
122
|
-
return 1;
|
|
123
|
-
return sampleCurveY(solveCurveX(t));
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
//# sourceMappingURL=easing.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"easing.js","sourceRoot":"","sources":["../../../core/animation/easing.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,oBAAoB;IACpB,MAAM,EAAE,CAAC,CAAS,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CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC;gBAC1B,MAAK;YACT,CAAC;YACD,CAAC,IAAI,MAAM,GAAG,EAAE,CAAA;QACpB,CAAC;QACD,OAAO,CAAC,CAAA;IACZ,CAAC,CAAA;IAED,OAAO,CAAC,CAAS,EAAU,EAAE;QACzB,IAAI,CAAC,IAAI,CAAC;YAAE,OAAO,CAAC,CAAA;QACpB,IAAI,CAAC,IAAI,CAAC;YAAE,OAAO,CAAC,CAAA;QACpB,OAAO,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;IACvC,CAAC,CAAA;AACL,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { Timeline } from "./timeline";
|
|
2
|
-
export { AnimationTrack } from "./animationtrack";
|
|
3
|
-
export { Keyframe } from "./keyframe";
|
|
4
|
-
export type { InterpolationType, EasingFunction } from "./keyframe";
|
|
5
|
-
export { Easing, linear, easeIn, easeOut, easeInOut, cubicBezier, type EasingFunction as EasingFn, } from "./easing";
|
|
6
|
-
export { NumberInterpolator, Vector2Interpolator, ColorInterpolator, InterpolatorRegistry, type Interpolator, } from "./interpolator";
|
|
7
|
-
export { AnimationRuntime, type AnimationData, type PlaybackState, type LoopMode, type RuntimeEvent, type RuntimeEvents, } from "./animationruntime";
|
|
8
|
-
export { AnimationState } from "./animationstate";
|
|
9
|
-
export { StateMachine } from "./statemachine";
|
|
10
|
-
export { StateTransition, EventCondition, BooleanCondition, NumberCondition, TimeCondition, type TransitionCondition, type TransitionConditionType, type StateMachineContext, type NumberComparisonOperator, } from "./statetransition";
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/animation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AACnE,OAAO,EACH,MAAM,EACN,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACT,WAAW,EACX,KAAK,cAAc,IAAI,QAAQ,GAClC,MAAM,UAAU,CAAA;AACjB,OAAO,EACH,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,YAAY,GACpB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACH,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,aAAa,GACrB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EACH,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,GAChC,MAAM,mBAAmB,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { Timeline } from "./timeline";
|
|
2
|
-
export { AnimationTrack } from "./animationtrack";
|
|
3
|
-
export { Keyframe } from "./keyframe";
|
|
4
|
-
export { Easing, linear, easeIn, easeOut, easeInOut, cubicBezier, } from "./easing";
|
|
5
|
-
export { NumberInterpolator, Vector2Interpolator, ColorInterpolator, InterpolatorRegistry, } from "./interpolator";
|
|
6
|
-
export { AnimationRuntime, } from "./animationruntime";
|
|
7
|
-
export { AnimationState } from "./animationstate";
|
|
8
|
-
export { StateMachine } from "./statemachine";
|
|
9
|
-
export { StateTransition, EventCondition, BooleanCondition, NumberCondition, TimeCondition, } from "./statetransition";
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../core/animation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,EACH,MAAM,EACN,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACT,WAAW,GAEd,MAAM,UAAU,CAAA;AACjB,OAAO,EACH,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,GAEvB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACH,gBAAgB,GAMnB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EACH,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,aAAa,GAKhB,MAAM,mBAAmB,CAAA"}
|