@babylonjs/core 7.27.2 → 7.27.3
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/Animations/animatable.core.d.ts +198 -0
- package/Animations/animatable.core.js +893 -0
- package/Animations/animatable.core.js.map +1 -0
- package/Animations/animatable.d.ts +4 -213
- package/Animations/animatable.js +5 -886
- package/Animations/animatable.js.map +1 -1
- package/Animations/animationGroup.d.ts +1 -1
- package/Animations/animationGroup.js.map +1 -1
- package/Animations/runtimeAnimation.d.ts +1 -0
- package/Animations/runtimeAnimation.js +25 -1
- package/Animations/runtimeAnimation.js.map +1 -1
- package/Audio/audioSceneComponent.d.ts +0 -4
- package/Audio/audioSceneComponent.js.map +1 -1
- package/Behaviors/Cameras/bouncingBehavior.js.map +1 -1
- package/Behaviors/Cameras/framingBehavior.js.map +1 -1
- package/Bones/skeleton.d.ts +1 -1
- package/Bones/skeleton.js.map +1 -1
- package/Culling/ray.core.d.ts +328 -0
- package/Culling/ray.core.js +934 -0
- package/Culling/ray.core.js.map +1 -0
- package/Culling/ray.d.ts +1 -220
- package/Culling/ray.js +12 -791
- package/Culling/ray.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js.map +1 -1
- package/Inputs/scene.inputManager.js +1 -1
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Layers/effectLayerSceneComponent.d.ts +0 -6
- package/Layers/effectLayerSceneComponent.js +0 -1
- package/Layers/effectLayerSceneComponent.js.map +1 -1
- package/Layers/layerSceneComponent.d.ts +0 -9
- package/Layers/layerSceneComponent.js +0 -1
- package/Layers/layerSceneComponent.js.map +1 -1
- package/LensFlares/lensFlareSystemSceneComponent.d.ts +0 -5
- package/LensFlares/lensFlareSystemSceneComponent.js +0 -1
- package/LensFlares/lensFlareSystemSceneComponent.js.map +1 -1
- package/Lights/light.js.map +1 -1
- package/Materials/Textures/Procedurals/proceduralTextureSceneComponent.d.ts +0 -10
- package/Materials/Textures/Procedurals/proceduralTextureSceneComponent.js +0 -1
- package/Materials/Textures/Procedurals/proceduralTextureSceneComponent.js.map +1 -1
- package/Misc/assetsManager.d.ts +1 -1
- package/Misc/assetsManager.js.map +1 -1
- package/Misc/tools.js +1 -13
- package/Misc/tools.js.map +1 -1
- package/Sprites/spriteSceneComponent.d.ts +1 -1
- package/Sprites/spriteSceneComponent.js +4 -4
- package/Sprites/spriteSceneComponent.js.map +1 -1
- package/assetContainer.d.ts +1 -1
- package/assetContainer.js.map +1 -1
- package/node.d.ts +1 -1
- package/node.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +41 -4
- package/scene.js +25 -6
- package/scene.js.map +1 -1
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { Observable } from "../Misc/observable.js";
|
|
2
|
+
import type { Scene } from "../scene.js";
|
|
3
|
+
import type { Nullable } from "../types.js";
|
|
4
|
+
import { RuntimeAnimation } from "./runtimeAnimation";
|
|
5
|
+
import { Animation } from "./animation";
|
|
6
|
+
import type { Bone } from "../Bones/bone.js";
|
|
7
|
+
/**
|
|
8
|
+
* Class used to store an actual running animation
|
|
9
|
+
*/
|
|
10
|
+
export declare class Animatable {
|
|
11
|
+
/** defines the target object */
|
|
12
|
+
target: any;
|
|
13
|
+
/** [0] defines the starting frame number (default is 0) */
|
|
14
|
+
fromFrame: number;
|
|
15
|
+
/** [100] defines the ending frame number (default is 100) */
|
|
16
|
+
toFrame: number;
|
|
17
|
+
/** [false] defines if the animation must loop (default is false) */
|
|
18
|
+
loopAnimation: boolean;
|
|
19
|
+
/** defines a callback to call when animation ends if it is not looping */
|
|
20
|
+
onAnimationEnd?: Nullable<() => void> | undefined;
|
|
21
|
+
/** defines a callback to call when animation loops */
|
|
22
|
+
onAnimationLoop?: Nullable<() => void> | undefined;
|
|
23
|
+
/** [false] defines whether the animation should be evaluated additively */
|
|
24
|
+
isAdditive: boolean;
|
|
25
|
+
/** [0] defines the order in which this animatable should be processed in the list of active animatables (default: 0) */
|
|
26
|
+
playOrder: number;
|
|
27
|
+
private _localDelayOffset;
|
|
28
|
+
private _pausedDelay;
|
|
29
|
+
private _manualJumpDelay;
|
|
30
|
+
/** @hidden */
|
|
31
|
+
_runtimeAnimations: RuntimeAnimation[];
|
|
32
|
+
private _paused;
|
|
33
|
+
private _scene;
|
|
34
|
+
private _speedRatio;
|
|
35
|
+
private _weight;
|
|
36
|
+
private _syncRoot;
|
|
37
|
+
private _frameToSyncFromJump;
|
|
38
|
+
private _goToFrame;
|
|
39
|
+
/**
|
|
40
|
+
* Gets or sets a boolean indicating if the animatable must be disposed and removed at the end of the animation.
|
|
41
|
+
* This will only apply for non looping animation (default is true)
|
|
42
|
+
*/
|
|
43
|
+
disposeOnEnd: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Gets a boolean indicating if the animation has started
|
|
46
|
+
*/
|
|
47
|
+
animationStarted: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Observer raised when the animation ends
|
|
50
|
+
*/
|
|
51
|
+
onAnimationEndObservable: Observable<Animatable>;
|
|
52
|
+
/**
|
|
53
|
+
* Observer raised when the animation loops
|
|
54
|
+
*/
|
|
55
|
+
onAnimationLoopObservable: Observable<Animatable>;
|
|
56
|
+
/**
|
|
57
|
+
* Gets the root Animatable used to synchronize and normalize animations
|
|
58
|
+
*/
|
|
59
|
+
get syncRoot(): Nullable<Animatable>;
|
|
60
|
+
/**
|
|
61
|
+
* Gets the current frame of the first RuntimeAnimation
|
|
62
|
+
* Used to synchronize Animatables
|
|
63
|
+
*/
|
|
64
|
+
get masterFrame(): number;
|
|
65
|
+
/**
|
|
66
|
+
* Gets or sets the animatable weight (-1.0 by default meaning not weighted)
|
|
67
|
+
*/
|
|
68
|
+
get weight(): number;
|
|
69
|
+
set weight(value: number);
|
|
70
|
+
/**
|
|
71
|
+
* Gets or sets the speed ratio to apply to the animatable (1.0 by default)
|
|
72
|
+
*/
|
|
73
|
+
get speedRatio(): number;
|
|
74
|
+
set speedRatio(value: number);
|
|
75
|
+
/**
|
|
76
|
+
* Gets the elapsed time since the animatable started in milliseconds
|
|
77
|
+
*/
|
|
78
|
+
get elapsedTime(): number;
|
|
79
|
+
/**
|
|
80
|
+
* Creates a new Animatable
|
|
81
|
+
* @param scene defines the hosting scene
|
|
82
|
+
* @param target defines the target object
|
|
83
|
+
* @param fromFrame defines the starting frame number (default is 0)
|
|
84
|
+
* @param toFrame defines the ending frame number (default is 100)
|
|
85
|
+
* @param loopAnimation defines if the animation must loop (default is false)
|
|
86
|
+
* @param speedRatio defines the factor to apply to animation speed (default is 1)
|
|
87
|
+
* @param onAnimationEnd defines a callback to call when animation ends if it is not looping
|
|
88
|
+
* @param animations defines a group of animation to add to the new Animatable
|
|
89
|
+
* @param onAnimationLoop defines a callback to call when animation loops
|
|
90
|
+
* @param isAdditive defines whether the animation should be evaluated additively
|
|
91
|
+
* @param playOrder defines the order in which this animatable should be processed in the list of active animatables (default: 0)
|
|
92
|
+
*/
|
|
93
|
+
constructor(scene: Scene,
|
|
94
|
+
/** defines the target object */
|
|
95
|
+
target: any,
|
|
96
|
+
/** [0] defines the starting frame number (default is 0) */
|
|
97
|
+
fromFrame?: number,
|
|
98
|
+
/** [100] defines the ending frame number (default is 100) */
|
|
99
|
+
toFrame?: number,
|
|
100
|
+
/** [false] defines if the animation must loop (default is false) */
|
|
101
|
+
loopAnimation?: boolean, speedRatio?: number,
|
|
102
|
+
/** defines a callback to call when animation ends if it is not looping */
|
|
103
|
+
onAnimationEnd?: Nullable<() => void> | undefined, animations?: Animation[],
|
|
104
|
+
/** defines a callback to call when animation loops */
|
|
105
|
+
onAnimationLoop?: Nullable<() => void> | undefined,
|
|
106
|
+
/** [false] defines whether the animation should be evaluated additively */
|
|
107
|
+
isAdditive?: boolean,
|
|
108
|
+
/** [0] defines the order in which this animatable should be processed in the list of active animatables (default: 0) */
|
|
109
|
+
playOrder?: number);
|
|
110
|
+
/**
|
|
111
|
+
* Synchronize and normalize current Animatable with a source Animatable
|
|
112
|
+
* This is useful when using animation weights and when animations are not of the same length
|
|
113
|
+
* @param root defines the root Animatable to synchronize with (null to stop synchronizing)
|
|
114
|
+
* @returns the current Animatable
|
|
115
|
+
*/
|
|
116
|
+
syncWith(root: Nullable<Animatable>): Animatable;
|
|
117
|
+
/**
|
|
118
|
+
* Gets the list of runtime animations
|
|
119
|
+
* @returns an array of RuntimeAnimation
|
|
120
|
+
*/
|
|
121
|
+
getAnimations(): RuntimeAnimation[];
|
|
122
|
+
/**
|
|
123
|
+
* Adds more animations to the current animatable
|
|
124
|
+
* @param target defines the target of the animations
|
|
125
|
+
* @param animations defines the new animations to add
|
|
126
|
+
*/
|
|
127
|
+
appendAnimations(target: any, animations: Animation[]): void;
|
|
128
|
+
/**
|
|
129
|
+
* Gets the source animation for a specific property
|
|
130
|
+
* @param property defines the property to look for
|
|
131
|
+
* @returns null or the source animation for the given property
|
|
132
|
+
*/
|
|
133
|
+
getAnimationByTargetProperty(property: string): Nullable<Animation>;
|
|
134
|
+
/**
|
|
135
|
+
* Gets the runtime animation for a specific property
|
|
136
|
+
* @param property defines the property to look for
|
|
137
|
+
* @returns null or the runtime animation for the given property
|
|
138
|
+
*/
|
|
139
|
+
getRuntimeAnimationByTargetProperty(property: string): Nullable<RuntimeAnimation>;
|
|
140
|
+
/**
|
|
141
|
+
* Resets the animatable to its original state
|
|
142
|
+
*/
|
|
143
|
+
reset(): void;
|
|
144
|
+
/**
|
|
145
|
+
* Allows the animatable to blend with current running animations
|
|
146
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-blending
|
|
147
|
+
* @param blendingSpeed defines the blending speed to use
|
|
148
|
+
*/
|
|
149
|
+
enableBlending(blendingSpeed: number): void;
|
|
150
|
+
/**
|
|
151
|
+
* Disable animation blending
|
|
152
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-blending
|
|
153
|
+
*/
|
|
154
|
+
disableBlending(): void;
|
|
155
|
+
/**
|
|
156
|
+
* Jump directly to a given frame
|
|
157
|
+
* @param frame defines the frame to jump to
|
|
158
|
+
*/
|
|
159
|
+
goToFrame(frame: number): void;
|
|
160
|
+
/**
|
|
161
|
+
* Returns true if the animations for this animatable are paused
|
|
162
|
+
*/
|
|
163
|
+
get paused(): boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Pause the animation
|
|
166
|
+
*/
|
|
167
|
+
pause(): void;
|
|
168
|
+
/**
|
|
169
|
+
* Restart the animation
|
|
170
|
+
*/
|
|
171
|
+
restart(): void;
|
|
172
|
+
private _raiseOnAnimationEnd;
|
|
173
|
+
/**
|
|
174
|
+
* Stop and delete the current animation
|
|
175
|
+
* @param animationName defines a string used to only stop some of the runtime animations instead of all
|
|
176
|
+
* @param targetMask a function that determines if the animation should be stopped based on its target (all animations will be stopped if both this and animationName are empty)
|
|
177
|
+
* @param useGlobalSplice if true, the animatables will be removed by the caller of this function (false by default)
|
|
178
|
+
* @param skipOnAnimationEnd defines if the system should not raise onAnimationEnd. Default is false
|
|
179
|
+
*/
|
|
180
|
+
stop(animationName?: string, targetMask?: (target: any) => boolean, useGlobalSplice?: boolean, skipOnAnimationEnd?: boolean): void;
|
|
181
|
+
/**
|
|
182
|
+
* Wait asynchronously for the animation to end
|
|
183
|
+
* @returns a promise which will be fulfilled when the animation ends
|
|
184
|
+
*/
|
|
185
|
+
waitAsync(): Promise<Animatable>;
|
|
186
|
+
/**
|
|
187
|
+
* @internal
|
|
188
|
+
*/
|
|
189
|
+
_animate(delay: number): boolean;
|
|
190
|
+
}
|
|
191
|
+
/** @internal */
|
|
192
|
+
export declare function RegisterTargetForLateAnimationBinding(scene: Scene, runtimeAnimation: RuntimeAnimation, originalValue: any): void;
|
|
193
|
+
/**
|
|
194
|
+
* Initialize all the inter dependecies between the animations and Scene and Bone
|
|
195
|
+
* @param sceneClass defines the scene prototype to use
|
|
196
|
+
* @param boneClass defines the bone prototype to use
|
|
197
|
+
*/
|
|
198
|
+
export declare function AddAnimationExtensions(sceneClass: typeof Scene, boneClass: typeof Bone): void;
|