@babylonjs/core 7.27.2 → 7.28.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.
Files changed (80) hide show
  1. package/Animations/animatable.core.d.ts +198 -0
  2. package/Animations/animatable.core.js +893 -0
  3. package/Animations/animatable.core.js.map +1 -0
  4. package/Animations/animatable.d.ts +4 -213
  5. package/Animations/animatable.js +5 -886
  6. package/Animations/animatable.js.map +1 -1
  7. package/Animations/animationGroup.d.ts +1 -1
  8. package/Animations/animationGroup.js.map +1 -1
  9. package/Animations/runtimeAnimation.d.ts +1 -0
  10. package/Animations/runtimeAnimation.js +25 -1
  11. package/Animations/runtimeAnimation.js.map +1 -1
  12. package/Audio/audioSceneComponent.d.ts +0 -4
  13. package/Audio/audioSceneComponent.js.map +1 -1
  14. package/Behaviors/Cameras/bouncingBehavior.js.map +1 -1
  15. package/Behaviors/Cameras/framingBehavior.js.map +1 -1
  16. package/Bones/skeleton.d.ts +1 -1
  17. package/Bones/skeleton.js.map +1 -1
  18. package/Culling/ray.core.d.ts +328 -0
  19. package/Culling/ray.core.js +931 -0
  20. package/Culling/ray.core.js.map +1 -0
  21. package/Culling/ray.d.ts +1 -220
  22. package/Culling/ray.js +12 -791
  23. package/Culling/ray.js.map +1 -1
  24. package/Engines/WebGPU/webgpuBufferManager.js +3 -2
  25. package/Engines/WebGPU/webgpuBufferManager.js.map +1 -1
  26. package/Engines/WebGPU/webgpuPipelineContext.js +1 -0
  27. package/Engines/WebGPU/webgpuPipelineContext.js.map +1 -1
  28. package/Engines/abstractEngine.js +2 -2
  29. package/Engines/abstractEngine.js.map +1 -1
  30. package/Engines/index.d.ts +1 -0
  31. package/Engines/index.js +1 -0
  32. package/Engines/index.js.map +1 -1
  33. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.d.ts +1 -1
  34. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js.map +1 -1
  35. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.d.ts +1 -1
  36. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
  37. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.d.ts +1 -1
  38. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js.map +1 -1
  39. package/Inputs/scene.inputManager.js +2 -1
  40. package/Inputs/scene.inputManager.js.map +1 -1
  41. package/Layers/effectLayerSceneComponent.d.ts +0 -6
  42. package/Layers/effectLayerSceneComponent.js +0 -1
  43. package/Layers/effectLayerSceneComponent.js.map +1 -1
  44. package/Layers/layerSceneComponent.d.ts +0 -9
  45. package/Layers/layerSceneComponent.js +0 -1
  46. package/Layers/layerSceneComponent.js.map +1 -1
  47. package/LensFlares/lensFlareSystemSceneComponent.d.ts +0 -5
  48. package/LensFlares/lensFlareSystemSceneComponent.js +0 -1
  49. package/LensFlares/lensFlareSystemSceneComponent.js.map +1 -1
  50. package/Lights/light.js.map +1 -1
  51. package/Materials/Textures/Procedurals/proceduralTextureSceneComponent.d.ts +0 -10
  52. package/Materials/Textures/Procedurals/proceduralTextureSceneComponent.js +0 -1
  53. package/Materials/Textures/Procedurals/proceduralTextureSceneComponent.js.map +1 -1
  54. package/Meshes/Node/Blocks/geometryInterceptorBlock.d.ts +36 -0
  55. package/Meshes/Node/Blocks/geometryInterceptorBlock.js +60 -0
  56. package/Meshes/Node/Blocks/geometryInterceptorBlock.js.map +1 -0
  57. package/Meshes/Node/index.d.ts +1 -0
  58. package/Meshes/Node/index.js +1 -0
  59. package/Meshes/Node/index.js.map +1 -1
  60. package/Meshes/WebGPU/webgpuDataBuffer.d.ts +3 -1
  61. package/Meshes/WebGPU/webgpuDataBuffer.js +6 -1
  62. package/Meshes/WebGPU/webgpuDataBuffer.js.map +1 -1
  63. package/Misc/assetsManager.d.ts +1 -1
  64. package/Misc/assetsManager.js.map +1 -1
  65. package/Misc/tools.js +1 -13
  66. package/Misc/tools.js.map +1 -1
  67. package/Sprites/spriteSceneComponent.d.ts +1 -1
  68. package/Sprites/spriteSceneComponent.js +4 -4
  69. package/Sprites/spriteSceneComponent.js.map +1 -1
  70. package/assetContainer.d.ts +1 -1
  71. package/assetContainer.js.map +1 -1
  72. package/import.helper.d.ts +5 -0
  73. package/import.helper.js +6 -0
  74. package/import.helper.js.map +1 -0
  75. package/node.d.ts +1 -1
  76. package/node.js.map +1 -1
  77. package/package.json +1 -1
  78. package/scene.d.ts +41 -4
  79. package/scene.js +25 -6
  80. 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;