@onerjs/core 8.31.0 → 8.31.2
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/animationGroup.js +1 -4
- package/Animations/animationGroup.js.map +1 -1
- package/Behaviors/Cameras/interpolatingBehavior.d.ts +8 -2
- package/Behaviors/Cameras/interpolatingBehavior.js +58 -6
- package/Behaviors/Cameras/interpolatingBehavior.js.map +1 -1
- package/Cameras/Inputs/freeCameraDeviceOrientationInput.js +11 -9
- package/Cameras/Inputs/freeCameraDeviceOrientationInput.js.map +1 -1
- package/Cameras/Inputs/geospatialCameraKeyboardInput.d.ts +81 -0
- package/Cameras/Inputs/geospatialCameraKeyboardInput.js +223 -0
- package/Cameras/Inputs/geospatialCameraKeyboardInput.js.map +1 -0
- package/Cameras/Inputs/geospatialCameraMouseWheelInput.js +1 -1
- package/Cameras/Inputs/geospatialCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/geospatialCameraPointersInput.d.ts +8 -20
- package/Cameras/Inputs/geospatialCameraPointersInput.js +35 -75
- package/Cameras/Inputs/geospatialCameraPointersInput.js.map +1 -1
- package/Cameras/Limits/geospatialLimits.d.ts +60 -0
- package/Cameras/Limits/geospatialLimits.js +89 -0
- package/Cameras/Limits/geospatialLimits.js.map +1 -0
- package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js +1 -1
- package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js.map +1 -1
- package/Cameras/VR/vrExperienceHelper.js +2 -2
- package/Cameras/VR/vrExperienceHelper.js.map +1 -1
- package/Cameras/cameraMovement.js +1 -1
- package/Cameras/cameraMovement.js.map +1 -1
- package/Cameras/deviceOrientationCamera.js +5 -3
- package/Cameras/deviceOrientationCamera.js.map +1 -1
- package/Cameras/flyCamera.d.ts +2 -1
- package/Cameras/flyCamera.js.map +1 -1
- package/Cameras/geospatialCamera.d.ts +78 -49
- package/Cameras/geospatialCamera.js +210 -191
- package/Cameras/geospatialCamera.js.map +1 -1
- package/Cameras/geospatialCameraInputsManager.d.ts +5 -0
- package/Cameras/geospatialCameraInputsManager.js +9 -0
- package/Cameras/geospatialCameraInputsManager.js.map +1 -1
- package/Cameras/geospatialCameraMovement.d.ts +66 -0
- package/Cameras/geospatialCameraMovement.js +199 -0
- package/Cameras/geospatialCameraMovement.js.map +1 -0
- package/Cameras/targetCamera.d.ts +1 -1
- package/Cameras/targetCamera.js +2 -2
- package/Cameras/targetCamera.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +14 -6
- package/Engines/Native/nativeInterfaces.js +6 -1
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/nativeEngine.js +2 -2
- package/Engines/nativeEngine.js.map +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.js +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.js.map +1 -1
- package/FlowGraph/flowGraphMath.d.ts +25 -0
- package/FlowGraph/flowGraphMath.js +40 -0
- package/FlowGraph/flowGraphMath.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js +5 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/splatReaderBlock.js +6 -5
- package/Materials/Node/Blocks/GaussianSplatting/splatReaderBlock.js.map +1 -1
- package/Materials/shaderMaterial.js +4 -2
- package/Materials/shaderMaterial.js.map +1 -1
- package/Maths/math.vector.functions.d.ts +5 -24
- package/Maths/math.vector.functions.js +32 -35
- package/Maths/math.vector.functions.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +51 -16
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/csg2.js +1 -1
- package/Meshes/csg2.js.map +1 -1
- package/Meshes/thinInstanceMesh.js +15 -0
- package/Meshes/thinInstanceMesh.js.map +1 -1
- package/Misc/fileTools.js.map +1 -1
- package/Misc/tools.d.ts +3 -0
- package/Misc/tools.js +43 -4
- package/Misc/tools.js.map +1 -1
- package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.js +2 -2
- package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.js.map +1 -1
- package/Particles/Node/Blocks/particleInputBlock.js +1 -0
- package/Particles/Node/Blocks/particleInputBlock.js.map +1 -1
- package/Particles/Node/Blocks/systemBlock.d.ts +8 -8
- package/Particles/Node/Blocks/systemBlock.js +12 -12
- package/Particles/Node/Blocks/systemBlock.js.map +1 -1
- package/Particles/Node/Enums/nodeParticleContextualSources.d.ts +3 -1
- package/Particles/Node/Enums/nodeParticleContextualSources.js +2 -0
- package/Particles/Node/Enums/nodeParticleContextualSources.js.map +1 -1
- package/Particles/Node/nodeParticleBuildState.d.ts +5 -5
- package/Particles/Node/nodeParticleBuildState.js +9 -7
- package/Particles/Node/nodeParticleBuildState.js.map +1 -1
- package/Particles/Node/nodeParticleSystemSet.helper.js +288 -149
- package/Particles/Node/nodeParticleSystemSet.helper.js.map +1 -1
- package/Particles/particle.d.ts +4 -0
- package/Particles/particle.js +2 -0
- package/Particles/particle.js.map +1 -1
- package/Particles/thinParticleSystem.d.ts +0 -4
- package/Particles/thinParticleSystem.function.d.ts +1 -1
- package/Particles/thinParticleSystem.function.js +9 -6
- package/Particles/thinParticleSystem.function.js.map +1 -1
- package/Particles/thinParticleSystem.js +1 -3
- package/Particles/thinParticleSystem.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js +5 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplattingUboDeclaration.js +2 -1
- package/Shaders/ShadersInclude/gaussianSplattingUboDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.js +1 -1
- package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.js.map +1 -1
- package/Shaders/gaussianSplatting.vertex.js +3 -3
- package/Shaders/gaussianSplatting.vertex.js.map +1 -1
- package/Shaders/gaussianSplattingDepth.vertex.js +2 -2
- package/Shaders/gaussianSplattingDepth.vertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +35 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplattingUboDeclaration.js +2 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplattingUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplattingVertexDeclaration.js +1 -2
- package/ShadersWGSL/ShadersInclude/gaussianSplattingVertexDeclaration.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js +3 -3
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js +2 -2
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
- package/XR/webXRCamera.d.ts +5 -1
- package/XR/webXRCamera.js +2 -2
- package/XR/webXRCamera.js.map +1 -1
- package/XR/webXRExperienceHelper.js +1 -1
- package/XR/webXRExperienceHelper.js.map +1 -1
- package/package.json +1 -1
|
@@ -710,10 +710,7 @@ export class AnimationGroup {
|
|
|
710
710
|
this._targetedAnimations.length = 0;
|
|
711
711
|
this._animatables.length = 0;
|
|
712
712
|
// Remove from scene
|
|
713
|
-
|
|
714
|
-
if (index > -1) {
|
|
715
|
-
this._scene.animationGroups.splice(index, 1);
|
|
716
|
-
}
|
|
713
|
+
this._scene.removeAnimationGroup(this);
|
|
717
714
|
if (this._parentContainer) {
|
|
718
715
|
const index = this._parentContainer.animationGroups.indexOf(this);
|
|
719
716
|
if (index > -1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UAAU,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACxC,IAAI,WAAW,EAAE,CAAC;YACd,GAAG,IAAI,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;YAC/B,GAAG,IAAI,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC;YAC3B,GAAG,IAAI,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC;YACzC,GAAG,IAAI,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC;YAC3C,GAAG,IAAI,+BAA+B,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC;YACzE,GAAG,IAAI,wBAAwB,GAAG,IAAI,CAAC,YAAY,CAAC;QACxD,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;CACJ","sourcesContent":["import type { Animatable } from \"./animatable.core\";\r\nimport { Animation } from \"./animation\";\r\nimport type { IMakeAnimationAdditiveOptions } from \"./animation\";\r\nimport type { IAnimationKey } from \"./animationKey\";\r\n\r\nimport type { Scene, IDisposable } from \"../scene\";\r\nimport { Observable } from \"../Misc/observable\";\r\nimport type { Nullable } from \"../types\";\r\nimport { EngineStore } from \"../Engines/engineStore\";\r\nimport type { Node } from \"../node\";\r\n\r\nimport { Tags } from \"../Misc/tags\";\r\nimport type { AnimationGroupMask } from \"./animationGroupMask\";\r\nimport \"./animatable\";\r\nimport type { IAssetContainer } from \"core/IAssetContainer\";\r\nimport { UniqueIdGenerator } from \"core/Misc/uniqueIdGenerator\";\r\n\r\n/**\r\n * This class defines the direct association between an animation and a target\r\n */\r\nexport class TargetedAnimation {\r\n /**\r\n * Animation to perform\r\n */\r\n public animation: Animation;\r\n\r\n /**\r\n * Target to animate\r\n */\r\n public target: any;\r\n\r\n /**\r\n * Gets or sets the unique id of the targeted animation\r\n */\r\n public readonly uniqueId = UniqueIdGenerator.UniqueId;\r\n\r\n /**\r\n * Returns the string \"TargetedAnimation\"\r\n * @returns \"TargetedAnimation\"\r\n */\r\n public getClassName(): string {\r\n return \"TargetedAnimation\";\r\n }\r\n\r\n /**\r\n * Creates a new targeted animation\r\n * @param parent The animation group to which the animation belongs\r\n */\r\n constructor(public readonly parent: AnimationGroup) {}\r\n\r\n /**\r\n * Serialize the object\r\n * @returns the JSON object representing the current entity\r\n */\r\n public serialize(): any {\r\n const serializationObject: any = {};\r\n serializationObject.animation = this.animation.serialize();\r\n serializationObject.targetId = this.target.id;\r\n\r\n return serializationObject;\r\n }\r\n}\r\n\r\n/**\r\n * Options to be used when creating an additive group animation\r\n */\r\nexport interface IMakeAnimationGroupAdditiveOptions extends IMakeAnimationAdditiveOptions {\r\n /**\r\n * Defines if the animation group should be cloned or not (default is false)\r\n */\r\n cloneOriginalAnimationGroup?: boolean;\r\n /**\r\n * The name of the cloned animation group if cloneOriginalAnimationGroup is true\r\n */\r\n clonedAnimationGroupName?: string;\r\n}\r\n\r\n/**\r\n * Use this class to create coordinated animations on multiple targets\r\n */\r\nexport class AnimationGroup implements IDisposable {\r\n private _scene: Scene;\r\n\r\n private _targetedAnimations = new Array<TargetedAnimation>();\r\n private _animatables = new Array<Animatable>();\r\n private _from = Number.MAX_VALUE;\r\n private _to = -Number.MAX_VALUE;\r\n private _isStarted: boolean;\r\n private _isPaused: boolean;\r\n private _speedRatio = 1;\r\n private _loopAnimation = false;\r\n private _isAdditive = false;\r\n private _weight = -1;\r\n private _playOrder = 0;\r\n private _enableBlending: Nullable<boolean> = null;\r\n private _blendingSpeed: Nullable<number> = null;\r\n private _numActiveAnimatables = 0;\r\n private _shouldStart = true;\r\n public doNotSerialize = false;\r\n\r\n /** @internal */\r\n public _parentContainer: Nullable<IAssetContainer> = null;\r\n\r\n /**\r\n * Gets or sets the unique id of the node\r\n */\r\n public uniqueId: number;\r\n\r\n /**\r\n * This observable will notify when one animation have ended\r\n */\r\n public onAnimationEndObservable = new Observable<TargetedAnimation>();\r\n\r\n /**\r\n * Observer raised when one animation loops\r\n */\r\n public onAnimationLoopObservable = new Observable<TargetedAnimation>();\r\n\r\n /**\r\n * Observer raised when all animations have looped\r\n */\r\n public onAnimationGroupLoopObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * This observable will notify when all animations have ended.\r\n */\r\n public onAnimationGroupEndObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * This observable will notify when all animations have paused.\r\n */\r\n public onAnimationGroupPauseObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * This observable will notify when all animations are playing.\r\n */\r\n public onAnimationGroupPlayObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * Gets or sets an object used to store user defined information for the node\r\n */\r\n public metadata: any = null;\r\n\r\n private _mask: Nullable<AnimationGroupMask> = null;\r\n\r\n /**\r\n * Gets or sets the mask associated with this animation group. This mask is used to filter which objects should be animated.\r\n */\r\n public get mask() {\r\n return this._mask;\r\n }\r\n\r\n public set mask(value: Nullable<AnimationGroupMask>) {\r\n if (this._mask === value) {\r\n return;\r\n }\r\n\r\n this._mask = value;\r\n\r\n this.syncWithMask(true);\r\n }\r\n\r\n /**\r\n * Makes sure that the animations are either played or stopped according to the animation group mask.\r\n * Note however that the call won't have any effect if the animation group has not been started yet.\r\n * @param forceUpdate If true, forces to loop over the animatables even if no mask is defined (used internally, you shouldn't need to use it). Default: false.\r\n */\r\n public syncWithMask(forceUpdate = false) {\r\n if (!this.mask && !forceUpdate) {\r\n this._numActiveAnimatables = this._targetedAnimations.length;\r\n return;\r\n }\r\n\r\n this._numActiveAnimatables = 0;\r\n\r\n for (let i = 0; i < this._animatables.length; ++i) {\r\n const animatable = this._animatables[i];\r\n\r\n if (!this.mask || this.mask.disabled || this.mask.retainsTarget(animatable.target.name)) {\r\n this._numActiveAnimatables++;\r\n if (animatable.paused) {\r\n animatable.restart();\r\n }\r\n } else {\r\n if (!animatable.paused) {\r\n animatable.pause();\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Removes all animations for the targets not retained by the animation group mask.\r\n * Use this function if you know you won't need those animations anymore and if you want to free memory.\r\n */\r\n public removeUnmaskedAnimations() {\r\n if (!this.mask || this.mask.disabled) {\r\n return;\r\n }\r\n\r\n // Removes all animatables (in case the animation group has already been started)\r\n for (let i = 0; i < this._animatables.length; ++i) {\r\n const animatable = this._animatables[i];\r\n\r\n if (!this.mask.retainsTarget(animatable.target.name)) {\r\n animatable.stop();\r\n this._animatables.splice(i, 1);\r\n --i;\r\n }\r\n }\r\n\r\n // Removes the targeted animations\r\n for (let index = 0; index < this._targetedAnimations.length; index++) {\r\n const targetedAnimation = this._targetedAnimations[index];\r\n\r\n if (!this.mask.retainsTarget(targetedAnimation.target.name)) {\r\n this._targetedAnimations.splice(index, 1);\r\n --index;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets the first frame\r\n */\r\n public get from(): number {\r\n return this._from;\r\n }\r\n\r\n public set from(value: number) {\r\n if (this._from === value) {\r\n return;\r\n }\r\n\r\n this._from = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.fromFrame = this._from;\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets the last frame\r\n */\r\n public get to(): number {\r\n return this._to;\r\n }\r\n\r\n public set to(value: number) {\r\n if (this._to === value) {\r\n return;\r\n }\r\n\r\n this._to = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.toFrame = this._to;\r\n }\r\n }\r\n\r\n /**\r\n * Define if the animations are started\r\n */\r\n public get isStarted(): boolean {\r\n return this._isStarted;\r\n }\r\n\r\n /**\r\n * Gets a value indicating that the current group is playing\r\n */\r\n public get isPlaying(): boolean {\r\n return this._isStarted && !this._isPaused;\r\n }\r\n\r\n /**\r\n * Gets or sets the speed ratio to use for all animations\r\n */\r\n public get speedRatio(): number {\r\n return this._speedRatio;\r\n }\r\n\r\n /**\r\n * Gets or sets the speed ratio to use for all animations\r\n */\r\n public set speedRatio(value: number) {\r\n if (this._speedRatio === value) {\r\n return;\r\n }\r\n\r\n this._speedRatio = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.speedRatio = this._speedRatio;\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets if all animations should loop or not\r\n */\r\n public get loopAnimation(): boolean {\r\n return this._loopAnimation;\r\n }\r\n\r\n public set loopAnimation(value: boolean) {\r\n if (this._loopAnimation === value) {\r\n return;\r\n }\r\n\r\n this._loopAnimation = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.loopAnimation = this._loopAnimation;\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets if all animations should be evaluated additively\r\n */\r\n public get isAdditive(): boolean {\r\n return this._isAdditive;\r\n }\r\n\r\n public set isAdditive(value: boolean) {\r\n if (this._isAdditive === value) {\r\n return;\r\n }\r\n\r\n this._isAdditive = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.isAdditive = this._isAdditive;\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets the weight to apply to all animations of the group\r\n */\r\n public get weight(): number {\r\n return this._weight;\r\n }\r\n\r\n public set weight(value: number) {\r\n if (this._weight === value) {\r\n return;\r\n }\r\n\r\n this._weight = value;\r\n this.setWeightForAllAnimatables(this._weight);\r\n }\r\n\r\n /**\r\n * Gets the targeted animations for this animation group\r\n */\r\n public get targetedAnimations(): Array<TargetedAnimation> {\r\n return this._targetedAnimations;\r\n }\r\n\r\n /**\r\n * returning the list of animatables controlled by this animation group.\r\n */\r\n public get animatables(): Array<Animatable> {\r\n return this._animatables;\r\n }\r\n\r\n /**\r\n * Gets the list of target animations\r\n */\r\n public get children() {\r\n return this._targetedAnimations;\r\n }\r\n\r\n /**\r\n * Gets or sets the order of play of the animation group (default: 0)\r\n */\r\n public get playOrder() {\r\n return this._playOrder;\r\n }\r\n\r\n public set playOrder(value: number) {\r\n if (this._playOrder === value) {\r\n return;\r\n }\r\n\r\n this._playOrder = value;\r\n\r\n if (this._animatables.length > 0) {\r\n for (let i = 0; i < this._animatables.length; i++) {\r\n this._animatables[i].playOrder = this._playOrder;\r\n }\r\n\r\n this._scene.sortActiveAnimatables();\r\n }\r\n }\r\n\r\n /**\r\n * Allows the animations of the animation group to blend with current running animations\r\n * Note that a null value means that each animation will use their own existing blending configuration (Animation.enableBlending)\r\n */\r\n public get enableBlending() {\r\n return this._enableBlending;\r\n }\r\n\r\n public set enableBlending(value: Nullable<boolean>) {\r\n if (this._enableBlending === value) {\r\n return;\r\n }\r\n\r\n this._enableBlending = value;\r\n\r\n if (value !== null) {\r\n for (let i = 0; i < this._targetedAnimations.length; ++i) {\r\n this._targetedAnimations[i].animation.enableBlending = value;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets the animation blending speed\r\n * Note that a null value means that each animation will use their own existing blending configuration (Animation.blendingSpeed)\r\n */\r\n public get blendingSpeed() {\r\n return this._blendingSpeed;\r\n }\r\n\r\n public set blendingSpeed(value: Nullable<number>) {\r\n if (this._blendingSpeed === value) {\r\n return;\r\n }\r\n\r\n this._blendingSpeed = value;\r\n\r\n if (value !== null) {\r\n for (let i = 0; i < this._targetedAnimations.length; ++i) {\r\n this._targetedAnimations[i].animation.blendingSpeed = value;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets the length (in seconds) of the animation group\r\n * This function assumes that all animations are played at the same framePerSecond speed!\r\n * Note: you can only call this method after you've added at least one targeted animation!\r\n * @param from Starting frame range (default is AnimationGroup.from)\r\n * @param to Ending frame range (default is AnimationGroup.to)\r\n * @returns The length in seconds\r\n */\r\n public getLength(from?: number, to?: number): number {\r\n from = from ?? this._from;\r\n to = to ?? this._to;\r\n\r\n const fps = this.targetedAnimations[0].animation.framePerSecond * this._speedRatio;\r\n\r\n return (to - from) / fps;\r\n }\r\n\r\n /**\r\n * Merge the array of animation groups into a new animation group\r\n * @param animationGroups List of animation groups to merge\r\n * @param disposeSource If true, animation groups will be disposed after being merged (default: true)\r\n * @param normalize If true, animation groups will be normalized before being merged, so that all animations have the same \"from\" and \"to\" frame (default: false)\r\n * @param weight Weight for the new animation group. If not provided, it will inherit the weight from the first animation group of the array\r\n * @returns The new animation group or null if no animation groups were passed\r\n */\r\n public static MergeAnimationGroups(animationGroups: Array<AnimationGroup>, disposeSource = true, normalize = false, weight?: number): Nullable<AnimationGroup> {\r\n if (animationGroups.length === 0) {\r\n return null;\r\n }\r\n\r\n weight = weight ?? animationGroups[0].weight;\r\n\r\n let beginFrame = Number.MAX_VALUE;\r\n let endFrame = -Number.MAX_VALUE;\r\n\r\n if (normalize) {\r\n for (const animationGroup of animationGroups) {\r\n if (animationGroup.from < beginFrame) {\r\n beginFrame = animationGroup.from;\r\n }\r\n\r\n if (animationGroup.to > endFrame) {\r\n endFrame = animationGroup.to;\r\n }\r\n }\r\n }\r\n\r\n const mergedAnimationGroup = new AnimationGroup(animationGroups[0].name + \"_merged\", animationGroups[0]._scene, weight);\r\n\r\n for (const animationGroup of animationGroups) {\r\n if (normalize) {\r\n animationGroup.normalize(beginFrame, endFrame);\r\n }\r\n\r\n for (const targetedAnimation of animationGroup.targetedAnimations) {\r\n mergedAnimationGroup.addTargetedAnimation(targetedAnimation.animation, targetedAnimation.target);\r\n }\r\n\r\n if (disposeSource) {\r\n animationGroup.dispose();\r\n }\r\n }\r\n\r\n return mergedAnimationGroup;\r\n }\r\n\r\n /**\r\n * Gets the scene the animation group belongs to\r\n * @returns The scene the animation group belongs to\r\n */\r\n public getScene(): Scene {\r\n return this._scene;\r\n }\r\n\r\n /**\r\n * Instantiates a new Animation Group.\r\n * This helps managing several animations at once.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/groupAnimations\r\n * @param name Defines the name of the group\r\n * @param scene Defines the scene the group belongs to\r\n * @param weight Defines the weight to use for animations in the group (-1.0 by default, meaning \"no weight\")\r\n * @param playOrder Defines the order of play of the animation group (default is 0)\r\n */\r\n public constructor(\r\n /** The name of the animation group */\r\n public name: string,\r\n scene: Nullable<Scene> = null,\r\n weight = -1,\r\n playOrder = 0\r\n ) {\r\n this._scene = scene || EngineStore.LastCreatedScene!;\r\n this._weight = weight;\r\n this._playOrder = playOrder;\r\n this.uniqueId = this._scene.getUniqueId();\r\n\r\n this._scene.addAnimationGroup(this);\r\n }\r\n\r\n /**\r\n * Add an animation (with its target) in the group\r\n * @param animation defines the animation we want to add\r\n * @param target defines the target of the animation\r\n * @returns the TargetedAnimation object\r\n */\r\n public addTargetedAnimation(animation: Animation, target: any): TargetedAnimation {\r\n const targetedAnimation = new TargetedAnimation(this);\r\n targetedAnimation.animation = animation;\r\n targetedAnimation.target = target;\r\n\r\n const keys = animation.getKeys();\r\n if (this._from > keys[0].frame) {\r\n this._from = keys[0].frame;\r\n }\r\n\r\n if (this._to < keys[keys.length - 1].frame) {\r\n this._to = keys[keys.length - 1].frame;\r\n }\r\n\r\n if (this._enableBlending !== null) {\r\n animation.enableBlending = this._enableBlending;\r\n }\r\n\r\n if (this._blendingSpeed !== null) {\r\n animation.blendingSpeed = this._blendingSpeed;\r\n }\r\n\r\n this._targetedAnimations.push(targetedAnimation);\r\n this._shouldStart = true;\r\n\r\n return targetedAnimation;\r\n }\r\n\r\n /**\r\n * Remove an animation from the group\r\n * @param animation defines the animation we want to remove\r\n */\r\n public removeTargetedAnimation(animation: Animation) {\r\n for (let index = this._targetedAnimations.length - 1; index > -1; index--) {\r\n const targetedAnimation = this._targetedAnimations[index];\r\n if (targetedAnimation.animation === animation) {\r\n this._targetedAnimations.splice(index, 1);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * This function will normalize every animation in the group to make sure they all go from beginFrame to endFrame\r\n * It can add constant keys at begin or end\r\n * @param beginFrame defines the new begin frame for all animations or the smallest begin frame of all animations if null (defaults to null)\r\n * @param endFrame defines the new end frame for all animations or the largest end frame of all animations if null (defaults to null)\r\n * @returns the animation group\r\n */\r\n public normalize(beginFrame: Nullable<number> = null, endFrame: Nullable<number> = null): AnimationGroup {\r\n if (beginFrame == null) {\r\n beginFrame = this._from;\r\n }\r\n if (endFrame == null) {\r\n endFrame = this._to;\r\n }\r\n\r\n for (let index = 0; index < this._targetedAnimations.length; index++) {\r\n const targetedAnimation = this._targetedAnimations[index];\r\n const keys = targetedAnimation.animation.getKeys();\r\n const startKey = keys[0];\r\n const endKey = keys[keys.length - 1];\r\n\r\n if (startKey.frame > beginFrame) {\r\n const newKey: IAnimationKey = {\r\n frame: beginFrame,\r\n value: startKey.value,\r\n inTangent: startKey.inTangent,\r\n outTangent: startKey.outTangent,\r\n interpolation: startKey.interpolation,\r\n };\r\n keys.splice(0, 0, newKey);\r\n }\r\n\r\n if (endKey.frame < endFrame) {\r\n const newKey: IAnimationKey = {\r\n frame: endFrame,\r\n value: endKey.value,\r\n inTangent: endKey.inTangent,\r\n outTangent: endKey.outTangent,\r\n interpolation: endKey.interpolation,\r\n };\r\n keys.push(newKey);\r\n }\r\n }\r\n\r\n this._from = beginFrame;\r\n this._to = endFrame;\r\n\r\n return this;\r\n }\r\n\r\n private _animationLoopCount: number;\r\n private _animationLoopFlags: boolean[] = [];\r\n\r\n private _processLoop(animatable: Animatable, targetedAnimation: TargetedAnimation, index: number) {\r\n animatable.onAnimationLoop = () => {\r\n this.onAnimationLoopObservable.notifyObservers(targetedAnimation);\r\n\r\n if (this._animationLoopFlags[index]) {\r\n return;\r\n }\r\n\r\n this._animationLoopFlags[index] = true;\r\n\r\n this._animationLoopCount++;\r\n if (this._animationLoopCount === this._numActiveAnimatables) {\r\n this.onAnimationGroupLoopObservable.notifyObservers(this);\r\n this._animationLoopCount = 0;\r\n this._animationLoopFlags.length = 0;\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * Start all animations on given targets\r\n * @param loop defines if animations must loop\r\n * @param speedRatio defines the ratio to apply to animation speed (1 by default)\r\n * @param from defines the from key (optional)\r\n * @param to defines the to key (optional)\r\n * @param isAdditive defines the additive state for the resulting animatables (optional)\r\n * @returns the current animation group\r\n */\r\n public start(loop = false, speedRatio = 1, from?: number, to?: number, isAdditive?: boolean): AnimationGroup {\r\n if (this._isStarted || this._targetedAnimations.length === 0) {\r\n return this;\r\n }\r\n\r\n this._loopAnimation = loop;\r\n\r\n this._shouldStart = false;\r\n this._animationLoopCount = 0;\r\n this._animationLoopFlags.length = 0;\r\n\r\n for (let index = 0; index < this._targetedAnimations.length; index++) {\r\n const targetedAnimation = this._targetedAnimations[index];\r\n const animatable = this._scene.beginDirectAnimation(\r\n targetedAnimation.target,\r\n [targetedAnimation.animation],\r\n from !== undefined ? from : this._from,\r\n to !== undefined ? to : this._to,\r\n loop,\r\n speedRatio,\r\n undefined,\r\n undefined,\r\n isAdditive !== undefined ? isAdditive : this._isAdditive\r\n );\r\n animatable.weight = this._weight;\r\n animatable.playOrder = this._playOrder;\r\n animatable.onAnimationEnd = () => {\r\n this.onAnimationEndObservable.notifyObservers(targetedAnimation);\r\n this._checkAnimationGroupEnded(animatable);\r\n };\r\n\r\n this._processLoop(animatable, targetedAnimation, index);\r\n this._animatables.push(animatable);\r\n }\r\n\r\n this.syncWithMask();\r\n\r\n this._scene.sortActiveAnimatables();\r\n\r\n this._speedRatio = speedRatio;\r\n\r\n this._isStarted = true;\r\n this._isPaused = false;\r\n\r\n this.onAnimationGroupPlayObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Pause all animations\r\n * @returns the animation group\r\n */\r\n public pause(): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n this._isPaused = true;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.pause();\r\n }\r\n\r\n this.onAnimationGroupPauseObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Play all animations to initial state\r\n * This function will start() the animations if they were not started or will restart() them if they were paused\r\n * @param loop defines if animations must loop\r\n * @returns the animation group\r\n */\r\n public play(loop?: boolean): AnimationGroup {\r\n // only if there are animatable available\r\n if (this.isStarted && this._animatables.length && !this._shouldStart) {\r\n if (loop !== undefined) {\r\n this.loopAnimation = loop;\r\n }\r\n this.restart();\r\n } else {\r\n this.stop();\r\n this.start(loop, this._speedRatio);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Reset all animations to initial state\r\n * @returns the animation group\r\n */\r\n public reset(): AnimationGroup {\r\n if (!this._isStarted) {\r\n this.play();\r\n this.goToFrame(0);\r\n this.stop(true);\r\n return this;\r\n }\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.reset();\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Restart animations from after pausing it\r\n * @returns the animation group\r\n */\r\n public restart(): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.restart();\r\n }\r\n\r\n this.syncWithMask();\r\n\r\n this._isPaused = false;\r\n\r\n this.onAnimationGroupPlayObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Stop all animations\r\n * @param skipOnAnimationEnd defines if the system should not raise onAnimationEnd. Default is false\r\n * @returns the animation group\r\n */\r\n public stop(skipOnAnimationEnd = false): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n const list = this._animatables.slice();\r\n for (let index = 0; index < list.length; index++) {\r\n list[index].stop(undefined, undefined, true, skipOnAnimationEnd);\r\n }\r\n\r\n // We will take care of removing all stopped animatables\r\n let curIndex = 0;\r\n for (let index = 0; index < this._scene._activeAnimatables.length; index++) {\r\n const animatable = this._scene._activeAnimatables[index];\r\n if (animatable._runtimeAnimations.length > 0) {\r\n this._scene._activeAnimatables[curIndex++] = animatable;\r\n } else if (skipOnAnimationEnd) {\r\n // We normally rely on the onAnimationEnd callback (assigned in the start function) to be notified when an animatable\r\n // ends and should be removed from the active animatables array. However, if the animatable is stopped with the skipOnAnimationEnd\r\n // flag set to true, then we need to explicitly remove it from the active animatables array.\r\n this._checkAnimationGroupEnded(animatable, skipOnAnimationEnd);\r\n }\r\n }\r\n this._scene._activeAnimatables.length = curIndex;\r\n\r\n this._isStarted = false;\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Set animation weight for all animatables\r\n *\r\n * @since 6.12.4\r\n * You can pass the weight to the AnimationGroup constructor, or use the weight property to set it after the group has been created,\r\n * making it easier to define the overall animation weight than calling setWeightForAllAnimatables() after the animation group has been started\r\n * @param weight defines the weight to use\r\n * @returns the animationGroup\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-weights\r\n */\r\n public setWeightForAllAnimatables(weight: number): AnimationGroup {\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.weight = weight;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Synchronize and normalize all animatables with a source animatable\r\n * @param root defines the root animatable to synchronize with (null to stop synchronizing)\r\n * @returns the animationGroup\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-weights\r\n */\r\n public syncAllAnimationsWith(root: Nullable<Animatable>): AnimationGroup {\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.syncWith(root);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Goes to a specific frame in this animation group. Note that the animation group must be in playing or paused status\r\n * @param frame the frame number to go to\r\n * @param useWeight defines whether the animation weight should be applied to the image to be jumped to (false by default)\r\n * @returns the animationGroup\r\n */\r\n public goToFrame(frame: number, useWeight = false): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.goToFrame(frame, useWeight);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Helper to get the current frame. This will return 0 if the AnimationGroup is not running, and it might return wrong results if multiple animations are running in different frames.\r\n * @returns current animation frame.\r\n */\r\n public getCurrentFrame(): number {\r\n return this.animatables[0]?.masterFrame || 0;\r\n }\r\n\r\n /**\r\n * Dispose all associated resources\r\n */\r\n public dispose(): void {\r\n if (this.isStarted) {\r\n this.stop();\r\n }\r\n this._targetedAnimations.length = 0;\r\n this._animatables.length = 0;\r\n\r\n // Remove from scene\r\n const index = this._scene.animationGroups.indexOf(this);\r\n\r\n if (index > -1) {\r\n this._scene.animationGroups.splice(index, 1);\r\n }\r\n\r\n if (this._parentContainer) {\r\n const index = this._parentContainer.animationGroups.indexOf(this);\r\n if (index > -1) {\r\n this._parentContainer.animationGroups.splice(index, 1);\r\n }\r\n this._parentContainer = null;\r\n }\r\n\r\n this.onAnimationEndObservable.clear();\r\n this.onAnimationGroupEndObservable.clear();\r\n this.onAnimationGroupPauseObservable.clear();\r\n this.onAnimationGroupPlayObservable.clear();\r\n this.onAnimationLoopObservable.clear();\r\n this.onAnimationGroupLoopObservable.clear();\r\n }\r\n\r\n private _checkAnimationGroupEnded(animatable: Animatable, skipOnAnimationEnd = false) {\r\n // animatable should be taken out of the array\r\n const idx = this._animatables.indexOf(animatable);\r\n if (idx > -1) {\r\n this._animatables.splice(idx, 1);\r\n }\r\n\r\n // all animatables were removed? animation group ended!\r\n if (this._animatables.length === this._targetedAnimations.length - this._numActiveAnimatables) {\r\n this._isStarted = false;\r\n if (!skipOnAnimationEnd) {\r\n this.onAnimationGroupEndObservable.notifyObservers(this);\r\n }\r\n this._animatables.length = 0;\r\n }\r\n }\r\n\r\n /**\r\n * Clone the current animation group and returns a copy\r\n * @param newName defines the name of the new group\r\n * @param targetConverter defines an optional function used to convert current animation targets to new ones\r\n * @param cloneAnimations defines if the animations should be cloned or referenced\r\n * @returns the new animation group\r\n */\r\n public clone(newName: string, targetConverter?: (oldTarget: any) => any, cloneAnimations = false): AnimationGroup {\r\n const newGroup = new AnimationGroup(newName || this.name, this._scene, this._weight, this._playOrder);\r\n\r\n newGroup._from = this.from;\r\n newGroup._to = this.to;\r\n newGroup._speedRatio = this.speedRatio;\r\n newGroup._loopAnimation = this.loopAnimation;\r\n newGroup._isAdditive = this.isAdditive;\r\n newGroup._enableBlending = this.enableBlending;\r\n newGroup._blendingSpeed = this.blendingSpeed;\r\n newGroup.metadata = this.metadata;\r\n newGroup.mask = this.mask;\r\n\r\n for (const targetAnimation of this._targetedAnimations) {\r\n newGroup.addTargetedAnimation(\r\n cloneAnimations ? targetAnimation.animation.clone() : targetAnimation.animation,\r\n targetConverter ? targetConverter(targetAnimation.target) : targetAnimation.target\r\n );\r\n }\r\n\r\n return newGroup;\r\n }\r\n\r\n /**\r\n * Serializes the animationGroup to an object\r\n * @returns Serialized object\r\n */\r\n public serialize(): any {\r\n const serializationObject: any = {};\r\n\r\n serializationObject.name = this.name;\r\n serializationObject.from = this.from;\r\n serializationObject.to = this.to;\r\n serializationObject.speedRatio = this.speedRatio;\r\n serializationObject.loopAnimation = this.loopAnimation;\r\n serializationObject.isAdditive = this.isAdditive;\r\n serializationObject.weight = this.weight;\r\n serializationObject.playOrder = this.playOrder;\r\n serializationObject.enableBlending = this.enableBlending;\r\n serializationObject.blendingSpeed = this.blendingSpeed;\r\n\r\n serializationObject.targetedAnimations = [];\r\n for (let targetedAnimationIndex = 0; targetedAnimationIndex < this.targetedAnimations.length; targetedAnimationIndex++) {\r\n const targetedAnimation = this.targetedAnimations[targetedAnimationIndex];\r\n serializationObject.targetedAnimations[targetedAnimationIndex] = targetedAnimation.serialize();\r\n }\r\n\r\n if (Tags && Tags.HasTags(this)) {\r\n serializationObject.tags = Tags.GetTags(this);\r\n }\r\n\r\n // Metadata\r\n if (this.metadata) {\r\n serializationObject.metadata = this.metadata;\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n // Statics\r\n /**\r\n * Returns a new AnimationGroup object parsed from the source provided.\r\n * @param parsedAnimationGroup defines the source\r\n * @param scene defines the scene that will receive the animationGroup\r\n * @param nodeMap a map of node.id to node in this scene, to accelerate node lookup\r\n * @returns a new AnimationGroup\r\n */\r\n public static Parse(parsedAnimationGroup: any, scene: Scene, nodeMap?: Map<Node[\"id\"], Node>): AnimationGroup {\r\n const animationGroup = new AnimationGroup(parsedAnimationGroup.name, scene, parsedAnimationGroup.weight, parsedAnimationGroup.playOrder);\r\n for (let i = 0; i < parsedAnimationGroup.targetedAnimations.length; i++) {\r\n const targetedAnimation = parsedAnimationGroup.targetedAnimations[i];\r\n const animation = Animation.Parse(targetedAnimation.animation);\r\n const id = targetedAnimation.targetId;\r\n if (targetedAnimation.animation.property === \"influence\") {\r\n // morph target animation\r\n const morphTarget = scene.getMorphTargetById(id);\r\n if (morphTarget) {\r\n animationGroup.addTargetedAnimation(animation, morphTarget);\r\n }\r\n } else {\r\n const targetNode = nodeMap ? nodeMap.get(id) : scene.getNodeById(id);\r\n\r\n if (targetNode != null) {\r\n animationGroup.addTargetedAnimation(animation, targetNode);\r\n }\r\n }\r\n }\r\n\r\n if (Tags) {\r\n Tags.AddTagsTo(animationGroup, parsedAnimationGroup.tags);\r\n }\r\n\r\n if (parsedAnimationGroup.from !== null && parsedAnimationGroup.to !== null) {\r\n animationGroup.normalize(parsedAnimationGroup.from, parsedAnimationGroup.to);\r\n }\r\n\r\n if (parsedAnimationGroup.speedRatio !== undefined) {\r\n animationGroup._speedRatio = parsedAnimationGroup.speedRatio;\r\n }\r\n if (parsedAnimationGroup.loopAnimation !== undefined) {\r\n animationGroup._loopAnimation = parsedAnimationGroup.loopAnimation;\r\n }\r\n\r\n if (parsedAnimationGroup.isAdditive !== undefined) {\r\n animationGroup._isAdditive = parsedAnimationGroup.isAdditive;\r\n }\r\n\r\n if (parsedAnimationGroup.weight !== undefined) {\r\n animationGroup._weight = parsedAnimationGroup.weight;\r\n }\r\n\r\n if (parsedAnimationGroup.playOrder !== undefined) {\r\n animationGroup._playOrder = parsedAnimationGroup.playOrder;\r\n }\r\n\r\n if (parsedAnimationGroup.enableBlending !== undefined) {\r\n animationGroup._enableBlending = parsedAnimationGroup.enableBlending;\r\n }\r\n\r\n if (parsedAnimationGroup.blendingSpeed !== undefined) {\r\n animationGroup._blendingSpeed = parsedAnimationGroup.blendingSpeed;\r\n }\r\n\r\n if (parsedAnimationGroup.metadata !== undefined) {\r\n animationGroup.metadata = parsedAnimationGroup.metadata;\r\n }\r\n\r\n return animationGroup;\r\n }\r\n\r\n /**\r\n * Convert the keyframes for all animations belonging to the group to be relative to a given reference frame.\r\n * @param sourceAnimationGroup defines the AnimationGroup containing animations to convert\r\n * @param referenceFrame defines the frame that keyframes in the range will be relative to (default: 0)\r\n * @param range defines the name of the AnimationRange belonging to the animations in the group to convert\r\n * @param cloneOriginal defines whether or not to clone the group and convert the clone or convert the original group (default is false)\r\n * @param clonedName defines the name of the resulting cloned AnimationGroup if cloneOriginal is true\r\n * @returns a new AnimationGroup if cloneOriginal is true or the original AnimationGroup if cloneOriginal is false\r\n */\r\n public static MakeAnimationAdditive(sourceAnimationGroup: AnimationGroup, referenceFrame: number, range?: string, cloneOriginal?: boolean, clonedName?: string): AnimationGroup;\r\n\r\n /**\r\n * Convert the keyframes for all animations belonging to the group to be relative to a given reference frame.\r\n * @param sourceAnimationGroup defines the AnimationGroup containing animations to convert\r\n * @param options defines the options to use when converting keyframes\r\n * @returns a new AnimationGroup if options.cloneOriginalAnimationGroup is true or the original AnimationGroup if options.cloneOriginalAnimationGroup is false\r\n */\r\n public static MakeAnimationAdditive(sourceAnimationGroup: AnimationGroup, options?: IMakeAnimationGroupAdditiveOptions): AnimationGroup;\r\n\r\n /** @internal */\r\n public static MakeAnimationAdditive(\r\n sourceAnimationGroup: AnimationGroup,\r\n referenceFrameOrOptions?: number | IMakeAnimationGroupAdditiveOptions,\r\n range?: string,\r\n cloneOriginal = false,\r\n clonedName?: string\r\n ): AnimationGroup {\r\n let options: IMakeAnimationGroupAdditiveOptions;\r\n\r\n if (typeof referenceFrameOrOptions === \"object\") {\r\n options = referenceFrameOrOptions;\r\n } else {\r\n options = {\r\n referenceFrame: referenceFrameOrOptions,\r\n range: range,\r\n cloneOriginalAnimationGroup: cloneOriginal,\r\n clonedAnimationName: clonedName,\r\n };\r\n }\r\n\r\n let animationGroup = sourceAnimationGroup;\r\n if (options.cloneOriginalAnimationGroup) {\r\n animationGroup = sourceAnimationGroup.clone(options.clonedAnimationGroupName || animationGroup.name);\r\n }\r\n\r\n const targetedAnimations = animationGroup.targetedAnimations;\r\n for (let index = 0; index < targetedAnimations.length; index++) {\r\n const targetedAnimation = targetedAnimations[index];\r\n targetedAnimation.animation = Animation.MakeAnimationAdditive(targetedAnimation.animation, options);\r\n }\r\n\r\n animationGroup.isAdditive = true;\r\n\r\n if (options.clipKeys) {\r\n // We need to recalculate the from/to frames for the animation group because some keys may have been removed\r\n let from = Number.MAX_VALUE;\r\n let to = -Number.MAX_VALUE;\r\n\r\n const targetedAnimations = animationGroup.targetedAnimations;\r\n for (let index = 0; index < targetedAnimations.length; index++) {\r\n const targetedAnimation = targetedAnimations[index];\r\n const animation = targetedAnimation.animation;\r\n const keys = animation.getKeys();\r\n\r\n if (from > keys[0].frame) {\r\n from = keys[0].frame;\r\n }\r\n\r\n if (to < keys[keys.length - 1].frame) {\r\n to = keys[keys.length - 1].frame;\r\n }\r\n }\r\n\r\n animationGroup._from = from;\r\n animationGroup._to = to;\r\n }\r\n\r\n return animationGroup;\r\n }\r\n\r\n /**\r\n * Creates a new animation, keeping only the keys that are inside a given key range\r\n * @param sourceAnimationGroup defines the animation group on which to operate\r\n * @param fromKey defines the lower bound of the range\r\n * @param toKey defines the upper bound of the range\r\n * @param name defines the name of the new animation group. If not provided, use the same name as animationGroup\r\n * @param dontCloneAnimations defines whether or not the animations should be cloned before clipping the keys. Default is false, so animations will be cloned\r\n * @returns a new animation group stripped from all the keys outside the given range\r\n */\r\n public static ClipKeys(sourceAnimationGroup: AnimationGroup, fromKey: number, toKey: number, name?: string, dontCloneAnimations?: boolean): AnimationGroup {\r\n const animationGroup = sourceAnimationGroup.clone(name || sourceAnimationGroup.name);\r\n\r\n return AnimationGroup.ClipKeysInPlace(animationGroup, fromKey, toKey, dontCloneAnimations);\r\n }\r\n\r\n /**\r\n * Updates an existing animation, keeping only the keys that are inside a given key range\r\n * @param animationGroup defines the animation group on which to operate\r\n * @param fromKey defines the lower bound of the range\r\n * @param toKey defines the upper bound of the range\r\n * @param dontCloneAnimations defines whether or not the animations should be cloned before clipping the keys. Default is false, so animations will be cloned\r\n * @returns the animationGroup stripped from all the keys outside the given range\r\n */\r\n public static ClipKeysInPlace(animationGroup: AnimationGroup, fromKey: number, toKey: number, dontCloneAnimations?: boolean): AnimationGroup {\r\n return AnimationGroup.ClipInPlace(animationGroup, fromKey, toKey, dontCloneAnimations, false);\r\n }\r\n\r\n /**\r\n * Creates a new animation, keeping only the frames that are inside a given frame range\r\n * @param sourceAnimationGroup defines the animation group on which to operate\r\n * @param fromFrame defines the lower bound of the range\r\n * @param toFrame defines the upper bound of the range\r\n * @param name defines the name of the new animation group. If not provided, use the same name as animationGroup\r\n * @param dontCloneAnimations defines whether or not the animations should be cloned before clipping the frames. Default is false, so animations will be cloned\r\n * @returns a new animation group stripped from all the frames outside the given range\r\n */\r\n public static ClipFrames(sourceAnimationGroup: AnimationGroup, fromFrame: number, toFrame: number, name?: string, dontCloneAnimations?: boolean): AnimationGroup {\r\n const animationGroup = sourceAnimationGroup.clone(name || sourceAnimationGroup.name);\r\n\r\n return AnimationGroup.ClipFramesInPlace(animationGroup, fromFrame, toFrame, dontCloneAnimations);\r\n }\r\n\r\n /**\r\n * Updates an existing animation, keeping only the frames that are inside a given frame range\r\n * @param animationGroup defines the animation group on which to operate\r\n * @param fromFrame defines the lower bound of the range\r\n * @param toFrame defines the upper bound of the range\r\n * @param dontCloneAnimations defines whether or not the animations should be cloned before clipping the frames. Default is false, so animations will be cloned\r\n * @returns the animationGroup stripped from all the frames outside the given range\r\n */\r\n public static ClipFramesInPlace(animationGroup: AnimationGroup, fromFrame: number, toFrame: number, dontCloneAnimations?: boolean): AnimationGroup {\r\n return AnimationGroup.ClipInPlace(animationGroup, fromFrame, toFrame, dontCloneAnimations, true);\r\n }\r\n\r\n /**\r\n * Updates an existing animation, keeping only the keys that are inside a given key or frame range\r\n * @param animationGroup defines the animation group on which to operate\r\n * @param start defines the lower bound of the range\r\n * @param end defines the upper bound of the range\r\n * @param dontCloneAnimations defines whether or not the animations should be cloned before clipping the keys. Default is false, so animations will be cloned\r\n * @param useFrame defines if the range is defined by frame numbers or key indices (default is false which means use key indices)\r\n * @returns the animationGroup stripped from all the keys outside the given range\r\n */\r\n public static ClipInPlace(animationGroup: AnimationGroup, start: number, end: number, dontCloneAnimations?: boolean, useFrame = false): AnimationGroup {\r\n let from = Number.MAX_VALUE;\r\n let to = -Number.MAX_VALUE;\r\n\r\n const targetedAnimations = animationGroup.targetedAnimations;\r\n for (let index = 0; index < targetedAnimations.length; index++) {\r\n const targetedAnimation = targetedAnimations[index];\r\n const animation = dontCloneAnimations ? targetedAnimation.animation : targetedAnimation.animation.clone();\r\n\r\n if (useFrame) {\r\n // Make sure we have keys corresponding to the bounds of the frame range\r\n animation.createKeyForFrame(start);\r\n animation.createKeyForFrame(end);\r\n }\r\n\r\n const keys = animation.getKeys();\r\n const newKeys: IAnimationKey[] = [];\r\n\r\n let startFrame = Number.MAX_VALUE;\r\n for (let k = 0; k < keys.length; k++) {\r\n const key = keys[k];\r\n if ((!useFrame && k >= start && k <= end) || (useFrame && key.frame >= start && key.frame <= end)) {\r\n const newKey: IAnimationKey = {\r\n frame: key.frame,\r\n value: key.value.clone ? key.value.clone() : key.value,\r\n inTangent: key.inTangent,\r\n outTangent: key.outTangent,\r\n interpolation: key.interpolation,\r\n lockedTangent: key.lockedTangent,\r\n };\r\n if (startFrame === Number.MAX_VALUE) {\r\n startFrame = newKey.frame;\r\n }\r\n newKey.frame -= startFrame;\r\n newKeys.push(newKey);\r\n }\r\n }\r\n\r\n if (newKeys.length === 0) {\r\n targetedAnimations.splice(index, 1);\r\n index--;\r\n continue;\r\n }\r\n\r\n if (from > newKeys[0].frame) {\r\n from = newKeys[0].frame;\r\n }\r\n\r\n if (to < newKeys[newKeys.length - 1].frame) {\r\n to = newKeys[newKeys.length - 1].frame;\r\n }\r\n\r\n animation.setKeys(newKeys, true);\r\n targetedAnimation.animation = animation; // in case the animation has been cloned\r\n }\r\n\r\n animationGroup._from = from;\r\n animationGroup._to = to;\r\n\r\n return animationGroup;\r\n }\r\n\r\n /**\r\n * Returns the string \"AnimationGroup\"\r\n * @returns \"AnimationGroup\"\r\n */\r\n public getClassName(): string {\r\n return \"AnimationGroup\";\r\n }\r\n\r\n /**\r\n * Creates a detailed string about the object\r\n * @param fullDetails defines if the output string will support multiple levels of logging within scene loading\r\n * @returns a string representing the object\r\n */\r\n public toString(fullDetails?: boolean): string {\r\n let ret = \"Name: \" + this.name;\r\n ret += \", type: \" + this.getClassName();\r\n if (fullDetails) {\r\n ret += \", from: \" + this._from;\r\n ret += \", to: \" + this._to;\r\n ret += \", isStarted: \" + this._isStarted;\r\n ret += \", speedRatio: \" + this._speedRatio;\r\n ret += \", targetedAnimations length: \" + this._targetedAnimations.length;\r\n ret += \", animatables length: \" + this._animatables;\r\n }\r\n return ret;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"animationGroup.js","sourceRoot":"","sources":["../../../../dev/core/src/Animations/animationGroup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,iBAAiB,EAAE,qCAAoC;AAEhE;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAgB1B;;;OAGG;IACI,YAAY;QACf,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACH,YAA4B,M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,EAAE,CAAC;gBACzC,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;YAC3C,CAAC;YAED,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YACjC,iBAAiB,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC,wCAAwC;QACrF,CAAC;QAED,cAAc,CAAC,KAAK,GAAG,IAAI,CAAC;QAC5B,cAAc,CAAC,GAAG,GAAG,EAAE,CAAC;QAExB,OAAO,cAAc,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACI,YAAY;QACf,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,WAAqB;QACjC,IAAI,GAAG,GAAG,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;QAC/B,GAAG,IAAI,UAAU,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACxC,IAAI,WAAW,EAAE,CAAC;YACd,GAAG,IAAI,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;YAC/B,GAAG,IAAI,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC;YAC3B,GAAG,IAAI,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC;YACzC,GAAG,IAAI,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC;YAC3C,GAAG,IAAI,+BAA+B,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC;YACzE,GAAG,IAAI,wBAAwB,GAAG,IAAI,CAAC,YAAY,CAAC;QACxD,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;CACJ","sourcesContent":["import type { Animatable } from \"./animatable.core\";\r\nimport { Animation } from \"./animation\";\r\nimport type { IMakeAnimationAdditiveOptions } from \"./animation\";\r\nimport type { IAnimationKey } from \"./animationKey\";\r\n\r\nimport type { Scene, IDisposable } from \"../scene\";\r\nimport { Observable } from \"../Misc/observable\";\r\nimport type { Nullable } from \"../types\";\r\nimport { EngineStore } from \"../Engines/engineStore\";\r\nimport type { Node } from \"../node\";\r\n\r\nimport { Tags } from \"../Misc/tags\";\r\nimport type { AnimationGroupMask } from \"./animationGroupMask\";\r\nimport \"./animatable\";\r\nimport type { IAssetContainer } from \"core/IAssetContainer\";\r\nimport { UniqueIdGenerator } from \"core/Misc/uniqueIdGenerator\";\r\n\r\n/**\r\n * This class defines the direct association between an animation and a target\r\n */\r\nexport class TargetedAnimation {\r\n /**\r\n * Animation to perform\r\n */\r\n public animation: Animation;\r\n\r\n /**\r\n * Target to animate\r\n */\r\n public target: any;\r\n\r\n /**\r\n * Gets or sets the unique id of the targeted animation\r\n */\r\n public readonly uniqueId = UniqueIdGenerator.UniqueId;\r\n\r\n /**\r\n * Returns the string \"TargetedAnimation\"\r\n * @returns \"TargetedAnimation\"\r\n */\r\n public getClassName(): string {\r\n return \"TargetedAnimation\";\r\n }\r\n\r\n /**\r\n * Creates a new targeted animation\r\n * @param parent The animation group to which the animation belongs\r\n */\r\n constructor(public readonly parent: AnimationGroup) {}\r\n\r\n /**\r\n * Serialize the object\r\n * @returns the JSON object representing the current entity\r\n */\r\n public serialize(): any {\r\n const serializationObject: any = {};\r\n serializationObject.animation = this.animation.serialize();\r\n serializationObject.targetId = this.target.id;\r\n\r\n return serializationObject;\r\n }\r\n}\r\n\r\n/**\r\n * Options to be used when creating an additive group animation\r\n */\r\nexport interface IMakeAnimationGroupAdditiveOptions extends IMakeAnimationAdditiveOptions {\r\n /**\r\n * Defines if the animation group should be cloned or not (default is false)\r\n */\r\n cloneOriginalAnimationGroup?: boolean;\r\n /**\r\n * The name of the cloned animation group if cloneOriginalAnimationGroup is true\r\n */\r\n clonedAnimationGroupName?: string;\r\n}\r\n\r\n/**\r\n * Use this class to create coordinated animations on multiple targets\r\n */\r\nexport class AnimationGroup implements IDisposable {\r\n private _scene: Scene;\r\n\r\n private _targetedAnimations = new Array<TargetedAnimation>();\r\n private _animatables = new Array<Animatable>();\r\n private _from = Number.MAX_VALUE;\r\n private _to = -Number.MAX_VALUE;\r\n private _isStarted: boolean;\r\n private _isPaused: boolean;\r\n private _speedRatio = 1;\r\n private _loopAnimation = false;\r\n private _isAdditive = false;\r\n private _weight = -1;\r\n private _playOrder = 0;\r\n private _enableBlending: Nullable<boolean> = null;\r\n private _blendingSpeed: Nullable<number> = null;\r\n private _numActiveAnimatables = 0;\r\n private _shouldStart = true;\r\n public doNotSerialize = false;\r\n\r\n /** @internal */\r\n public _parentContainer: Nullable<IAssetContainer> = null;\r\n\r\n /**\r\n * Gets or sets the unique id of the node\r\n */\r\n public uniqueId: number;\r\n\r\n /**\r\n * This observable will notify when one animation have ended\r\n */\r\n public onAnimationEndObservable = new Observable<TargetedAnimation>();\r\n\r\n /**\r\n * Observer raised when one animation loops\r\n */\r\n public onAnimationLoopObservable = new Observable<TargetedAnimation>();\r\n\r\n /**\r\n * Observer raised when all animations have looped\r\n */\r\n public onAnimationGroupLoopObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * This observable will notify when all animations have ended.\r\n */\r\n public onAnimationGroupEndObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * This observable will notify when all animations have paused.\r\n */\r\n public onAnimationGroupPauseObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * This observable will notify when all animations are playing.\r\n */\r\n public onAnimationGroupPlayObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * Gets or sets an object used to store user defined information for the node\r\n */\r\n public metadata: any = null;\r\n\r\n private _mask: Nullable<AnimationGroupMask> = null;\r\n\r\n /**\r\n * Gets or sets the mask associated with this animation group. This mask is used to filter which objects should be animated.\r\n */\r\n public get mask() {\r\n return this._mask;\r\n }\r\n\r\n public set mask(value: Nullable<AnimationGroupMask>) {\r\n if (this._mask === value) {\r\n return;\r\n }\r\n\r\n this._mask = value;\r\n\r\n this.syncWithMask(true);\r\n }\r\n\r\n /**\r\n * Makes sure that the animations are either played or stopped according to the animation group mask.\r\n * Note however that the call won't have any effect if the animation group has not been started yet.\r\n * @param forceUpdate If true, forces to loop over the animatables even if no mask is defined (used internally, you shouldn't need to use it). Default: false.\r\n */\r\n public syncWithMask(forceUpdate = false) {\r\n if (!this.mask && !forceUpdate) {\r\n this._numActiveAnimatables = this._targetedAnimations.length;\r\n return;\r\n }\r\n\r\n this._numActiveAnimatables = 0;\r\n\r\n for (let i = 0; i < this._animatables.length; ++i) {\r\n const animatable = this._animatables[i];\r\n\r\n if (!this.mask || this.mask.disabled || this.mask.retainsTarget(animatable.target.name)) {\r\n this._numActiveAnimatables++;\r\n if (animatable.paused) {\r\n animatable.restart();\r\n }\r\n } else {\r\n if (!animatable.paused) {\r\n animatable.pause();\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Removes all animations for the targets not retained by the animation group mask.\r\n * Use this function if you know you won't need those animations anymore and if you want to free memory.\r\n */\r\n public removeUnmaskedAnimations() {\r\n if (!this.mask || this.mask.disabled) {\r\n return;\r\n }\r\n\r\n // Removes all animatables (in case the animation group has already been started)\r\n for (let i = 0; i < this._animatables.length; ++i) {\r\n const animatable = this._animatables[i];\r\n\r\n if (!this.mask.retainsTarget(animatable.target.name)) {\r\n animatable.stop();\r\n this._animatables.splice(i, 1);\r\n --i;\r\n }\r\n }\r\n\r\n // Removes the targeted animations\r\n for (let index = 0; index < this._targetedAnimations.length; index++) {\r\n const targetedAnimation = this._targetedAnimations[index];\r\n\r\n if (!this.mask.retainsTarget(targetedAnimation.target.name)) {\r\n this._targetedAnimations.splice(index, 1);\r\n --index;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets the first frame\r\n */\r\n public get from(): number {\r\n return this._from;\r\n }\r\n\r\n public set from(value: number) {\r\n if (this._from === value) {\r\n return;\r\n }\r\n\r\n this._from = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.fromFrame = this._from;\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets the last frame\r\n */\r\n public get to(): number {\r\n return this._to;\r\n }\r\n\r\n public set to(value: number) {\r\n if (this._to === value) {\r\n return;\r\n }\r\n\r\n this._to = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.toFrame = this._to;\r\n }\r\n }\r\n\r\n /**\r\n * Define if the animations are started\r\n */\r\n public get isStarted(): boolean {\r\n return this._isStarted;\r\n }\r\n\r\n /**\r\n * Gets a value indicating that the current group is playing\r\n */\r\n public get isPlaying(): boolean {\r\n return this._isStarted && !this._isPaused;\r\n }\r\n\r\n /**\r\n * Gets or sets the speed ratio to use for all animations\r\n */\r\n public get speedRatio(): number {\r\n return this._speedRatio;\r\n }\r\n\r\n /**\r\n * Gets or sets the speed ratio to use for all animations\r\n */\r\n public set speedRatio(value: number) {\r\n if (this._speedRatio === value) {\r\n return;\r\n }\r\n\r\n this._speedRatio = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.speedRatio = this._speedRatio;\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets if all animations should loop or not\r\n */\r\n public get loopAnimation(): boolean {\r\n return this._loopAnimation;\r\n }\r\n\r\n public set loopAnimation(value: boolean) {\r\n if (this._loopAnimation === value) {\r\n return;\r\n }\r\n\r\n this._loopAnimation = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.loopAnimation = this._loopAnimation;\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets if all animations should be evaluated additively\r\n */\r\n public get isAdditive(): boolean {\r\n return this._isAdditive;\r\n }\r\n\r\n public set isAdditive(value: boolean) {\r\n if (this._isAdditive === value) {\r\n return;\r\n }\r\n\r\n this._isAdditive = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.isAdditive = this._isAdditive;\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets the weight to apply to all animations of the group\r\n */\r\n public get weight(): number {\r\n return this._weight;\r\n }\r\n\r\n public set weight(value: number) {\r\n if (this._weight === value) {\r\n return;\r\n }\r\n\r\n this._weight = value;\r\n this.setWeightForAllAnimatables(this._weight);\r\n }\r\n\r\n /**\r\n * Gets the targeted animations for this animation group\r\n */\r\n public get targetedAnimations(): Array<TargetedAnimation> {\r\n return this._targetedAnimations;\r\n }\r\n\r\n /**\r\n * returning the list of animatables controlled by this animation group.\r\n */\r\n public get animatables(): Array<Animatable> {\r\n return this._animatables;\r\n }\r\n\r\n /**\r\n * Gets the list of target animations\r\n */\r\n public get children() {\r\n return this._targetedAnimations;\r\n }\r\n\r\n /**\r\n * Gets or sets the order of play of the animation group (default: 0)\r\n */\r\n public get playOrder() {\r\n return this._playOrder;\r\n }\r\n\r\n public set playOrder(value: number) {\r\n if (this._playOrder === value) {\r\n return;\r\n }\r\n\r\n this._playOrder = value;\r\n\r\n if (this._animatables.length > 0) {\r\n for (let i = 0; i < this._animatables.length; i++) {\r\n this._animatables[i].playOrder = this._playOrder;\r\n }\r\n\r\n this._scene.sortActiveAnimatables();\r\n }\r\n }\r\n\r\n /**\r\n * Allows the animations of the animation group to blend with current running animations\r\n * Note that a null value means that each animation will use their own existing blending configuration (Animation.enableBlending)\r\n */\r\n public get enableBlending() {\r\n return this._enableBlending;\r\n }\r\n\r\n public set enableBlending(value: Nullable<boolean>) {\r\n if (this._enableBlending === value) {\r\n return;\r\n }\r\n\r\n this._enableBlending = value;\r\n\r\n if (value !== null) {\r\n for (let i = 0; i < this._targetedAnimations.length; ++i) {\r\n this._targetedAnimations[i].animation.enableBlending = value;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets the animation blending speed\r\n * Note that a null value means that each animation will use their own existing blending configuration (Animation.blendingSpeed)\r\n */\r\n public get blendingSpeed() {\r\n return this._blendingSpeed;\r\n }\r\n\r\n public set blendingSpeed(value: Nullable<number>) {\r\n if (this._blendingSpeed === value) {\r\n return;\r\n }\r\n\r\n this._blendingSpeed = value;\r\n\r\n if (value !== null) {\r\n for (let i = 0; i < this._targetedAnimations.length; ++i) {\r\n this._targetedAnimations[i].animation.blendingSpeed = value;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets the length (in seconds) of the animation group\r\n * This function assumes that all animations are played at the same framePerSecond speed!\r\n * Note: you can only call this method after you've added at least one targeted animation!\r\n * @param from Starting frame range (default is AnimationGroup.from)\r\n * @param to Ending frame range (default is AnimationGroup.to)\r\n * @returns The length in seconds\r\n */\r\n public getLength(from?: number, to?: number): number {\r\n from = from ?? this._from;\r\n to = to ?? this._to;\r\n\r\n const fps = this.targetedAnimations[0].animation.framePerSecond * this._speedRatio;\r\n\r\n return (to - from) / fps;\r\n }\r\n\r\n /**\r\n * Merge the array of animation groups into a new animation group\r\n * @param animationGroups List of animation groups to merge\r\n * @param disposeSource If true, animation groups will be disposed after being merged (default: true)\r\n * @param normalize If true, animation groups will be normalized before being merged, so that all animations have the same \"from\" and \"to\" frame (default: false)\r\n * @param weight Weight for the new animation group. If not provided, it will inherit the weight from the first animation group of the array\r\n * @returns The new animation group or null if no animation groups were passed\r\n */\r\n public static MergeAnimationGroups(animationGroups: Array<AnimationGroup>, disposeSource = true, normalize = false, weight?: number): Nullable<AnimationGroup> {\r\n if (animationGroups.length === 0) {\r\n return null;\r\n }\r\n\r\n weight = weight ?? animationGroups[0].weight;\r\n\r\n let beginFrame = Number.MAX_VALUE;\r\n let endFrame = -Number.MAX_VALUE;\r\n\r\n if (normalize) {\r\n for (const animationGroup of animationGroups) {\r\n if (animationGroup.from < beginFrame) {\r\n beginFrame = animationGroup.from;\r\n }\r\n\r\n if (animationGroup.to > endFrame) {\r\n endFrame = animationGroup.to;\r\n }\r\n }\r\n }\r\n\r\n const mergedAnimationGroup = new AnimationGroup(animationGroups[0].name + \"_merged\", animationGroups[0]._scene, weight);\r\n\r\n for (const animationGroup of animationGroups) {\r\n if (normalize) {\r\n animationGroup.normalize(beginFrame, endFrame);\r\n }\r\n\r\n for (const targetedAnimation of animationGroup.targetedAnimations) {\r\n mergedAnimationGroup.addTargetedAnimation(targetedAnimation.animation, targetedAnimation.target);\r\n }\r\n\r\n if (disposeSource) {\r\n animationGroup.dispose();\r\n }\r\n }\r\n\r\n return mergedAnimationGroup;\r\n }\r\n\r\n /**\r\n * Gets the scene the animation group belongs to\r\n * @returns The scene the animation group belongs to\r\n */\r\n public getScene(): Scene {\r\n return this._scene;\r\n }\r\n\r\n /**\r\n * Instantiates a new Animation Group.\r\n * This helps managing several animations at once.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/groupAnimations\r\n * @param name Defines the name of the group\r\n * @param scene Defines the scene the group belongs to\r\n * @param weight Defines the weight to use for animations in the group (-1.0 by default, meaning \"no weight\")\r\n * @param playOrder Defines the order of play of the animation group (default is 0)\r\n */\r\n public constructor(\r\n /** The name of the animation group */\r\n public name: string,\r\n scene: Nullable<Scene> = null,\r\n weight = -1,\r\n playOrder = 0\r\n ) {\r\n this._scene = scene || EngineStore.LastCreatedScene!;\r\n this._weight = weight;\r\n this._playOrder = playOrder;\r\n this.uniqueId = this._scene.getUniqueId();\r\n\r\n this._scene.addAnimationGroup(this);\r\n }\r\n\r\n /**\r\n * Add an animation (with its target) in the group\r\n * @param animation defines the animation we want to add\r\n * @param target defines the target of the animation\r\n * @returns the TargetedAnimation object\r\n */\r\n public addTargetedAnimation(animation: Animation, target: any): TargetedAnimation {\r\n const targetedAnimation = new TargetedAnimation(this);\r\n targetedAnimation.animation = animation;\r\n targetedAnimation.target = target;\r\n\r\n const keys = animation.getKeys();\r\n if (this._from > keys[0].frame) {\r\n this._from = keys[0].frame;\r\n }\r\n\r\n if (this._to < keys[keys.length - 1].frame) {\r\n this._to = keys[keys.length - 1].frame;\r\n }\r\n\r\n if (this._enableBlending !== null) {\r\n animation.enableBlending = this._enableBlending;\r\n }\r\n\r\n if (this._blendingSpeed !== null) {\r\n animation.blendingSpeed = this._blendingSpeed;\r\n }\r\n\r\n this._targetedAnimations.push(targetedAnimation);\r\n this._shouldStart = true;\r\n\r\n return targetedAnimation;\r\n }\r\n\r\n /**\r\n * Remove an animation from the group\r\n * @param animation defines the animation we want to remove\r\n */\r\n public removeTargetedAnimation(animation: Animation) {\r\n for (let index = this._targetedAnimations.length - 1; index > -1; index--) {\r\n const targetedAnimation = this._targetedAnimations[index];\r\n if (targetedAnimation.animation === animation) {\r\n this._targetedAnimations.splice(index, 1);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * This function will normalize every animation in the group to make sure they all go from beginFrame to endFrame\r\n * It can add constant keys at begin or end\r\n * @param beginFrame defines the new begin frame for all animations or the smallest begin frame of all animations if null (defaults to null)\r\n * @param endFrame defines the new end frame for all animations or the largest end frame of all animations if null (defaults to null)\r\n * @returns the animation group\r\n */\r\n public normalize(beginFrame: Nullable<number> = null, endFrame: Nullable<number> = null): AnimationGroup {\r\n if (beginFrame == null) {\r\n beginFrame = this._from;\r\n }\r\n if (endFrame == null) {\r\n endFrame = this._to;\r\n }\r\n\r\n for (let index = 0; index < this._targetedAnimations.length; index++) {\r\n const targetedAnimation = this._targetedAnimations[index];\r\n const keys = targetedAnimation.animation.getKeys();\r\n const startKey = keys[0];\r\n const endKey = keys[keys.length - 1];\r\n\r\n if (startKey.frame > beginFrame) {\r\n const newKey: IAnimationKey = {\r\n frame: beginFrame,\r\n value: startKey.value,\r\n inTangent: startKey.inTangent,\r\n outTangent: startKey.outTangent,\r\n interpolation: startKey.interpolation,\r\n };\r\n keys.splice(0, 0, newKey);\r\n }\r\n\r\n if (endKey.frame < endFrame) {\r\n const newKey: IAnimationKey = {\r\n frame: endFrame,\r\n value: endKey.value,\r\n inTangent: endKey.inTangent,\r\n outTangent: endKey.outTangent,\r\n interpolation: endKey.interpolation,\r\n };\r\n keys.push(newKey);\r\n }\r\n }\r\n\r\n this._from = beginFrame;\r\n this._to = endFrame;\r\n\r\n return this;\r\n }\r\n\r\n private _animationLoopCount: number;\r\n private _animationLoopFlags: boolean[] = [];\r\n\r\n private _processLoop(animatable: Animatable, targetedAnimation: TargetedAnimation, index: number) {\r\n animatable.onAnimationLoop = () => {\r\n this.onAnimationLoopObservable.notifyObservers(targetedAnimation);\r\n\r\n if (this._animationLoopFlags[index]) {\r\n return;\r\n }\r\n\r\n this._animationLoopFlags[index] = true;\r\n\r\n this._animationLoopCount++;\r\n if (this._animationLoopCount === this._numActiveAnimatables) {\r\n this.onAnimationGroupLoopObservable.notifyObservers(this);\r\n this._animationLoopCount = 0;\r\n this._animationLoopFlags.length = 0;\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * Start all animations on given targets\r\n * @param loop defines if animations must loop\r\n * @param speedRatio defines the ratio to apply to animation speed (1 by default)\r\n * @param from defines the from key (optional)\r\n * @param to defines the to key (optional)\r\n * @param isAdditive defines the additive state for the resulting animatables (optional)\r\n * @returns the current animation group\r\n */\r\n public start(loop = false, speedRatio = 1, from?: number, to?: number, isAdditive?: boolean): AnimationGroup {\r\n if (this._isStarted || this._targetedAnimations.length === 0) {\r\n return this;\r\n }\r\n\r\n this._loopAnimation = loop;\r\n\r\n this._shouldStart = false;\r\n this._animationLoopCount = 0;\r\n this._animationLoopFlags.length = 0;\r\n\r\n for (let index = 0; index < this._targetedAnimations.length; index++) {\r\n const targetedAnimation = this._targetedAnimations[index];\r\n const animatable = this._scene.beginDirectAnimation(\r\n targetedAnimation.target,\r\n [targetedAnimation.animation],\r\n from !== undefined ? from : this._from,\r\n to !== undefined ? to : this._to,\r\n loop,\r\n speedRatio,\r\n undefined,\r\n undefined,\r\n isAdditive !== undefined ? isAdditive : this._isAdditive\r\n );\r\n animatable.weight = this._weight;\r\n animatable.playOrder = this._playOrder;\r\n animatable.onAnimationEnd = () => {\r\n this.onAnimationEndObservable.notifyObservers(targetedAnimation);\r\n this._checkAnimationGroupEnded(animatable);\r\n };\r\n\r\n this._processLoop(animatable, targetedAnimation, index);\r\n this._animatables.push(animatable);\r\n }\r\n\r\n this.syncWithMask();\r\n\r\n this._scene.sortActiveAnimatables();\r\n\r\n this._speedRatio = speedRatio;\r\n\r\n this._isStarted = true;\r\n this._isPaused = false;\r\n\r\n this.onAnimationGroupPlayObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Pause all animations\r\n * @returns the animation group\r\n */\r\n public pause(): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n this._isPaused = true;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.pause();\r\n }\r\n\r\n this.onAnimationGroupPauseObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Play all animations to initial state\r\n * This function will start() the animations if they were not started or will restart() them if they were paused\r\n * @param loop defines if animations must loop\r\n * @returns the animation group\r\n */\r\n public play(loop?: boolean): AnimationGroup {\r\n // only if there are animatable available\r\n if (this.isStarted && this._animatables.length && !this._shouldStart) {\r\n if (loop !== undefined) {\r\n this.loopAnimation = loop;\r\n }\r\n this.restart();\r\n } else {\r\n this.stop();\r\n this.start(loop, this._speedRatio);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Reset all animations to initial state\r\n * @returns the animation group\r\n */\r\n public reset(): AnimationGroup {\r\n if (!this._isStarted) {\r\n this.play();\r\n this.goToFrame(0);\r\n this.stop(true);\r\n return this;\r\n }\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.reset();\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Restart animations from after pausing it\r\n * @returns the animation group\r\n */\r\n public restart(): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.restart();\r\n }\r\n\r\n this.syncWithMask();\r\n\r\n this._isPaused = false;\r\n\r\n this.onAnimationGroupPlayObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Stop all animations\r\n * @param skipOnAnimationEnd defines if the system should not raise onAnimationEnd. Default is false\r\n * @returns the animation group\r\n */\r\n public stop(skipOnAnimationEnd = false): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n const list = this._animatables.slice();\r\n for (let index = 0; index < list.length; index++) {\r\n list[index].stop(undefined, undefined, true, skipOnAnimationEnd);\r\n }\r\n\r\n // We will take care of removing all stopped animatables\r\n let curIndex = 0;\r\n for (let index = 0; index < this._scene._activeAnimatables.length; index++) {\r\n const animatable = this._scene._activeAnimatables[index];\r\n if (animatable._runtimeAnimations.length > 0) {\r\n this._scene._activeAnimatables[curIndex++] = animatable;\r\n } else if (skipOnAnimationEnd) {\r\n // We normally rely on the onAnimationEnd callback (assigned in the start function) to be notified when an animatable\r\n // ends and should be removed from the active animatables array. However, if the animatable is stopped with the skipOnAnimationEnd\r\n // flag set to true, then we need to explicitly remove it from the active animatables array.\r\n this._checkAnimationGroupEnded(animatable, skipOnAnimationEnd);\r\n }\r\n }\r\n this._scene._activeAnimatables.length = curIndex;\r\n\r\n this._isStarted = false;\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Set animation weight for all animatables\r\n *\r\n * @since 6.12.4\r\n * You can pass the weight to the AnimationGroup constructor, or use the weight property to set it after the group has been created,\r\n * making it easier to define the overall animation weight than calling setWeightForAllAnimatables() after the animation group has been started\r\n * @param weight defines the weight to use\r\n * @returns the animationGroup\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-weights\r\n */\r\n public setWeightForAllAnimatables(weight: number): AnimationGroup {\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.weight = weight;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Synchronize and normalize all animatables with a source animatable\r\n * @param root defines the root animatable to synchronize with (null to stop synchronizing)\r\n * @returns the animationGroup\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-weights\r\n */\r\n public syncAllAnimationsWith(root: Nullable<Animatable>): AnimationGroup {\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.syncWith(root);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Goes to a specific frame in this animation group. Note that the animation group must be in playing or paused status\r\n * @param frame the frame number to go to\r\n * @param useWeight defines whether the animation weight should be applied to the image to be jumped to (false by default)\r\n * @returns the animationGroup\r\n */\r\n public goToFrame(frame: number, useWeight = false): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.goToFrame(frame, useWeight);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Helper to get the current frame. This will return 0 if the AnimationGroup is not running, and it might return wrong results if multiple animations are running in different frames.\r\n * @returns current animation frame.\r\n */\r\n public getCurrentFrame(): number {\r\n return this.animatables[0]?.masterFrame || 0;\r\n }\r\n\r\n /**\r\n * Dispose all associated resources\r\n */\r\n public dispose(): void {\r\n if (this.isStarted) {\r\n this.stop();\r\n }\r\n this._targetedAnimations.length = 0;\r\n this._animatables.length = 0;\r\n\r\n // Remove from scene\r\n this._scene.removeAnimationGroup(this);\r\n\r\n if (this._parentContainer) {\r\n const index = this._parentContainer.animationGroups.indexOf(this);\r\n if (index > -1) {\r\n this._parentContainer.animationGroups.splice(index, 1);\r\n }\r\n this._parentContainer = null;\r\n }\r\n\r\n this.onAnimationEndObservable.clear();\r\n this.onAnimationGroupEndObservable.clear();\r\n this.onAnimationGroupPauseObservable.clear();\r\n this.onAnimationGroupPlayObservable.clear();\r\n this.onAnimationLoopObservable.clear();\r\n this.onAnimationGroupLoopObservable.clear();\r\n }\r\n\r\n private _checkAnimationGroupEnded(animatable: Animatable, skipOnAnimationEnd = false) {\r\n // animatable should be taken out of the array\r\n const idx = this._animatables.indexOf(animatable);\r\n if (idx > -1) {\r\n this._animatables.splice(idx, 1);\r\n }\r\n\r\n // all animatables were removed? animation group ended!\r\n if (this._animatables.length === this._targetedAnimations.length - this._numActiveAnimatables) {\r\n this._isStarted = false;\r\n if (!skipOnAnimationEnd) {\r\n this.onAnimationGroupEndObservable.notifyObservers(this);\r\n }\r\n this._animatables.length = 0;\r\n }\r\n }\r\n\r\n /**\r\n * Clone the current animation group and returns a copy\r\n * @param newName defines the name of the new group\r\n * @param targetConverter defines an optional function used to convert current animation targets to new ones\r\n * @param cloneAnimations defines if the animations should be cloned or referenced\r\n * @returns the new animation group\r\n */\r\n public clone(newName: string, targetConverter?: (oldTarget: any) => any, cloneAnimations = false): AnimationGroup {\r\n const newGroup = new AnimationGroup(newName || this.name, this._scene, this._weight, this._playOrder);\r\n\r\n newGroup._from = this.from;\r\n newGroup._to = this.to;\r\n newGroup._speedRatio = this.speedRatio;\r\n newGroup._loopAnimation = this.loopAnimation;\r\n newGroup._isAdditive = this.isAdditive;\r\n newGroup._enableBlending = this.enableBlending;\r\n newGroup._blendingSpeed = this.blendingSpeed;\r\n newGroup.metadata = this.metadata;\r\n newGroup.mask = this.mask;\r\n\r\n for (const targetAnimation of this._targetedAnimations) {\r\n newGroup.addTargetedAnimation(\r\n cloneAnimations ? targetAnimation.animation.clone() : targetAnimation.animation,\r\n targetConverter ? targetConverter(targetAnimation.target) : targetAnimation.target\r\n );\r\n }\r\n\r\n return newGroup;\r\n }\r\n\r\n /**\r\n * Serializes the animationGroup to an object\r\n * @returns Serialized object\r\n */\r\n public serialize(): any {\r\n const serializationObject: any = {};\r\n\r\n serializationObject.name = this.name;\r\n serializationObject.from = this.from;\r\n serializationObject.to = this.to;\r\n serializationObject.speedRatio = this.speedRatio;\r\n serializationObject.loopAnimation = this.loopAnimation;\r\n serializationObject.isAdditive = this.isAdditive;\r\n serializationObject.weight = this.weight;\r\n serializationObject.playOrder = this.playOrder;\r\n serializationObject.enableBlending = this.enableBlending;\r\n serializationObject.blendingSpeed = this.blendingSpeed;\r\n\r\n serializationObject.targetedAnimations = [];\r\n for (let targetedAnimationIndex = 0; targetedAnimationIndex < this.targetedAnimations.length; targetedAnimationIndex++) {\r\n const targetedAnimation = this.targetedAnimations[targetedAnimationIndex];\r\n serializationObject.targetedAnimations[targetedAnimationIndex] = targetedAnimation.serialize();\r\n }\r\n\r\n if (Tags && Tags.HasTags(this)) {\r\n serializationObject.tags = Tags.GetTags(this);\r\n }\r\n\r\n // Metadata\r\n if (this.metadata) {\r\n serializationObject.metadata = this.metadata;\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n // Statics\r\n /**\r\n * Returns a new AnimationGroup object parsed from the source provided.\r\n * @param parsedAnimationGroup defines the source\r\n * @param scene defines the scene that will receive the animationGroup\r\n * @param nodeMap a map of node.id to node in this scene, to accelerate node lookup\r\n * @returns a new AnimationGroup\r\n */\r\n public static Parse(parsedAnimationGroup: any, scene: Scene, nodeMap?: Map<Node[\"id\"], Node>): AnimationGroup {\r\n const animationGroup = new AnimationGroup(parsedAnimationGroup.name, scene, parsedAnimationGroup.weight, parsedAnimationGroup.playOrder);\r\n for (let i = 0; i < parsedAnimationGroup.targetedAnimations.length; i++) {\r\n const targetedAnimation = parsedAnimationGroup.targetedAnimations[i];\r\n const animation = Animation.Parse(targetedAnimation.animation);\r\n const id = targetedAnimation.targetId;\r\n if (targetedAnimation.animation.property === \"influence\") {\r\n // morph target animation\r\n const morphTarget = scene.getMorphTargetById(id);\r\n if (morphTarget) {\r\n animationGroup.addTargetedAnimation(animation, morphTarget);\r\n }\r\n } else {\r\n const targetNode = nodeMap ? nodeMap.get(id) : scene.getNodeById(id);\r\n\r\n if (targetNode != null) {\r\n animationGroup.addTargetedAnimation(animation, targetNode);\r\n }\r\n }\r\n }\r\n\r\n if (Tags) {\r\n Tags.AddTagsTo(animationGroup, parsedAnimationGroup.tags);\r\n }\r\n\r\n if (parsedAnimationGroup.from !== null && parsedAnimationGroup.to !== null) {\r\n animationGroup.normalize(parsedAnimationGroup.from, parsedAnimationGroup.to);\r\n }\r\n\r\n if (parsedAnimationGroup.speedRatio !== undefined) {\r\n animationGroup._speedRatio = parsedAnimationGroup.speedRatio;\r\n }\r\n if (parsedAnimationGroup.loopAnimation !== undefined) {\r\n animationGroup._loopAnimation = parsedAnimationGroup.loopAnimation;\r\n }\r\n\r\n if (parsedAnimationGroup.isAdditive !== undefined) {\r\n animationGroup._isAdditive = parsedAnimationGroup.isAdditive;\r\n }\r\n\r\n if (parsedAnimationGroup.weight !== undefined) {\r\n animationGroup._weight = parsedAnimationGroup.weight;\r\n }\r\n\r\n if (parsedAnimationGroup.playOrder !== undefined) {\r\n animationGroup._playOrder = parsedAnimationGroup.playOrder;\r\n }\r\n\r\n if (parsedAnimationGroup.enableBlending !== undefined) {\r\n animationGroup._enableBlending = parsedAnimationGroup.enableBlending;\r\n }\r\n\r\n if (parsedAnimationGroup.blendingSpeed !== undefined) {\r\n animationGroup._blendingSpeed = parsedAnimationGroup.blendingSpeed;\r\n }\r\n\r\n if (parsedAnimationGroup.metadata !== undefined) {\r\n animationGroup.metadata = parsedAnimationGroup.metadata;\r\n }\r\n\r\n return animationGroup;\r\n }\r\n\r\n /**\r\n * Convert the keyframes for all animations belonging to the group to be relative to a given reference frame.\r\n * @param sourceAnimationGroup defines the AnimationGroup containing animations to convert\r\n * @param referenceFrame defines the frame that keyframes in the range will be relative to (default: 0)\r\n * @param range defines the name of the AnimationRange belonging to the animations in the group to convert\r\n * @param cloneOriginal defines whether or not to clone the group and convert the clone or convert the original group (default is false)\r\n * @param clonedName defines the name of the resulting cloned AnimationGroup if cloneOriginal is true\r\n * @returns a new AnimationGroup if cloneOriginal is true or the original AnimationGroup if cloneOriginal is false\r\n */\r\n public static MakeAnimationAdditive(sourceAnimationGroup: AnimationGroup, referenceFrame: number, range?: string, cloneOriginal?: boolean, clonedName?: string): AnimationGroup;\r\n\r\n /**\r\n * Convert the keyframes for all animations belonging to the group to be relative to a given reference frame.\r\n * @param sourceAnimationGroup defines the AnimationGroup containing animations to convert\r\n * @param options defines the options to use when converting keyframes\r\n * @returns a new AnimationGroup if options.cloneOriginalAnimationGroup is true or the original AnimationGroup if options.cloneOriginalAnimationGroup is false\r\n */\r\n public static MakeAnimationAdditive(sourceAnimationGroup: AnimationGroup, options?: IMakeAnimationGroupAdditiveOptions): AnimationGroup;\r\n\r\n /** @internal */\r\n public static MakeAnimationAdditive(\r\n sourceAnimationGroup: AnimationGroup,\r\n referenceFrameOrOptions?: number | IMakeAnimationGroupAdditiveOptions,\r\n range?: string,\r\n cloneOriginal = false,\r\n clonedName?: string\r\n ): AnimationGroup {\r\n let options: IMakeAnimationGroupAdditiveOptions;\r\n\r\n if (typeof referenceFrameOrOptions === \"object\") {\r\n options = referenceFrameOrOptions;\r\n } else {\r\n options = {\r\n referenceFrame: referenceFrameOrOptions,\r\n range: range,\r\n cloneOriginalAnimationGroup: cloneOriginal,\r\n clonedAnimationName: clonedName,\r\n };\r\n }\r\n\r\n let animationGroup = sourceAnimationGroup;\r\n if (options.cloneOriginalAnimationGroup) {\r\n animationGroup = sourceAnimationGroup.clone(options.clonedAnimationGroupName || animationGroup.name);\r\n }\r\n\r\n const targetedAnimations = animationGroup.targetedAnimations;\r\n for (let index = 0; index < targetedAnimations.length; index++) {\r\n const targetedAnimation = targetedAnimations[index];\r\n targetedAnimation.animation = Animation.MakeAnimationAdditive(targetedAnimation.animation, options);\r\n }\r\n\r\n animationGroup.isAdditive = true;\r\n\r\n if (options.clipKeys) {\r\n // We need to recalculate the from/to frames for the animation group because some keys may have been removed\r\n let from = Number.MAX_VALUE;\r\n let to = -Number.MAX_VALUE;\r\n\r\n const targetedAnimations = animationGroup.targetedAnimations;\r\n for (let index = 0; index < targetedAnimations.length; index++) {\r\n const targetedAnimation = targetedAnimations[index];\r\n const animation = targetedAnimation.animation;\r\n const keys = animation.getKeys();\r\n\r\n if (from > keys[0].frame) {\r\n from = keys[0].frame;\r\n }\r\n\r\n if (to < keys[keys.length - 1].frame) {\r\n to = keys[keys.length - 1].frame;\r\n }\r\n }\r\n\r\n animationGroup._from = from;\r\n animationGroup._to = to;\r\n }\r\n\r\n return animationGroup;\r\n }\r\n\r\n /**\r\n * Creates a new animation, keeping only the keys that are inside a given key range\r\n * @param sourceAnimationGroup defines the animation group on which to operate\r\n * @param fromKey defines the lower bound of the range\r\n * @param toKey defines the upper bound of the range\r\n * @param name defines the name of the new animation group. If not provided, use the same name as animationGroup\r\n * @param dontCloneAnimations defines whether or not the animations should be cloned before clipping the keys. Default is false, so animations will be cloned\r\n * @returns a new animation group stripped from all the keys outside the given range\r\n */\r\n public static ClipKeys(sourceAnimationGroup: AnimationGroup, fromKey: number, toKey: number, name?: string, dontCloneAnimations?: boolean): AnimationGroup {\r\n const animationGroup = sourceAnimationGroup.clone(name || sourceAnimationGroup.name);\r\n\r\n return AnimationGroup.ClipKeysInPlace(animationGroup, fromKey, toKey, dontCloneAnimations);\r\n }\r\n\r\n /**\r\n * Updates an existing animation, keeping only the keys that are inside a given key range\r\n * @param animationGroup defines the animation group on which to operate\r\n * @param fromKey defines the lower bound of the range\r\n * @param toKey defines the upper bound of the range\r\n * @param dontCloneAnimations defines whether or not the animations should be cloned before clipping the keys. Default is false, so animations will be cloned\r\n * @returns the animationGroup stripped from all the keys outside the given range\r\n */\r\n public static ClipKeysInPlace(animationGroup: AnimationGroup, fromKey: number, toKey: number, dontCloneAnimations?: boolean): AnimationGroup {\r\n return AnimationGroup.ClipInPlace(animationGroup, fromKey, toKey, dontCloneAnimations, false);\r\n }\r\n\r\n /**\r\n * Creates a new animation, keeping only the frames that are inside a given frame range\r\n * @param sourceAnimationGroup defines the animation group on which to operate\r\n * @param fromFrame defines the lower bound of the range\r\n * @param toFrame defines the upper bound of the range\r\n * @param name defines the name of the new animation group. If not provided, use the same name as animationGroup\r\n * @param dontCloneAnimations defines whether or not the animations should be cloned before clipping the frames. Default is false, so animations will be cloned\r\n * @returns a new animation group stripped from all the frames outside the given range\r\n */\r\n public static ClipFrames(sourceAnimationGroup: AnimationGroup, fromFrame: number, toFrame: number, name?: string, dontCloneAnimations?: boolean): AnimationGroup {\r\n const animationGroup = sourceAnimationGroup.clone(name || sourceAnimationGroup.name);\r\n\r\n return AnimationGroup.ClipFramesInPlace(animationGroup, fromFrame, toFrame, dontCloneAnimations);\r\n }\r\n\r\n /**\r\n * Updates an existing animation, keeping only the frames that are inside a given frame range\r\n * @param animationGroup defines the animation group on which to operate\r\n * @param fromFrame defines the lower bound of the range\r\n * @param toFrame defines the upper bound of the range\r\n * @param dontCloneAnimations defines whether or not the animations should be cloned before clipping the frames. Default is false, so animations will be cloned\r\n * @returns the animationGroup stripped from all the frames outside the given range\r\n */\r\n public static ClipFramesInPlace(animationGroup: AnimationGroup, fromFrame: number, toFrame: number, dontCloneAnimations?: boolean): AnimationGroup {\r\n return AnimationGroup.ClipInPlace(animationGroup, fromFrame, toFrame, dontCloneAnimations, true);\r\n }\r\n\r\n /**\r\n * Updates an existing animation, keeping only the keys that are inside a given key or frame range\r\n * @param animationGroup defines the animation group on which to operate\r\n * @param start defines the lower bound of the range\r\n * @param end defines the upper bound of the range\r\n * @param dontCloneAnimations defines whether or not the animations should be cloned before clipping the keys. Default is false, so animations will be cloned\r\n * @param useFrame defines if the range is defined by frame numbers or key indices (default is false which means use key indices)\r\n * @returns the animationGroup stripped from all the keys outside the given range\r\n */\r\n public static ClipInPlace(animationGroup: AnimationGroup, start: number, end: number, dontCloneAnimations?: boolean, useFrame = false): AnimationGroup {\r\n let from = Number.MAX_VALUE;\r\n let to = -Number.MAX_VALUE;\r\n\r\n const targetedAnimations = animationGroup.targetedAnimations;\r\n for (let index = 0; index < targetedAnimations.length; index++) {\r\n const targetedAnimation = targetedAnimations[index];\r\n const animation = dontCloneAnimations ? targetedAnimation.animation : targetedAnimation.animation.clone();\r\n\r\n if (useFrame) {\r\n // Make sure we have keys corresponding to the bounds of the frame range\r\n animation.createKeyForFrame(start);\r\n animation.createKeyForFrame(end);\r\n }\r\n\r\n const keys = animation.getKeys();\r\n const newKeys: IAnimationKey[] = [];\r\n\r\n let startFrame = Number.MAX_VALUE;\r\n for (let k = 0; k < keys.length; k++) {\r\n const key = keys[k];\r\n if ((!useFrame && k >= start && k <= end) || (useFrame && key.frame >= start && key.frame <= end)) {\r\n const newKey: IAnimationKey = {\r\n frame: key.frame,\r\n value: key.value.clone ? key.value.clone() : key.value,\r\n inTangent: key.inTangent,\r\n outTangent: key.outTangent,\r\n interpolation: key.interpolation,\r\n lockedTangent: key.lockedTangent,\r\n };\r\n if (startFrame === Number.MAX_VALUE) {\r\n startFrame = newKey.frame;\r\n }\r\n newKey.frame -= startFrame;\r\n newKeys.push(newKey);\r\n }\r\n }\r\n\r\n if (newKeys.length === 0) {\r\n targetedAnimations.splice(index, 1);\r\n index--;\r\n continue;\r\n }\r\n\r\n if (from > newKeys[0].frame) {\r\n from = newKeys[0].frame;\r\n }\r\n\r\n if (to < newKeys[newKeys.length - 1].frame) {\r\n to = newKeys[newKeys.length - 1].frame;\r\n }\r\n\r\n animation.setKeys(newKeys, true);\r\n targetedAnimation.animation = animation; // in case the animation has been cloned\r\n }\r\n\r\n animationGroup._from = from;\r\n animationGroup._to = to;\r\n\r\n return animationGroup;\r\n }\r\n\r\n /**\r\n * Returns the string \"AnimationGroup\"\r\n * @returns \"AnimationGroup\"\r\n */\r\n public getClassName(): string {\r\n return \"AnimationGroup\";\r\n }\r\n\r\n /**\r\n * Creates a detailed string about the object\r\n * @param fullDetails defines if the output string will support multiple levels of logging within scene loading\r\n * @returns a string representing the object\r\n */\r\n public toString(fullDetails?: boolean): string {\r\n let ret = \"Name: \" + this.name;\r\n ret += \", type: \" + this.getClassName();\r\n if (fullDetails) {\r\n ret += \", from: \" + this._from;\r\n ret += \", to: \" + this._to;\r\n ret += \", isStarted: \" + this._isStarted;\r\n ret += \", speedRatio: \" + this._speedRatio;\r\n ret += \", targetedAnimations length: \" + this._targetedAnimations.length;\r\n ret += \", animatables length: \" + this._animatables;\r\n }\r\n return ret;\r\n }\r\n}\r\n"]}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Behavior } from "../behavior.js";
|
|
2
2
|
import { EasingFunction } from "../../Animations/easing.js";
|
|
3
3
|
import type { Camera } from "../../Cameras/camera.js";
|
|
4
|
+
import type { IColor3Like, IColor4Like, IMatrixLike, IQuaternionLike, IVector2Like, IVector3Like } from "../../Maths/math.like.js";
|
|
5
|
+
export type AllowedAnimValue = number | IVector2Like | IVector3Like | IQuaternionLike | IMatrixLike | IColor3Like | IColor4Like | SizeLike | undefined;
|
|
4
6
|
/**
|
|
5
7
|
* Animate camera property changes with an interpolation effect
|
|
6
8
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors/cameraBehaviors
|
|
@@ -47,6 +49,10 @@ export declare class InterpolatingBehavior<C extends Camera = Camera> implements
|
|
|
47
49
|
* Stops and removes all animations
|
|
48
50
|
*/
|
|
49
51
|
stopAllAnimations(): void;
|
|
50
|
-
updateProperties(properties: Map<
|
|
51
|
-
animatePropertiesAsync(properties: Map<
|
|
52
|
+
updateProperties<K extends keyof C>(properties: Map<K, AllowedAnimValue>): void;
|
|
53
|
+
animatePropertiesAsync<K extends keyof C>(properties: Map<K, AllowedAnimValue>, transitionDuration?: number, easingFn?: EasingFunction): Promise<void>;
|
|
52
54
|
}
|
|
55
|
+
export type SizeLike = {
|
|
56
|
+
width: number;
|
|
57
|
+
height: number;
|
|
58
|
+
};
|
|
@@ -70,8 +70,10 @@ export class InterpolatingBehavior {
|
|
|
70
70
|
}
|
|
71
71
|
updateProperties(properties) {
|
|
72
72
|
properties.forEach((value, key) => {
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
if (value !== undefined) {
|
|
74
|
+
const animatable = this._animatables.get(String(key));
|
|
75
|
+
animatable && (animatable.target = value);
|
|
76
|
+
}
|
|
75
77
|
});
|
|
76
78
|
}
|
|
77
79
|
async animatePropertiesAsync(properties, transitionDuration = this.transitionDuration, easingFn = this.easingFunction) {
|
|
@@ -92,14 +94,64 @@ export class InterpolatingBehavior {
|
|
|
92
94
|
}
|
|
93
95
|
};
|
|
94
96
|
properties.forEach((value, key) => {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
if (value !== undefined) {
|
|
98
|
+
const propertyName = String(key);
|
|
99
|
+
const animation = Animation.CreateAnimation(propertyName, GetAnimationType(value), 60, easingFn);
|
|
100
|
+
const animatable = Animation.TransitionTo(propertyName, value, camera, scene, 60, animation, transitionDuration, () => checkClear(propertyName));
|
|
101
|
+
if (animatable) {
|
|
102
|
+
this._animatables.set(propertyName, animatable);
|
|
103
|
+
}
|
|
99
104
|
}
|
|
100
105
|
});
|
|
101
106
|
});
|
|
102
107
|
return await promise;
|
|
103
108
|
}
|
|
104
109
|
}
|
|
110
|
+
// Structural type-guards (no instanceof)
|
|
111
|
+
function IsQuaternionLike(v) {
|
|
112
|
+
return v != null && typeof v.x === "number" && typeof v.y === "number" && typeof v.z === "number" && typeof v.w === "number";
|
|
113
|
+
}
|
|
114
|
+
function IsMatrixLike(v) {
|
|
115
|
+
return v != null && (Array.isArray(v.m) || typeof v.m === "object");
|
|
116
|
+
}
|
|
117
|
+
function IsVector3Like(v) {
|
|
118
|
+
return v != null && typeof v.x === "number" && typeof v.y === "number" && typeof v.z === "number";
|
|
119
|
+
}
|
|
120
|
+
function IsVector2Like(v) {
|
|
121
|
+
return v != null && typeof v.x === "number" && typeof v.y === "number";
|
|
122
|
+
}
|
|
123
|
+
function IsColor3Like(v) {
|
|
124
|
+
return v != null && typeof v.r === "number" && typeof v.g === "number" && typeof v.b === "number";
|
|
125
|
+
}
|
|
126
|
+
function IsColor4Like(v) {
|
|
127
|
+
return v != null && typeof v.r === "number" && typeof v.g === "number" && typeof v.b === "number" && typeof v.a === "number";
|
|
128
|
+
}
|
|
129
|
+
function IsSizeLike(v) {
|
|
130
|
+
return v != null && typeof v.width === "number" && typeof v.height === "number";
|
|
131
|
+
}
|
|
132
|
+
const GetAnimationType = (value) => {
|
|
133
|
+
if (IsQuaternionLike(value)) {
|
|
134
|
+
return Animation.ANIMATIONTYPE_QUATERNION;
|
|
135
|
+
}
|
|
136
|
+
if (IsMatrixLike(value)) {
|
|
137
|
+
return Animation.ANIMATIONTYPE_MATRIX;
|
|
138
|
+
}
|
|
139
|
+
if (IsVector3Like(value)) {
|
|
140
|
+
return Animation.ANIMATIONTYPE_VECTOR3;
|
|
141
|
+
}
|
|
142
|
+
if (IsVector2Like(value)) {
|
|
143
|
+
return Animation.ANIMATIONTYPE_VECTOR2;
|
|
144
|
+
}
|
|
145
|
+
if (IsColor3Like(value)) {
|
|
146
|
+
return Animation.ANIMATIONTYPE_COLOR3;
|
|
147
|
+
}
|
|
148
|
+
if (IsColor4Like(value)) {
|
|
149
|
+
return Animation.ANIMATIONTYPE_COLOR4;
|
|
150
|
+
}
|
|
151
|
+
if (IsSizeLike(value)) {
|
|
152
|
+
return Animation.ANIMATIONTYPE_SIZE;
|
|
153
|
+
}
|
|
154
|
+
// Fallback to float for numbers and unknown shapes
|
|
155
|
+
return Animation.ANIMATIONTYPE_FLOAT;
|
|
156
|
+
};
|
|
105
157
|
//# sourceMappingURL=interpolatingBehavior.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interpolatingBehavior.js","sourceRoot":"","sources":["../../../../../dev/core/src/Behaviors/Cameras/interpolatingBehavior.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAGpE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAGvD;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IAC9B;;OAEG;IACH,IAAW,IAAI;QACX,OAAO,eAAe,CAAC;IAC3B,CAAC;IAqBD;;OAEG;IACH;QAtBA;;WAEG;QACI,mBAAc,GAAmB,IAAI,SAAS,EAAE,CAAC;QAExD;;WAEG;QACI,eAAU,GAAG,cAAc,CAAC,oBAAoB,CAAC;QAExD;;WAEG;QACI,uBA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gBAC3C,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,OAAO,CAAC;IACzB,CAAC;CACJ","sourcesContent":["import type { Behavior } from \"../behavior\";\r\nimport { CubicEase, EasingFunction } from \"../../Animations/easing\";\r\nimport type { Nullable } from \"../../types\";\r\nimport type { Animatable } from \"../../Animations/animatable.core\";\r\nimport { Animation } from \"../../Animations/animation\";\r\nimport type { Camera } from \"../../Cameras/camera\";\r\n\r\n/**\r\n * Animate camera property changes with an interpolation effect\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors/cameraBehaviors\r\n */\r\nexport class InterpolatingBehavior<C extends Camera = Camera> implements Behavior<C> {\r\n /**\r\n * Gets the name of the behavior.\r\n */\r\n public get name(): string {\r\n return \"Interpolating\";\r\n }\r\n\r\n /**\r\n * The easing function to use for interpolation\r\n */\r\n public easingFunction: EasingFunction = new CubicEase();\r\n\r\n /**\r\n * The easing mode (default is EASINGMODE_EASEINOUT)\r\n */\r\n public easingMode = EasingFunction.EASINGMODE_EASEINOUT;\r\n\r\n /**\r\n * Duration of the animation in milliseconds\r\n */\r\n public transitionDuration = 450;\r\n\r\n private _attachedCamera: Nullable<C> = null;\r\n private _animatables: Map<string, Animatable> = new Map<string, Animatable>();\r\n private _promiseResolve?: () => void;\r\n\r\n /**\r\n * Initializes the behavior\r\n */\r\n constructor() {\r\n this.easingFunction.setEasingMode(this.easingMode);\r\n }\r\n\r\n /**\r\n * Initializes the behavior\r\n */\r\n public init(): void {\r\n // Nothing to do on init\r\n }\r\n\r\n /**\r\n * Attaches the behavior to a camera\r\n * @param camera The camera to attach to\r\n */\r\n public attach(camera: C): void {\r\n this._attachedCamera = camera;\r\n }\r\n\r\n /**\r\n * Detaches the behavior from the camera\r\n */\r\n public detach(): void {\r\n if (!this._attachedCamera) {\r\n return;\r\n }\r\n\r\n this.stopAllAnimations();\r\n this._attachedCamera = null;\r\n }\r\n\r\n public get isInterpolating(): boolean {\r\n return this._animatables.size > 0;\r\n }\r\n\r\n /**\r\n * Stops and removes all animations\r\n */\r\n public stopAllAnimations(): void {\r\n if (this._attachedCamera) {\r\n this._animatables.forEach((animatable) => animatable.stop());\r\n }\r\n this._animatables.clear();\r\n this._promiseResolve?.();\r\n this._promiseResolve = undefined;\r\n }\r\n\r\n public updateProperties(properties: Map<string, any>): void {\r\n properties.forEach((value, key) => {\r\n const animatable = this._animatables.get(key);\r\n animatable && (animatable.target = value);\r\n });\r\n }\r\n\r\n public async animatePropertiesAsync(\r\n properties: Map<string, any>,\r\n transitionDuration: number = this.transitionDuration,\r\n easingFn: EasingFunction = this.easingFunction\r\n ): Promise<void> {\r\n const promise = new Promise<void>((resolve) => {\r\n this._promiseResolve = resolve;\r\n this.stopAllAnimations();\r\n if (!this._attachedCamera) {\r\n this._promiseResolve = undefined;\r\n return resolve();\r\n }\r\n const camera = this._attachedCamera;\r\n const scene = camera.getScene();\r\n\r\n const checkClear = (animation: string) => {\r\n this._animatables.delete(animation);\r\n if (this._animatables.size === 0) {\r\n this._promiseResolve = undefined;\r\n resolve();\r\n }\r\n };\r\n\r\n properties.forEach((value, key) => {\r\n const animation = Animation.CreateAnimation(key, Animation.ANIMATIONTYPE_FLOAT, 60, easingFn);\r\n const animatable = Animation.TransitionTo(key, value, camera, scene, 60, animation, transitionDuration, () => checkClear(key));\r\n if (animatable) {\r\n this._animatables.set(key, animatable);\r\n }\r\n });\r\n });\r\n return await promise;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"interpolatingBehavior.js","sourceRoot":"","sources":["../../../../../dev/core/src/Behaviors/Cameras/interpolatingBehavior.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAGpE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAMvD;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IAC9B;;OAEG;IACH,IAAW,IAAI;QACX,OAAO,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1C,CAAC;IACD,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC,oBAAoB,CAAC;IAC1C,CAAC;IACD,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QACpB,OAAO,SAAS,CAAC,kBAAkB,CAAC;IACxC,CAAC;IAED,mDAAmD;IACnD,OAAO,SAAS,CAAC,mBAAmB,CAAC;AACzC,CAAC,CAAC","sourcesContent":["import type { Behavior } from \"../behavior\";\r\nimport { CubicEase, EasingFunction } from \"../../Animations/easing\";\r\nimport type { Nullable } from \"../../types\";\r\nimport type { Animatable } from \"../../Animations/animatable.core\";\r\nimport { Animation } from \"../../Animations/animation\";\r\nimport type { Camera } from \"../../Cameras/camera\";\r\nimport type { IColor3Like, IColor4Like, IMatrixLike, IQuaternionLike, IVector2Like, IVector3Like } from \"../../Maths/math.like\";\r\n\r\nexport type AllowedAnimValue = number | IVector2Like | IVector3Like | IQuaternionLike | IMatrixLike | IColor3Like | IColor4Like | SizeLike | undefined;\r\n\r\n/**\r\n * Animate camera property changes with an interpolation effect\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors/cameraBehaviors\r\n */\r\nexport class InterpolatingBehavior<C extends Camera = Camera> implements Behavior<C> {\r\n /**\r\n * Gets the name of the behavior.\r\n */\r\n public get name(): string {\r\n return \"Interpolating\";\r\n }\r\n\r\n /**\r\n * The easing function to use for interpolation\r\n */\r\n public easingFunction: EasingFunction = new CubicEase();\r\n\r\n /**\r\n * The easing mode (default is EASINGMODE_EASEINOUT)\r\n */\r\n public easingMode = EasingFunction.EASINGMODE_EASEINOUT;\r\n\r\n /**\r\n * Duration of the animation in milliseconds\r\n */\r\n public transitionDuration = 450;\r\n\r\n private _attachedCamera: Nullable<C> = null;\r\n private _animatables: Map<string, Animatable> = new Map<string, Animatable>();\r\n private _promiseResolve?: () => void;\r\n\r\n /**\r\n * Initializes the behavior\r\n */\r\n constructor() {\r\n this.easingFunction.setEasingMode(this.easingMode);\r\n }\r\n\r\n /**\r\n * Initializes the behavior\r\n */\r\n public init(): void {\r\n // Nothing to do on init\r\n }\r\n\r\n /**\r\n * Attaches the behavior to a camera\r\n * @param camera The camera to attach to\r\n */\r\n public attach(camera: C): void {\r\n this._attachedCamera = camera;\r\n }\r\n\r\n /**\r\n * Detaches the behavior from the camera\r\n */\r\n public detach(): void {\r\n if (!this._attachedCamera) {\r\n return;\r\n }\r\n\r\n this.stopAllAnimations();\r\n this._attachedCamera = null;\r\n }\r\n\r\n public get isInterpolating(): boolean {\r\n return this._animatables.size > 0;\r\n }\r\n\r\n /**\r\n * Stops and removes all animations\r\n */\r\n public stopAllAnimations(): void {\r\n if (this._attachedCamera) {\r\n this._animatables.forEach((animatable) => animatable.stop());\r\n }\r\n this._animatables.clear();\r\n this._promiseResolve?.();\r\n this._promiseResolve = undefined;\r\n }\r\n\r\n public updateProperties<K extends keyof C>(properties: Map<K, AllowedAnimValue>): void {\r\n properties.forEach((value, key) => {\r\n if (value !== undefined) {\r\n const animatable = this._animatables.get(String(key));\r\n animatable && (animatable.target = value as unknown as any);\r\n }\r\n });\r\n }\r\n\r\n public async animatePropertiesAsync<K extends keyof C>(\r\n properties: Map<K, AllowedAnimValue>,\r\n transitionDuration: number = this.transitionDuration,\r\n easingFn: EasingFunction = this.easingFunction\r\n ): Promise<void> {\r\n const promise = new Promise<void>((resolve) => {\r\n this._promiseResolve = resolve;\r\n this.stopAllAnimations();\r\n if (!this._attachedCamera) {\r\n this._promiseResolve = undefined;\r\n return resolve();\r\n }\r\n const camera = this._attachedCamera;\r\n const scene = camera.getScene();\r\n\r\n const checkClear = (animation: string) => {\r\n this._animatables.delete(animation);\r\n if (this._animatables.size === 0) {\r\n this._promiseResolve = undefined;\r\n resolve();\r\n }\r\n };\r\n\r\n properties.forEach((value, key) => {\r\n if (value !== undefined) {\r\n const propertyName = String(key);\r\n const animation = Animation.CreateAnimation(propertyName, GetAnimationType(value), 60, easingFn);\r\n const animatable = Animation.TransitionTo(propertyName, value, camera, scene, 60, animation, transitionDuration, () => checkClear(propertyName));\r\n if (animatable) {\r\n this._animatables.set(propertyName, animatable);\r\n }\r\n }\r\n });\r\n });\r\n return await promise;\r\n }\r\n}\r\n\r\n// Structural type-guards (no instanceof)\r\nfunction IsQuaternionLike(v: any): v is IQuaternionLike {\r\n return v != null && typeof v.x === \"number\" && typeof v.y === \"number\" && typeof v.z === \"number\" && typeof v.w === \"number\";\r\n}\r\n\r\nfunction IsMatrixLike(v: any): v is IMatrixLike {\r\n return v != null && (Array.isArray((v as any).m) || typeof (v as any).m === \"object\");\r\n}\r\n\r\nfunction IsVector3Like(v: any): v is IVector3Like {\r\n return v != null && typeof v.x === \"number\" && typeof v.y === \"number\" && typeof v.z === \"number\";\r\n}\r\n\r\nfunction IsVector2Like(v: any): v is IVector2Like {\r\n return v != null && typeof v.x === \"number\" && typeof v.y === \"number\";\r\n}\r\n\r\nfunction IsColor3Like(v: any): v is IColor3Like {\r\n return v != null && typeof v.r === \"number\" && typeof v.g === \"number\" && typeof v.b === \"number\";\r\n}\r\n\r\nfunction IsColor4Like(v: any): v is IColor4Like {\r\n return v != null && typeof v.r === \"number\" && typeof v.g === \"number\" && typeof v.b === \"number\" && typeof v.a === \"number\";\r\n}\r\n\r\nexport type SizeLike = { width: number; height: number };\r\n\r\nfunction IsSizeLike(v: any): v is SizeLike {\r\n return v != null && typeof v.width === \"number\" && typeof v.height === \"number\";\r\n}\r\n\r\nconst GetAnimationType = (value: AllowedAnimValue): number => {\r\n if (IsQuaternionLike(value)) {\r\n return Animation.ANIMATIONTYPE_QUATERNION;\r\n }\r\n if (IsMatrixLike(value)) {\r\n return Animation.ANIMATIONTYPE_MATRIX;\r\n }\r\n if (IsVector3Like(value)) {\r\n return Animation.ANIMATIONTYPE_VECTOR3;\r\n }\r\n if (IsVector2Like(value)) {\r\n return Animation.ANIMATIONTYPE_VECTOR2;\r\n }\r\n if (IsColor3Like(value)) {\r\n return Animation.ANIMATIONTYPE_COLOR3;\r\n }\r\n if (IsColor4Like(value)) {\r\n return Animation.ANIMATIONTYPE_COLOR4;\r\n }\r\n if (IsSizeLike(value)) {\r\n return Animation.ANIMATIONTYPE_SIZE;\r\n }\r\n\r\n // Fallback to float for numbers and unknown shapes\r\n return Animation.ANIMATIONTYPE_FLOAT;\r\n};\r\n"]}
|
|
@@ -183,16 +183,18 @@ export class FreeCameraDeviceOrientationInput {
|
|
|
183
183
|
if (!this._alpha) {
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
this._camera.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
186
|
+
if (this._camera.rotationQuaternion) {
|
|
187
|
+
Quaternion.RotationYawPitchRollToRef(Tools.ToRadians(this._alpha), Tools.ToRadians(this._beta), -Tools.ToRadians(this._gamma), this._camera.rotationQuaternion);
|
|
188
|
+
this._camera.rotationQuaternion.multiplyInPlace(this._screenQuaternion);
|
|
189
|
+
this._camera.rotationQuaternion.multiplyInPlace(this._constantTransform);
|
|
190
|
+
if (this._camera.getScene().useRightHandedSystem) {
|
|
191
|
+
this._camera.rotationQuaternion.y *= -1;
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
this._camera.rotationQuaternion.z *= -1;
|
|
195
|
+
}
|
|
196
|
+
this._camera.rotationQuaternion.w *= -1;
|
|
194
197
|
}
|
|
195
|
-
this._camera.rotationQuaternion.w *= -1;
|
|
196
198
|
}
|
|
197
199
|
/**
|
|
198
200
|
* Gets the class name of the current input.
|