@babylonjs/core 5.32.1 → 5.32.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/Actions/abstractActionManager.d.ts +1 -1
- package/Actions/abstractActionManager.js +1 -1
- package/Actions/abstractActionManager.js.map +1 -1
- package/Actions/action.d.ts +1 -1
- package/Actions/action.js +1 -1
- package/Actions/action.js.map +1 -1
- package/Actions/actionManager.d.ts +18 -18
- package/Actions/actionManager.js +18 -18
- package/Actions/actionManager.js.map +1 -1
- package/Actions/directActions.d.ts +10 -10
- package/Actions/directActions.js +10 -10
- package/Actions/directActions.js.map +1 -1
- package/Actions/interpolateValueAction.d.ts +1 -1
- package/Actions/interpolateValueAction.js +1 -1
- package/Actions/interpolateValueAction.js.map +1 -1
- package/Animations/animatable.d.ts +2 -2
- package/Animations/animatable.js +2 -2
- package/Animations/animatable.js.map +1 -1
- package/Animations/animationGroup.d.ts +3 -3
- package/Animations/animationGroup.js +3 -3
- package/Animations/animationGroup.js.map +1 -1
- package/Animations/easing.d.ts +14 -14
- package/Animations/easing.js +13 -13
- package/Animations/easing.js.map +1 -1
- package/Audio/Interfaces/IAudioEngine.d.ts +2 -2
- package/Audio/Interfaces/IAudioEngine.js.map +1 -1
- package/Audio/Interfaces/ISoundOptions.d.ts +3 -3
- package/Audio/Interfaces/ISoundOptions.js.map +1 -1
- package/Audio/analyser.d.ts +1 -1
- package/Audio/analyser.js +1 -1
- package/Audio/analyser.js.map +1 -1
- package/Audio/audioEngine.d.ts +2 -2
- package/Audio/audioEngine.js +2 -2
- package/Audio/audioEngine.js.map +1 -1
- package/Audio/audioSceneComponent.d.ts +4 -4
- package/Audio/audioSceneComponent.js.map +1 -1
- package/Audio/sound.d.ts +13 -13
- package/Audio/sound.js +13 -13
- package/Audio/sound.js.map +1 -1
- package/Audio/soundTrack.d.ts +5 -5
- package/Audio/soundTrack.js +5 -5
- package/Audio/soundTrack.js.map +1 -1
- package/BakedVertexAnimation/bakedVertexAnimationManager.d.ts +1 -1
- package/BakedVertexAnimation/bakedVertexAnimationManager.js +1 -1
- package/BakedVertexAnimation/bakedVertexAnimationManager.js.map +1 -1
- package/Behaviors/Cameras/autoRotationBehavior.d.ts +1 -1
- package/Behaviors/Cameras/autoRotationBehavior.js +1 -1
- package/Behaviors/Cameras/autoRotationBehavior.js.map +1 -1
- package/Behaviors/Cameras/bouncingBehavior.d.ts +1 -1
- package/Behaviors/Cameras/bouncingBehavior.js +1 -1
- package/Behaviors/Cameras/bouncingBehavior.js.map +1 -1
- package/Behaviors/Cameras/framingBehavior.d.ts +1 -1
- package/Behaviors/Cameras/framingBehavior.js +1 -1
- package/Behaviors/Cameras/framingBehavior.js.map +1 -1
- package/Behaviors/Meshes/pointerDragBehavior.d.ts +8 -0
- package/Behaviors/Meshes/pointerDragBehavior.js +9 -3
- package/Behaviors/Meshes/pointerDragBehavior.js.map +1 -1
- package/Bones/bone.d.ts +1 -1
- package/Bones/bone.js +1 -1
- package/Bones/bone.js.map +1 -1
- package/Bones/boneIKController.d.ts +1 -1
- package/Bones/boneIKController.js +1 -1
- package/Bones/boneIKController.js.map +1 -1
- package/Bones/boneLookController.d.ts +1 -1
- package/Bones/boneLookController.js +1 -1
- package/Bones/boneLookController.js.map +1 -1
- package/Bones/skeleton.d.ts +3 -3
- package/Bones/skeleton.js +2 -2
- package/Bones/skeleton.js.map +1 -1
- package/Cameras/Inputs/BaseCameraMouseWheelInput.js +2 -2
- package/Cameras/Inputs/BaseCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/BaseCameraPointersInput.js +2 -2
- package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraGamepadInput.d.ts +1 -1
- package/Cameras/Inputs/arcRotateCameraGamepadInput.js +1 -1
- package/Cameras/Inputs/arcRotateCameraGamepadInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.d.ts +1 -1
- package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js +1 -1
- package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraMouseWheelInput.d.ts +1 -1
- package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js +3 -3
- package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraPointersInput.d.ts +1 -1
- package/Cameras/Inputs/arcRotateCameraPointersInput.js +1 -1
- package/Cameras/Inputs/arcRotateCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraVRDeviceOrientationInput.d.ts +1 -1
- package/Cameras/Inputs/arcRotateCameraVRDeviceOrientationInput.js +1 -1
- package/Cameras/Inputs/arcRotateCameraVRDeviceOrientationInput.js.map +1 -1
- package/Cameras/Inputs/flyCameraKeyboardInput.d.ts +1 -1
- package/Cameras/Inputs/flyCameraKeyboardInput.js +1 -1
- package/Cameras/Inputs/flyCameraKeyboardInput.js.map +1 -1
- package/Cameras/Inputs/flyCameraMouseInput.d.ts +2 -2
- package/Cameras/Inputs/flyCameraMouseInput.js +4 -4
- package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
- package/Cameras/Inputs/followCameraKeyboardMoveInput.d.ts +1 -1
- package/Cameras/Inputs/followCameraKeyboardMoveInput.js +1 -1
- package/Cameras/Inputs/followCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/followCameraMouseWheelInput.d.ts +1 -1
- package/Cameras/Inputs/followCameraMouseWheelInput.js +3 -3
- package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/followCameraPointersInput.d.ts +1 -1
- package/Cameras/Inputs/followCameraPointersInput.js +1 -1
- package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraDeviceOrientationInput.d.ts +2 -2
- package/Cameras/Inputs/freeCameraDeviceOrientationInput.js +2 -2
- package/Cameras/Inputs/freeCameraDeviceOrientationInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraGamepadInput.d.ts +1 -1
- package/Cameras/Inputs/freeCameraGamepadInput.js +1 -1
- package/Cameras/Inputs/freeCameraGamepadInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraKeyboardMoveInput.d.ts +1 -1
- package/Cameras/Inputs/freeCameraKeyboardMoveInput.js +1 -1
- package/Cameras/Inputs/freeCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraMouseInput.d.ts +3 -2
- package/Cameras/Inputs/freeCameraMouseInput.js +10 -7
- package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraMouseWheelInput.d.ts +1 -1
- package/Cameras/Inputs/freeCameraMouseWheelInput.js +1 -1
- package/Cameras/Inputs/freeCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraTouchInput.d.ts +2 -2
- package/Cameras/Inputs/freeCameraTouchInput.js +4 -4
- package/Cameras/Inputs/freeCameraTouchInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraVirtualJoystickInput.d.ts +1 -1
- package/Cameras/Inputs/freeCameraVirtualJoystickInput.js +1 -1
- package/Cameras/Inputs/freeCameraVirtualJoystickInput.js.map +1 -1
- package/Cameras/Stereoscopic/anaglyphArcRotateCamera.d.ts +1 -1
- package/Cameras/Stereoscopic/anaglyphArcRotateCamera.js +1 -1
- package/Cameras/Stereoscopic/anaglyphArcRotateCamera.js.map +1 -1
- package/Cameras/Stereoscopic/anaglyphFreeCamera.d.ts +1 -1
- package/Cameras/Stereoscopic/anaglyphFreeCamera.js +1 -1
- package/Cameras/Stereoscopic/anaglyphFreeCamera.js.map +1 -1
- package/Cameras/Stereoscopic/anaglyphGamepadCamera.d.ts +1 -1
- package/Cameras/Stereoscopic/anaglyphGamepadCamera.js +1 -1
- package/Cameras/Stereoscopic/anaglyphGamepadCamera.js.map +1 -1
- package/Cameras/Stereoscopic/anaglyphUniversalCamera.d.ts +1 -1
- package/Cameras/Stereoscopic/anaglyphUniversalCamera.js +1 -1
- package/Cameras/Stereoscopic/anaglyphUniversalCamera.js.map +1 -1
- package/Cameras/Stereoscopic/stereoscopicArcRotateCamera.d.ts +1 -1
- package/Cameras/Stereoscopic/stereoscopicArcRotateCamera.js +1 -1
- package/Cameras/Stereoscopic/stereoscopicArcRotateCamera.js.map +1 -1
- package/Cameras/Stereoscopic/stereoscopicFreeCamera.d.ts +1 -1
- package/Cameras/Stereoscopic/stereoscopicFreeCamera.js +1 -1
- package/Cameras/Stereoscopic/stereoscopicFreeCamera.js.map +1 -1
- package/Cameras/Stereoscopic/stereoscopicGamepadCamera.d.ts +1 -1
- package/Cameras/Stereoscopic/stereoscopicGamepadCamera.js +1 -1
- package/Cameras/Stereoscopic/stereoscopicGamepadCamera.js.map +1 -1
- package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.d.ts +1 -1
- package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js +1 -1
- package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js.map +1 -1
- package/Cameras/Stereoscopic/stereoscopicUniversalCamera.d.ts +1 -1
- package/Cameras/Stereoscopic/stereoscopicUniversalCamera.js +1 -1
- package/Cameras/Stereoscopic/stereoscopicUniversalCamera.js.map +1 -1
- package/Cameras/VR/vrCameraMetrics.d.ts +1 -1
- package/Cameras/VR/vrCameraMetrics.js +1 -1
- package/Cameras/VR/vrCameraMetrics.js.map +1 -1
- package/Cameras/VR/vrDeviceOrientationArcRotateCamera.d.ts +1 -1
- package/Cameras/VR/vrDeviceOrientationArcRotateCamera.js +1 -1
- package/Cameras/VR/vrDeviceOrientationArcRotateCamera.js.map +1 -1
- package/Cameras/VR/vrDeviceOrientationFreeCamera.d.ts +1 -1
- package/Cameras/VR/vrDeviceOrientationFreeCamera.js +1 -1
- package/Cameras/VR/vrDeviceOrientationFreeCamera.js.map +1 -1
- package/Cameras/VR/vrDeviceOrientationGamepadCamera.d.ts +1 -1
- package/Cameras/VR/vrDeviceOrientationGamepadCamera.js +1 -1
- package/Cameras/VR/vrDeviceOrientationGamepadCamera.js.map +1 -1
- package/Cameras/VR/vrExperienceHelper.d.ts +2 -2
- package/Cameras/VR/vrExperienceHelper.js +2 -2
- package/Cameras/VR/vrExperienceHelper.js.map +1 -1
- package/Cameras/VR/webVRCamera.d.ts +2 -2
- package/Cameras/VR/webVRCamera.js +2 -2
- package/Cameras/VR/webVRCamera.js.map +1 -1
- package/Cameras/arcRotateCamera.d.ts +9 -9
- package/Cameras/arcRotateCamera.js +9 -9
- package/Cameras/arcRotateCamera.js.map +1 -1
- package/Cameras/arcRotateCameraInputsManager.d.ts +1 -1
- package/Cameras/arcRotateCameraInputsManager.js +1 -1
- package/Cameras/arcRotateCameraInputsManager.js.map +1 -1
- package/Cameras/camera.d.ts +4 -4
- package/Cameras/camera.js +4 -4
- package/Cameras/camera.js.map +1 -1
- package/Cameras/cameraInputsManager.d.ts +1 -1
- package/Cameras/cameraInputsManager.js +1 -1
- package/Cameras/cameraInputsManager.js.map +1 -1
- package/Cameras/flyCamera.d.ts +1 -1
- package/Cameras/flyCamera.js +1 -1
- package/Cameras/flyCamera.js.map +1 -1
- package/Cameras/flyCameraInputsManager.d.ts +1 -1
- package/Cameras/flyCameraInputsManager.js +1 -1
- package/Cameras/flyCameraInputsManager.js.map +1 -1
- package/Cameras/followCamera.d.ts +4 -4
- package/Cameras/followCamera.js +4 -4
- package/Cameras/followCamera.js.map +1 -1
- package/Cameras/followCameraInputsManager.d.ts +1 -1
- package/Cameras/followCameraInputsManager.js +1 -1
- package/Cameras/followCameraInputsManager.js.map +1 -1
- package/Cameras/freeCamera.d.ts +3 -3
- package/Cameras/freeCamera.js +3 -3
- package/Cameras/freeCamera.js.map +1 -1
- package/Cameras/freeCameraInputsManager.d.ts +1 -1
- package/Cameras/freeCameraInputsManager.js +1 -1
- package/Cameras/freeCameraInputsManager.js.map +1 -1
- package/Cameras/gamepadCamera.d.ts +2 -2
- package/Cameras/gamepadCamera.js +2 -2
- package/Cameras/gamepadCamera.js.map +1 -1
- package/Cameras/targetCamera.d.ts +2 -2
- package/Cameras/targetCamera.js +2 -2
- package/Cameras/targetCamera.js.map +1 -1
- package/Cameras/touchCamera.d.ts +2 -2
- package/Cameras/touchCamera.js +2 -2
- package/Cameras/touchCamera.js.map +1 -1
- package/Cameras/universalCamera.d.ts +2 -2
- package/Cameras/universalCamera.js +2 -2
- package/Cameras/universalCamera.js.map +1 -1
- package/Cameras/virtualJoysticksCamera.d.ts +2 -2
- package/Cameras/virtualJoysticksCamera.js +2 -2
- package/Cameras/virtualJoysticksCamera.js.map +1 -1
- package/Collisions/pickingInfo.d.ts +1 -1
- package/Collisions/pickingInfo.js +1 -1
- package/Collisions/pickingInfo.js.map +1 -1
- package/Culling/Octrees/octree.d.ts +2 -2
- package/Culling/Octrees/octree.js +2 -2
- package/Culling/Octrees/octree.js.map +1 -1
- package/Culling/Octrees/octreeBlock.d.ts +1 -1
- package/Culling/Octrees/octreeBlock.js +1 -1
- package/Culling/Octrees/octreeBlock.js.map +1 -1
- package/Culling/Octrees/octreeSceneComponent.d.ts +3 -3
- package/Culling/Octrees/octreeSceneComponent.js +1 -1
- package/Culling/Octrees/octreeSceneComponent.js.map +1 -1
- package/Culling/boundingInfo.d.ts +3 -3
- package/Culling/boundingInfo.js +2 -2
- package/Culling/boundingInfo.js.map +1 -1
- package/Debug/debugLayer.d.ts +1 -1
- package/Debug/debugLayer.js.map +1 -1
- package/Debug/rayHelper.d.ts +2 -2
- package/Debug/rayHelper.js +2 -2
- package/Debug/rayHelper.js.map +1 -1
- package/Engines/Extensions/engine.alpha.d.ts +2 -2
- package/Engines/Extensions/engine.alpha.js.map +1 -1
- package/Engines/Extensions/engine.multiRender.d.ts +2 -2
- package/Engines/Extensions/engine.multiRender.js.map +1 -1
- package/Engines/Extensions/engine.query.d.ts +8 -8
- package/Engines/Extensions/engine.query.js.map +1 -1
- package/Engines/Extensions/engine.renderTarget.d.ts +1 -1
- package/Engines/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/Extensions/engine.uniformBuffer.d.ts +3 -3
- package/Engines/Extensions/engine.uniformBuffer.js.map +1 -1
- package/Engines/Extensions/engine.views.d.ts +2 -2
- package/Engines/Extensions/engine.views.js +1 -1
- package/Engines/Extensions/engine.views.js.map +1 -1
- package/Engines/Extensions/engine.webVR.d.ts +1 -1
- package/Engines/Extensions/engine.webVR.js.map +1 -1
- package/Engines/Processors/shaderProcessor.d.ts +2 -2
- package/Engines/Processors/shaderProcessor.js +2 -2
- package/Engines/Processors/shaderProcessor.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessor.js +11 -9
- package/Engines/WebGPU/webgpuShaderProcessor.js.map +1 -1
- package/Engines/constants.d.ts +17 -17
- package/Engines/constants.js +17 -17
- package/Engines/constants.js.map +1 -1
- package/Engines/engine.d.ts +12 -12
- package/Engines/engine.js +11 -11
- package/Engines/engine.js.map +1 -1
- package/Engines/nativeEngine.d.ts +2 -2
- package/Engines/nativeEngine.js +23 -2
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/nullEngine.d.ts +5 -5
- package/Engines/nullEngine.js +5 -5
- package/Engines/nullEngine.js.map +1 -1
- package/Engines/thinEngine.d.ts +8 -8
- package/Engines/thinEngine.js +6 -6
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +4 -4
- package/Engines/webgpuEngine.js +1 -1
- package/Engines/webgpuEngine.js.map +1 -1
- package/Gamepads/gamepadSceneComponent.d.ts +1 -1
- package/Gamepads/gamepadSceneComponent.js.map +1 -1
- package/Gizmos/gizmo.d.ts +6 -7
- package/Gizmos/gizmo.js +43 -36
- package/Gizmos/gizmo.js.map +1 -1
- package/Gizmos/planeRotationGizmo.js +17 -7
- package/Gizmos/planeRotationGizmo.js.map +1 -1
- package/Gizmos/positionGizmo.d.ts +4 -0
- package/Gizmos/positionGizmo.js +21 -0
- package/Gizmos/positionGizmo.js.map +1 -1
- package/Gizmos/rotationGizmo.d.ts +4 -0
- package/Gizmos/rotationGizmo.js +20 -0
- package/Gizmos/rotationGizmo.js.map +1 -1
- package/Gizmos/scaleGizmo.d.ts +2 -0
- package/Gizmos/scaleGizmo.js +10 -0
- package/Gizmos/scaleGizmo.js.map +1 -1
- package/Helpers/sceneHelpers.d.ts +7 -7
- package/Helpers/sceneHelpers.js.map +1 -1
- package/Inputs/scene.inputManager.js +34 -25
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Instrumentation/engineInstrumentation.d.ts +2 -2
- package/Instrumentation/engineInstrumentation.js +2 -2
- package/Instrumentation/engineInstrumentation.js.map +1 -1
- package/Instrumentation/sceneInstrumentation.d.ts +2 -2
- package/Instrumentation/sceneInstrumentation.js +2 -2
- package/Instrumentation/sceneInstrumentation.js.map +1 -1
- package/Layers/effectLayerSceneComponent.d.ts +2 -2
- package/Layers/effectLayerSceneComponent.js.map +1 -1
- package/Layers/glowLayer.d.ts +1 -1
- package/Layers/glowLayer.js +1 -1
- package/Layers/glowLayer.js.map +1 -1
- package/LensFlares/lensFlare.d.ts +3 -3
- package/LensFlares/lensFlare.js +3 -3
- package/LensFlares/lensFlare.js.map +1 -1
- package/LensFlares/lensFlareSystem.d.ts +2 -2
- package/LensFlares/lensFlareSystem.js +2 -2
- package/LensFlares/lensFlareSystem.js.map +1 -1
- package/LensFlares/lensFlareSystemSceneComponent.d.ts +1 -1
- package/LensFlares/lensFlareSystemSceneComponent.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.d.ts +2 -2
- package/Lights/Shadows/shadowGenerator.js +2 -2
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Lights/directionalLight.d.ts +2 -2
- package/Lights/directionalLight.js +2 -2
- package/Lights/directionalLight.js.map +1 -1
- package/Lights/hemisphericLight.d.ts +1 -1
- package/Lights/hemisphericLight.js +1 -1
- package/Lights/hemisphericLight.js.map +1 -1
- package/Lights/light.d.ts +1 -1
- package/Lights/light.js +1 -1
- package/Lights/light.js.map +1 -1
- package/Lights/pointLight.d.ts +2 -2
- package/Lights/pointLight.js +2 -2
- package/Lights/pointLight.js.map +1 -1
- package/Lights/spotLight.d.ts +2 -2
- package/Lights/spotLight.js +2 -2
- package/Lights/spotLight.js.map +1 -1
- package/Loading/loadingScreen.d.ts +2 -2
- package/Loading/loadingScreen.js +1 -1
- package/Loading/loadingScreen.js.map +1 -1
- package/Materials/Node/Blocks/Vertex/instancesBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Vertex/instancesBlock.js +1 -1
- package/Materials/Node/Blocks/Vertex/instancesBlock.js.map +1 -1
- package/Materials/Node/Blocks/reciprocalBlock.js +6 -2
- package/Materials/Node/Blocks/reciprocalBlock.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.d.ts +1 -1
- package/Materials/PBR/pbrBaseMaterial.js +1 -1
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/PBR/pbrMaterial.d.ts +1 -1
- package/Materials/PBR/pbrMaterial.js +1 -1
- package/Materials/PBR/pbrMaterial.js.map +1 -1
- package/Materials/Textures/Packer/packer.d.ts +1 -1
- package/Materials/Textures/Packer/packer.js +1 -1
- package/Materials/Textures/Packer/packer.js.map +1 -1
- package/Materials/Textures/Procedurals/customProceduralTexture.d.ts +2 -2
- package/Materials/Textures/Procedurals/customProceduralTexture.js +2 -2
- package/Materials/Textures/Procedurals/customProceduralTexture.js.map +1 -1
- package/Materials/Textures/Procedurals/proceduralTexture.d.ts +2 -2
- package/Materials/Textures/Procedurals/proceduralTexture.js +2 -2
- package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
- package/Materials/Textures/Procedurals/proceduralTextureSceneComponent.d.ts +1 -1
- package/Materials/Textures/Procedurals/proceduralTextureSceneComponent.js.map +1 -1
- package/Materials/Textures/cubeTexture.d.ts +2 -2
- package/Materials/Textures/cubeTexture.js +2 -2
- package/Materials/Textures/cubeTexture.js.map +1 -1
- package/Materials/Textures/dynamicTexture.d.ts +1 -1
- package/Materials/Textures/dynamicTexture.js +1 -1
- package/Materials/Textures/dynamicTexture.js.map +1 -1
- package/Materials/Textures/mirrorTexture.d.ts +3 -3
- package/Materials/Textures/mirrorTexture.js +3 -3
- package/Materials/Textures/mirrorTexture.js.map +1 -1
- package/Materials/Textures/refractionTexture.d.ts +3 -3
- package/Materials/Textures/refractionTexture.js +3 -3
- package/Materials/Textures/refractionTexture.js.map +1 -1
- package/Materials/Textures/texture.d.ts +10 -10
- package/Materials/Textures/texture.js +10 -10
- package/Materials/Textures/texture.js.map +1 -1
- package/Materials/Textures/videoTexture.d.ts +2 -2
- package/Materials/Textures/videoTexture.js +2 -2
- package/Materials/Textures/videoTexture.js.map +1 -1
- package/Materials/effect.d.ts +20 -2
- package/Materials/effect.js +28 -4
- package/Materials/effect.js.map +1 -1
- package/Materials/fresnelParameters.d.ts +1 -1
- package/Materials/fresnelParameters.js +1 -1
- package/Materials/fresnelParameters.js.map +1 -1
- package/Materials/material.d.ts +1 -1
- package/Materials/material.js.map +1 -1
- package/Materials/multiMaterial.d.ts +2 -2
- package/Materials/multiMaterial.js +2 -2
- package/Materials/multiMaterial.js.map +1 -1
- package/Materials/shaderMaterial.d.ts +2 -2
- package/Materials/shaderMaterial.js +2 -2
- package/Materials/shaderMaterial.js.map +1 -1
- package/Materials/shadowDepthWrapper.d.ts +1 -1
- package/Materials/shadowDepthWrapper.js +2 -2
- package/Materials/shadowDepthWrapper.js.map +1 -1
- package/Materials/standardMaterial.d.ts +18 -18
- package/Materials/standardMaterial.js +6 -6
- package/Materials/standardMaterial.js.map +1 -1
- package/Maths/math.path.d.ts +7 -7
- package/Maths/math.path.js +7 -7
- package/Maths/math.path.js.map +1 -1
- package/Maths/math.vector.d.ts +4 -4
- package/Maths/math.vector.js +4 -4
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/Builders/boxBuilder.d.ts +3 -3
- package/Meshes/Builders/boxBuilder.js +3 -3
- package/Meshes/Builders/boxBuilder.js.map +1 -1
- package/Meshes/Builders/capsuleBuilder.d.ts +1 -1
- package/Meshes/Builders/capsuleBuilder.js +1 -1
- package/Meshes/Builders/capsuleBuilder.js.map +1 -1
- package/Meshes/Builders/cylinderBuilder.d.ts +2 -2
- package/Meshes/Builders/cylinderBuilder.js +2 -2
- package/Meshes/Builders/cylinderBuilder.js.map +1 -1
- package/Meshes/Builders/decalBuilder.d.ts +1 -1
- package/Meshes/Builders/decalBuilder.js +1 -1
- package/Meshes/Builders/decalBuilder.js.map +1 -1
- package/Meshes/Builders/discBuilder.d.ts +2 -2
- package/Meshes/Builders/discBuilder.js +2 -2
- package/Meshes/Builders/discBuilder.js.map +1 -1
- package/Meshes/Builders/geodesicBuilder.d.ts +1 -1
- package/Meshes/Builders/geodesicBuilder.js +1 -1
- package/Meshes/Builders/geodesicBuilder.js.map +1 -1
- package/Meshes/Builders/goldbergBuilder.d.ts +1 -1
- package/Meshes/Builders/goldbergBuilder.js +1 -1
- package/Meshes/Builders/goldbergBuilder.js.map +1 -1
- package/Meshes/Builders/groundBuilder.d.ts +4 -4
- package/Meshes/Builders/groundBuilder.js +4 -4
- package/Meshes/Builders/groundBuilder.js.map +1 -1
- package/Meshes/Builders/icoSphereBuilder.d.ts +2 -2
- package/Meshes/Builders/icoSphereBuilder.js +2 -2
- package/Meshes/Builders/icoSphereBuilder.js.map +1 -1
- package/Meshes/Builders/latheBuilder.d.ts +2 -2
- package/Meshes/Builders/latheBuilder.js +2 -2
- package/Meshes/Builders/latheBuilder.js.map +1 -1
- package/Meshes/Builders/linesBuilder.d.ts +6 -6
- package/Meshes/Builders/linesBuilder.js +6 -6
- package/Meshes/Builders/linesBuilder.js.map +1 -1
- package/Meshes/Builders/planeBuilder.d.ts +2 -2
- package/Meshes/Builders/planeBuilder.js +2 -2
- package/Meshes/Builders/planeBuilder.js.map +1 -1
- package/Meshes/Builders/polygonBuilder.d.ts +1 -1
- package/Meshes/Builders/polygonBuilder.js +1 -1
- package/Meshes/Builders/polygonBuilder.js.map +1 -1
- package/Meshes/Builders/polyhedronBuilder.d.ts +3 -3
- package/Meshes/Builders/polyhedronBuilder.js +3 -3
- package/Meshes/Builders/polyhedronBuilder.js.map +1 -1
- package/Meshes/Builders/ribbonBuilder.d.ts +4 -4
- package/Meshes/Builders/ribbonBuilder.js +4 -4
- package/Meshes/Builders/ribbonBuilder.js.map +1 -1
- package/Meshes/Builders/shapeBuilder.d.ts +9 -9
- package/Meshes/Builders/shapeBuilder.js +9 -9
- package/Meshes/Builders/shapeBuilder.js.map +1 -1
- package/Meshes/Builders/sphereBuilder.d.ts +2 -2
- package/Meshes/Builders/sphereBuilder.js +2 -2
- package/Meshes/Builders/sphereBuilder.js.map +1 -1
- package/Meshes/Builders/tiledBoxBuilder.d.ts +2 -2
- package/Meshes/Builders/tiledBoxBuilder.js +2 -2
- package/Meshes/Builders/tiledBoxBuilder.js.map +1 -1
- package/Meshes/Builders/tiledPlaneBuilder.d.ts +2 -2
- package/Meshes/Builders/tiledPlaneBuilder.js +2 -2
- package/Meshes/Builders/tiledPlaneBuilder.js.map +1 -1
- package/Meshes/Builders/torusBuilder.d.ts +2 -2
- package/Meshes/Builders/torusBuilder.js +2 -2
- package/Meshes/Builders/torusBuilder.js.map +1 -1
- package/Meshes/Builders/torusKnotBuilder.d.ts +2 -2
- package/Meshes/Builders/torusKnotBuilder.js +2 -2
- package/Meshes/Builders/torusKnotBuilder.js.map +1 -1
- package/Meshes/Builders/tubeBuilder.d.ts +4 -4
- package/Meshes/Builders/tubeBuilder.js +4 -4
- package/Meshes/Builders/tubeBuilder.js.map +1 -1
- package/Meshes/abstractMesh.d.ts +35 -35
- package/Meshes/abstractMesh.js +34 -34
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/instancedMesh.d.ts +3 -3
- package/Meshes/instancedMesh.js +1 -1
- package/Meshes/instancedMesh.js.map +1 -1
- package/Meshes/linesMesh.d.ts +2 -2
- package/Meshes/linesMesh.js +2 -2
- package/Meshes/linesMesh.js.map +1 -1
- package/Meshes/mesh.d.ts +36 -36
- package/Meshes/mesh.js +9 -17
- package/Meshes/mesh.js.map +1 -1
- package/Meshes/meshLODLevel.d.ts +1 -1
- package/Meshes/meshLODLevel.js +1 -1
- package/Meshes/meshLODLevel.js.map +1 -1
- package/Meshes/meshSimplification.d.ts +6 -6
- package/Meshes/meshSimplification.js +4 -4
- package/Meshes/meshSimplification.js.map +1 -1
- package/Meshes/meshSimplificationSceneComponent.d.ts +1 -1
- package/Meshes/meshSimplificationSceneComponent.js.map +1 -1
- package/Meshes/polygonMesh.d.ts +2 -2
- package/Meshes/polygonMesh.js +2 -2
- package/Meshes/polygonMesh.js.map +1 -1
- package/Meshes/transformNode.d.ts +1 -1
- package/Meshes/transformNode.js +1 -1
- package/Meshes/transformNode.js.map +1 -1
- package/Misc/assetsManager.d.ts +2 -2
- package/Misc/assetsManager.js +2 -2
- package/Misc/assetsManager.js.map +1 -1
- package/Misc/iInspectable.d.ts +1 -1
- package/Misc/iInspectable.js.map +1 -1
- package/Misc/sceneOptimizer.d.ts +12 -12
- package/Misc/sceneOptimizer.js +12 -12
- package/Misc/sceneOptimizer.js.map +1 -1
- package/Misc/screenshotTools.d.ts +10 -10
- package/Misc/screenshotTools.js +10 -10
- package/Misc/screenshotTools.js.map +1 -1
- package/Misc/tools.d.ts +4 -4
- package/Misc/tools.js +4 -4
- package/Misc/tools.js.map +1 -1
- package/Misc/videoRecorder.d.ts +1 -1
- package/Misc/videoRecorder.js +1 -1
- package/Misc/videoRecorder.js.map +1 -1
- package/Morph/morphTarget.d.ts +1 -1
- package/Morph/morphTarget.js +1 -1
- package/Morph/morphTarget.js.map +1 -1
- package/Morph/morphTargetManager.d.ts +1 -1
- package/Morph/morphTargetManager.js +1 -1
- package/Morph/morphTargetManager.js.map +1 -1
- package/Offline/IOfflineProvider.d.ts +1 -1
- package/Offline/IOfflineProvider.js.map +1 -1
- package/Offline/database.d.ts +1 -1
- package/Offline/database.js +1 -1
- package/Offline/database.js.map +1 -1
- package/Particles/IParticleSystem.d.ts +1 -1
- package/Particles/IParticleSystem.js.map +1 -1
- package/Particles/baseParticleSystem.d.ts +1 -1
- package/Particles/baseParticleSystem.js +1 -1
- package/Particles/baseParticleSystem.js.map +1 -1
- package/Particles/gpuParticleSystem.d.ts +1 -1
- package/Particles/gpuParticleSystem.js +1 -1
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/particleSystem.d.ts +2 -2
- package/Particles/particleSystem.js +2 -2
- package/Particles/particleSystem.js.map +1 -1
- package/Particles/solidParticleSystem.d.ts +15 -15
- package/Particles/solidParticleSystem.js +13 -13
- package/Particles/solidParticleSystem.js.map +1 -1
- package/Physics/IPhysicsEngine.d.ts +1 -1
- package/Physics/IPhysicsEngine.js.map +1 -1
- package/Physics/Plugins/ammoJSPlugin.d.ts +1 -1
- package/Physics/Plugins/ammoJSPlugin.js +1 -1
- package/Physics/Plugins/ammoJSPlugin.js.map +1 -1
- package/Physics/physicsEngine.d.ts +1 -1
- package/Physics/physicsEngine.js +1 -1
- package/Physics/physicsEngine.js.map +1 -1
- package/Physics/physicsEngineComponent.d.ts +3 -3
- package/Physics/physicsEngineComponent.js +2 -2
- package/Physics/physicsEngineComponent.js.map +1 -1
- package/Physics/physicsHelper.d.ts +12 -12
- package/Physics/physicsHelper.js +6 -6
- package/Physics/physicsHelper.js.map +1 -1
- package/Physics/physicsImpostor.d.ts +3 -3
- package/Physics/physicsImpostor.js +1 -1
- package/Physics/physicsImpostor.js.map +1 -1
- package/Physics/physicsJoint.d.ts +9 -9
- package/Physics/physicsJoint.js +5 -5
- package/Physics/physicsJoint.js.map +1 -1
- package/Physics/physicsRaycastResult.d.ts +1 -1
- package/Physics/physicsRaycastResult.js +1 -1
- package/Physics/physicsRaycastResult.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.d.ts +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.d.ts +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/postProcessRenderEffect.d.ts +1 -1
- package/PostProcesses/RenderPipeline/postProcessRenderEffect.js +1 -1
- package/PostProcesses/RenderPipeline/postProcessRenderEffect.js.map +1 -1
- package/PostProcesses/RenderPipeline/postProcessRenderPipeline.d.ts +2 -2
- package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js +1 -1
- package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/postProcessRenderPipelineManager.d.ts +2 -2
- package/PostProcesses/RenderPipeline/postProcessRenderPipelineManager.js +2 -2
- package/PostProcesses/RenderPipeline/postProcessRenderPipelineManager.js.map +1 -1
- package/PostProcesses/RenderPipeline/postProcessRenderPipelineManagerSceneComponent.d.ts +2 -2
- package/PostProcesses/RenderPipeline/postProcessRenderPipelineManagerSceneComponent.js.map +1 -1
- package/PostProcesses/blackAndWhitePostProcess.d.ts +1 -1
- package/PostProcesses/blackAndWhitePostProcess.js +1 -1
- package/PostProcesses/blackAndWhitePostProcess.js.map +1 -1
- package/PostProcesses/fxaaPostProcess.d.ts +1 -1
- package/PostProcesses/fxaaPostProcess.js +1 -1
- package/PostProcesses/fxaaPostProcess.js.map +1 -1
- package/PostProcesses/highlightsPostProcess.d.ts +2 -2
- package/PostProcesses/highlightsPostProcess.js +2 -2
- package/PostProcesses/highlightsPostProcess.js.map +1 -1
- package/PostProcesses/imageProcessingPostProcess.d.ts +1 -1
- package/PostProcesses/imageProcessingPostProcess.js +1 -1
- package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
- package/PostProcesses/postProcess.d.ts +2 -2
- package/PostProcesses/postProcess.js +1 -1
- package/PostProcesses/postProcess.js.map +1 -1
- package/PostProcesses/postProcessManager.d.ts +1 -1
- package/PostProcesses/postProcessManager.js +1 -1
- package/PostProcesses/postProcessManager.js.map +1 -1
- package/PostProcesses/refractionPostProcess.d.ts +2 -2
- package/PostProcesses/refractionPostProcess.js +2 -2
- package/PostProcesses/refractionPostProcess.js.map +1 -1
- package/Probes/reflectionProbe.d.ts +2 -2
- package/Probes/reflectionProbe.js +1 -1
- package/Probes/reflectionProbe.js.map +1 -1
- package/Rendering/geometryBufferRenderer.js +2 -2
- package/Rendering/geometryBufferRenderer.js.map +1 -1
- package/Sprites/sprite.d.ts +1 -1
- package/Sprites/sprite.js +1 -1
- package/Sprites/sprite.js.map +1 -1
- package/Sprites/spriteManager.d.ts +2 -2
- package/Sprites/spriteManager.js +1 -1
- package/Sprites/spriteManager.js.map +1 -1
- package/Sprites/spritePackedManager.d.ts +1 -1
- package/Sprites/spritePackedManager.js +1 -1
- package/Sprites/spritePackedManager.js.map +1 -1
- package/Sprites/spriteSceneComponent.d.ts +1 -1
- package/Sprites/spriteSceneComponent.js.map +1 -1
- package/Sprites/thinSprite.d.ts +1 -1
- package/Sprites/thinSprite.js +1 -1
- package/Sprites/thinSprite.js.map +1 -1
- package/XR/webXRCamera.d.ts +1 -1
- package/XR/webXRCamera.js +1 -1
- package/XR/webXRCamera.js.map +1 -1
- package/XR/webXRExperienceHelper.d.ts +1 -1
- package/XR/webXRExperienceHelper.js +1 -1
- package/XR/webXRExperienceHelper.js.map +1 -1
- package/XR/webXRInputSource.d.ts +1 -1
- package/XR/webXRInputSource.js +1 -1
- package/XR/webXRInputSource.js.map +1 -1
- package/XR/webXRSessionManager.d.ts +1 -1
- package/XR/webXRSessionManager.js +1 -1
- package/XR/webXRSessionManager.js.map +1 -1
- package/abstractScene.d.ts +9 -9
- package/abstractScene.js +9 -9
- package/abstractScene.js.map +1 -1
- package/node.d.ts +6 -6
- package/node.js +5 -5
- package/node.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +29 -24
- package/scene.js +24 -18
- package/scene.js.map +1 -1
|
@@ -3,7 +3,7 @@ import type { Condition } from "./condition";
|
|
|
3
3
|
declare type ActionEvent = import("./actionEvent").ActionEvent;
|
|
4
4
|
/**
|
|
5
5
|
* This defines an action responsible to toggle a boolean once triggered.
|
|
6
|
-
* @see https://doc.babylonjs.com/
|
|
6
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
7
7
|
*/
|
|
8
8
|
export declare class SwitchBooleanAction extends Action {
|
|
9
9
|
/**
|
|
@@ -37,7 +37,7 @@ export declare class SwitchBooleanAction extends Action {
|
|
|
37
37
|
/**
|
|
38
38
|
* This defines an action responsible to set a the state field of the target
|
|
39
39
|
* to a desired value once triggered.
|
|
40
|
-
* @see https://doc.babylonjs.com/
|
|
40
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
41
41
|
*/
|
|
42
42
|
export declare class SetStateAction extends Action {
|
|
43
43
|
/**
|
|
@@ -67,7 +67,7 @@ export declare class SetStateAction extends Action {
|
|
|
67
67
|
/**
|
|
68
68
|
* This defines an action responsible to set a property of the target
|
|
69
69
|
* to a desired value once triggered.
|
|
70
|
-
* @see https://doc.babylonjs.com/
|
|
70
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
71
71
|
*/
|
|
72
72
|
export declare class SetValueAction extends Action {
|
|
73
73
|
/**
|
|
@@ -106,7 +106,7 @@ export declare class SetValueAction extends Action {
|
|
|
106
106
|
/**
|
|
107
107
|
* This defines an action responsible to increment the target value
|
|
108
108
|
* to a desired value once triggered.
|
|
109
|
-
* @see https://doc.babylonjs.com/
|
|
109
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
110
110
|
*/
|
|
111
111
|
export declare class IncrementValueAction extends Action {
|
|
112
112
|
/**
|
|
@@ -144,7 +144,7 @@ export declare class IncrementValueAction extends Action {
|
|
|
144
144
|
}
|
|
145
145
|
/**
|
|
146
146
|
* This defines an action responsible to start an animation once triggered.
|
|
147
|
-
* @see https://doc.babylonjs.com/
|
|
147
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
148
148
|
*/
|
|
149
149
|
export declare class PlayAnimationAction extends Action {
|
|
150
150
|
/**
|
|
@@ -185,7 +185,7 @@ export declare class PlayAnimationAction extends Action {
|
|
|
185
185
|
}
|
|
186
186
|
/**
|
|
187
187
|
* This defines an action responsible to stop an animation once triggered.
|
|
188
|
-
* @see https://doc.babylonjs.com/
|
|
188
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
189
189
|
*/
|
|
190
190
|
export declare class StopAnimationAction extends Action {
|
|
191
191
|
private _target;
|
|
@@ -211,7 +211,7 @@ export declare class StopAnimationAction extends Action {
|
|
|
211
211
|
}
|
|
212
212
|
/**
|
|
213
213
|
* This defines an action responsible that does nothing once triggered.
|
|
214
|
-
* @see https://doc.babylonjs.com/
|
|
214
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
215
215
|
*/
|
|
216
216
|
export declare class DoNothingAction extends Action {
|
|
217
217
|
/**
|
|
@@ -233,7 +233,7 @@ export declare class DoNothingAction extends Action {
|
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
235
235
|
* This defines an action responsible to trigger several actions once triggered.
|
|
236
|
-
* @see https://doc.babylonjs.com/
|
|
236
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
237
237
|
*/
|
|
238
238
|
export declare class CombineAction extends Action {
|
|
239
239
|
/**
|
|
@@ -268,7 +268,7 @@ export declare class CombineAction extends Action {
|
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
270
270
|
* This defines an action responsible to run code (external event) once triggered.
|
|
271
|
-
* @see https://doc.babylonjs.com/
|
|
271
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
272
272
|
*/
|
|
273
273
|
export declare class ExecuteCodeAction extends Action {
|
|
274
274
|
/**
|
|
@@ -290,7 +290,7 @@ export declare class ExecuteCodeAction extends Action {
|
|
|
290
290
|
}
|
|
291
291
|
/**
|
|
292
292
|
* This defines an action responsible to set the parent property of the target once triggered.
|
|
293
|
-
* @see https://doc.babylonjs.com/
|
|
293
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
294
294
|
*/
|
|
295
295
|
export declare class SetParentAction extends Action {
|
|
296
296
|
private _parent;
|
package/Actions/directActions.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Action } from "./action.js";
|
|
|
5
5
|
import { RegisterClass } from "../Misc/typeStore.js";
|
|
6
6
|
/**
|
|
7
7
|
* This defines an action responsible to toggle a boolean once triggered.
|
|
8
|
-
* @see https://doc.babylonjs.com/
|
|
8
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
9
9
|
*/
|
|
10
10
|
export class SwitchBooleanAction extends Action {
|
|
11
11
|
/**
|
|
@@ -46,7 +46,7 @@ export class SwitchBooleanAction extends Action {
|
|
|
46
46
|
/**
|
|
47
47
|
* This defines an action responsible to set a the state field of the target
|
|
48
48
|
* to a desired value once triggered.
|
|
49
|
-
* @see https://doc.babylonjs.com/
|
|
49
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
50
50
|
*/
|
|
51
51
|
export class SetStateAction extends Action {
|
|
52
52
|
/**
|
|
@@ -82,7 +82,7 @@ export class SetStateAction extends Action {
|
|
|
82
82
|
/**
|
|
83
83
|
* This defines an action responsible to set a property of the target
|
|
84
84
|
* to a desired value once triggered.
|
|
85
|
-
* @see https://doc.babylonjs.com/
|
|
85
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
86
86
|
*/
|
|
87
87
|
export class SetValueAction extends Action {
|
|
88
88
|
/**
|
|
@@ -132,7 +132,7 @@ export class SetValueAction extends Action {
|
|
|
132
132
|
/**
|
|
133
133
|
* This defines an action responsible to increment the target value
|
|
134
134
|
* to a desired value once triggered.
|
|
135
|
-
* @see https://doc.babylonjs.com/
|
|
135
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
136
136
|
*/
|
|
137
137
|
export class IncrementValueAction extends Action {
|
|
138
138
|
/**
|
|
@@ -184,7 +184,7 @@ export class IncrementValueAction extends Action {
|
|
|
184
184
|
}
|
|
185
185
|
/**
|
|
186
186
|
* This defines an action responsible to start an animation once triggered.
|
|
187
|
-
* @see https://doc.babylonjs.com/
|
|
187
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
188
188
|
*/
|
|
189
189
|
export class PlayAnimationAction extends Action {
|
|
190
190
|
/**
|
|
@@ -231,7 +231,7 @@ export class PlayAnimationAction extends Action {
|
|
|
231
231
|
}
|
|
232
232
|
/**
|
|
233
233
|
* This defines an action responsible to stop an animation once triggered.
|
|
234
|
-
* @see https://doc.babylonjs.com/
|
|
234
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
235
235
|
*/
|
|
236
236
|
export class StopAnimationAction extends Action {
|
|
237
237
|
/**
|
|
@@ -267,7 +267,7 @@ export class StopAnimationAction extends Action {
|
|
|
267
267
|
}
|
|
268
268
|
/**
|
|
269
269
|
* This defines an action responsible that does nothing once triggered.
|
|
270
|
-
* @see https://doc.babylonjs.com/
|
|
270
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
271
271
|
*/
|
|
272
272
|
export class DoNothingAction extends Action {
|
|
273
273
|
/**
|
|
@@ -296,7 +296,7 @@ export class DoNothingAction extends Action {
|
|
|
296
296
|
}
|
|
297
297
|
/**
|
|
298
298
|
* This defines an action responsible to trigger several actions once triggered.
|
|
299
|
-
* @see https://doc.babylonjs.com/
|
|
299
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
300
300
|
*/
|
|
301
301
|
export class CombineAction extends Action {
|
|
302
302
|
/**
|
|
@@ -348,7 +348,7 @@ export class CombineAction extends Action {
|
|
|
348
348
|
}
|
|
349
349
|
/**
|
|
350
350
|
* This defines an action responsible to run code (external event) once triggered.
|
|
351
|
-
* @see https://doc.babylonjs.com/
|
|
351
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
352
352
|
*/
|
|
353
353
|
export class ExecuteCodeAction extends Action {
|
|
354
354
|
/**
|
|
@@ -371,7 +371,7 @@ export class ExecuteCodeAction extends Action {
|
|
|
371
371
|
}
|
|
372
372
|
/**
|
|
373
373
|
* This defines an action responsible to set the parent property of the target once triggered.
|
|
374
|
-
* @see https://doc.babylonjs.com/
|
|
374
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
375
375
|
*/
|
|
376
376
|
export class SetParentAction extends Action {
|
|
377
377
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directActions.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Actions/directActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIlD;;;GAGG;AACH,MAAM,OAAO,mBAAoB,SAAQ,MAAM;IAU3C;;;;;;OAMG;IACH,YAAY,cAAmB,EAAE,MAAW,EAAE,YAAoB,EAAE,SAAqB;QACrF,KAAK,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC;IAClD,CAAC;IAED,gBAAgB;IACT,QAAQ;QACX,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3F,IAAI,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AAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACjG,EACD,MAAM,CACT,CAAC;IACN,CAAC;CACJ;AAED,aAAa,CAAC,yBAAyB,EAAE,eAAe,CAAC,CAAC;AAC1D,aAAa,CAAC,2BAA2B,EAAE,iBAAiB,CAAC,CAAC;AAC9D,aAAa,CAAC,yBAAyB,EAAE,eAAe,CAAC,CAAC;AAC1D,aAAa,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC;AAClE,aAAa,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC;AAClE,aAAa,CAAC,8BAA8B,EAAE,oBAAoB,CAAC,CAAC;AACpE,aAAa,CAAC,wBAAwB,EAAE,cAAc,CAAC,CAAC;AACxD,aAAa,CAAC,wBAAwB,EAAE,cAAc,CAAC,CAAC;AACxD,aAAa,CAAC,yBAAyB,EAAE,eAAe,CAAC,CAAC","sourcesContent":["import { Logger } from \"../Misc/logger\";\r\nimport { Vector3 } from \"../Maths/math.vector\";\r\nimport { Action } from \"./action\";\r\nimport type { Condition } from \"./condition\";\r\nimport { Constants } from \"../Engines/constants\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\n\r\ndeclare type ActionEvent = import(\"./actionEvent\").ActionEvent;\r\n\r\n/**\r\n * This defines an action responsible to toggle a boolean once triggered.\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_actions\r\n */\r\nexport class SwitchBooleanAction extends Action {\r\n /**\r\n * The path to the boolean property in the target object\r\n */\r\n public propertyPath: string;\r\n\r\n private _target: any;\r\n private _effectiveTarget: any;\r\n private _property: string;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param target defines the object containing the boolean\r\n * @param propertyPath defines the path to the boolean property in the target object\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, target: any, propertyPath: string, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this.propertyPath = propertyPath;\r\n this._target = this._effectiveTarget = target;\r\n }\r\n\r\n /** @internal */\r\n public _prepare(): void {\r\n this._effectiveTarget = this._getEffectiveTarget(this._effectiveTarget, this.propertyPath);\r\n this._property = this._getProperty(this.propertyPath);\r\n }\r\n\r\n /**\r\n * Execute the action toggle the boolean value.\r\n */\r\n public execute(): void {\r\n this._effectiveTarget[this._property] = !this._effectiveTarget[this._property];\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"SwitchBooleanAction\",\r\n properties: [Action._GetTargetProperty(this._target), { name: \"propertyPath\", value: this.propertyPath }],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to set a the state field of the target\r\n * to a desired value once triggered.\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_actions\r\n */\r\nexport class SetStateAction extends Action {\r\n /**\r\n * The value to store in the state field.\r\n */\r\n public value: string;\r\n\r\n private _target: any;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param target defines the object containing the state property\r\n * @param value defines the value to store in the state field\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, target: any, value: string, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this.value = value;\r\n this._target = target;\r\n }\r\n\r\n /**\r\n * Execute the action and store the value on the target state property.\r\n */\r\n public execute(): void {\r\n this._target.state = this.value;\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"SetStateAction\",\r\n properties: [Action._GetTargetProperty(this._target), { name: \"value\", value: this.value }],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to set a property of the target\r\n * to a desired value once triggered.\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_actions\r\n */\r\nexport class SetValueAction extends Action {\r\n /**\r\n * The path of the property to set in the target.\r\n */\r\n public propertyPath: string;\r\n\r\n /**\r\n * The value to set in the property\r\n */\r\n public value: any;\r\n\r\n private _target: any;\r\n private _effectiveTarget: any;\r\n private _property: string;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param target defines the object containing the property\r\n * @param propertyPath defines the path of the property to set in the target\r\n * @param value defines the value to set in the property\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, target: any, propertyPath: string, value: any, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this.propertyPath = propertyPath;\r\n this.value = value;\r\n this._target = this._effectiveTarget = target;\r\n }\r\n\r\n /** @internal */\r\n public _prepare(): void {\r\n this._effectiveTarget = this._getEffectiveTarget(this._effectiveTarget, this.propertyPath);\r\n this._property = this._getProperty(this.propertyPath);\r\n }\r\n\r\n /**\r\n * Execute the action and set the targeted property to the desired value.\r\n */\r\n public execute(): void {\r\n this._effectiveTarget[this._property] = this.value;\r\n\r\n if (this._target.markAsDirty) {\r\n this._target.markAsDirty(this._property);\r\n }\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"SetValueAction\",\r\n properties: [\r\n Action._GetTargetProperty(this._target),\r\n { name: \"propertyPath\", value: this.propertyPath },\r\n { name: \"value\", value: Action._SerializeValueAsString(this.value) },\r\n ],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to increment the target value\r\n * to a desired value once triggered.\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_actions\r\n */\r\nexport class IncrementValueAction extends Action {\r\n /**\r\n * The path of the property to increment in the target.\r\n */\r\n public propertyPath: string;\r\n\r\n /**\r\n * The value we should increment the property by.\r\n */\r\n public value: any;\r\n\r\n private _target: any;\r\n private _effectiveTarget: any;\r\n private _property: string;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param target defines the object containing the property\r\n * @param propertyPath defines the path of the property to increment in the target\r\n * @param value defines the value value we should increment the property by\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, target: any, propertyPath: string, value: any, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this.propertyPath = propertyPath;\r\n this.value = value;\r\n this._target = this._effectiveTarget = target;\r\n }\r\n\r\n /** @internal */\r\n public _prepare(): void {\r\n this._effectiveTarget = this._getEffectiveTarget(this._effectiveTarget, this.propertyPath);\r\n this._property = this._getProperty(this.propertyPath);\r\n\r\n if (typeof this._effectiveTarget[this._property] !== \"number\") {\r\n Logger.Warn(\"Warning: IncrementValueAction can only be used with number values\");\r\n }\r\n }\r\n\r\n /**\r\n * Execute the action and increment the target of the value amount.\r\n */\r\n public execute(): void {\r\n this._effectiveTarget[this._property] += this.value;\r\n\r\n if (this._target.markAsDirty) {\r\n this._target.markAsDirty(this._property);\r\n }\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"IncrementValueAction\",\r\n properties: [\r\n Action._GetTargetProperty(this._target),\r\n { name: \"propertyPath\", value: this.propertyPath },\r\n { name: \"value\", value: Action._SerializeValueAsString(this.value) },\r\n ],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to start an animation once triggered.\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_actions\r\n */\r\nexport class PlayAnimationAction extends Action {\r\n /**\r\n * Where the animation should start (animation frame)\r\n */\r\n public from: number;\r\n\r\n /**\r\n * Where the animation should stop (animation frame)\r\n */\r\n public to: number;\r\n\r\n /**\r\n * Define if the animation should loop or stop after the first play.\r\n */\r\n public loop?: boolean;\r\n\r\n private _target: any;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param target defines the target animation or animation name\r\n * @param from defines from where the animation should start (animation frame)\r\n * @param to defines where the animation should stop (animation frame)\r\n * @param loop defines if the animation should loop or stop after the first play\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, target: any, from: number, to: number, loop?: boolean, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this.from = from;\r\n this.to = to;\r\n this.loop = loop;\r\n this._target = target;\r\n }\r\n\r\n /** @internal */\r\n public _prepare(): void {}\r\n\r\n /**\r\n * Execute the action and play the animation.\r\n */\r\n public execute(): void {\r\n const scene = this._actionManager.getScene();\r\n scene.beginAnimation(this._target, this.from, this.to, this.loop);\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"PlayAnimationAction\",\r\n properties: [\r\n Action._GetTargetProperty(this._target),\r\n { name: \"from\", value: String(this.from) },\r\n { name: \"to\", value: String(this.to) },\r\n { name: \"loop\", value: Action._SerializeValueAsString(this.loop) || false },\r\n ],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to stop an animation once triggered.\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_actions\r\n */\r\nexport class StopAnimationAction extends Action {\r\n private _target: any;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param target defines the target animation or animation name\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, target: any, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this._target = target;\r\n }\r\n\r\n /** @internal */\r\n public _prepare(): void {}\r\n\r\n /**\r\n * Execute the action and stop the animation.\r\n */\r\n public execute(): void {\r\n const scene = this._actionManager.getScene();\r\n scene.stopAnimation(this._target);\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"StopAnimationAction\",\r\n properties: [Action._GetTargetProperty(this._target)],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible that does nothing once triggered.\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_actions\r\n */\r\nexport class DoNothingAction extends Action {\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any = Constants.ACTION_NothingTrigger, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n }\r\n\r\n /**\r\n * Execute the action and do nothing.\r\n */\r\n public execute(): void {}\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"DoNothingAction\",\r\n properties: [],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to trigger several actions once triggered.\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_actions\r\n */\r\nexport class CombineAction extends Action {\r\n /**\r\n * The list of aggregated animations to run.\r\n */\r\n public children: Action[];\r\n\r\n /**\r\n * defines if the children actions conditions should be check before execution\r\n */\r\n public enableChildrenConditions: boolean;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param children defines the list of aggregated animations to run\r\n * @param condition defines the trigger related conditions\r\n * @param enableChildrenConditions defines if the children actions conditions should be check before execution\r\n */\r\n constructor(triggerOptions: any, children: Action[], condition?: Condition, enableChildrenConditions = true) {\r\n super(triggerOptions, condition);\r\n this.children = children;\r\n this.enableChildrenConditions = enableChildrenConditions;\r\n }\r\n\r\n /** @internal */\r\n public _prepare(): void {\r\n for (let index = 0; index < this.children.length; index++) {\r\n this.children[index]._actionManager = this._actionManager;\r\n this.children[index]._prepare();\r\n }\r\n }\r\n\r\n /**\r\n * Execute the action and executes all the aggregated actions.\r\n * @param evt\r\n */\r\n public execute(evt: ActionEvent): void {\r\n for (const action of this.children) {\r\n if (!this.enableChildrenConditions || action._evaluateConditionForCurrentFrame()) {\r\n action.execute(evt);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n const serializationObject = super._serialize(\r\n {\r\n name: \"CombineAction\",\r\n properties: [],\r\n combine: [],\r\n },\r\n parent\r\n );\r\n\r\n for (let i = 0; i < this.children.length; i++) {\r\n serializationObject.combine.push(this.children[i].serialize(null));\r\n }\r\n\r\n return serializationObject;\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to run code (external event) once triggered.\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_actions\r\n */\r\nexport class ExecuteCodeAction extends Action {\r\n /**\r\n * The callback function to run.\r\n */\r\n public func: (evt: ActionEvent) => void;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param func defines the callback function to run\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, func: (evt: ActionEvent) => void, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this.func = func;\r\n }\r\n\r\n /**\r\n * Execute the action and run the attached code.\r\n * @param evt\r\n */\r\n public execute(evt: ActionEvent): void {\r\n this.func(evt);\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to set the parent property of the target once triggered.\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_actions\r\n */\r\nexport class SetParentAction extends Action {\r\n private _parent: any;\r\n private _target: any;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param target defines the target containing the parent property\r\n * @param parent defines from where the animation should start (animation frame)\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, target: any, parent: any, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this._target = target;\r\n this._parent = parent;\r\n }\r\n\r\n /** @internal */\r\n public _prepare(): void {}\r\n\r\n /**\r\n * Execute the action and set the parent property.\r\n */\r\n public execute(): void {\r\n if (this._target.parent === this._parent) {\r\n return;\r\n }\r\n\r\n const invertParentWorldMatrix = this._parent.getWorldMatrix().clone();\r\n invertParentWorldMatrix.invert();\r\n\r\n this._target.position = Vector3.TransformCoordinates(this._target.position, invertParentWorldMatrix);\r\n\r\n this._target.parent = this._parent;\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"SetParentAction\",\r\n properties: [Action._GetTargetProperty(this._target), Action._GetTargetProperty(this._parent)],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.SetParentAction\", SetParentAction);\r\nRegisterClass(\"BABYLON.ExecuteCodeAction\", ExecuteCodeAction);\r\nRegisterClass(\"BABYLON.DoNothingAction\", DoNothingAction);\r\nRegisterClass(\"BABYLON.StopAnimationAction\", StopAnimationAction);\r\nRegisterClass(\"BABYLON.PlayAnimationAction\", PlayAnimationAction);\r\nRegisterClass(\"BABYLON.IncrementValueAction\", IncrementValueAction);\r\nRegisterClass(\"BABYLON.SetValueAction\", SetValueAction);\r\nRegisterClass(\"BABYLON.SetStateAction\", SetStateAction);\r\nRegisterClass(\"BABYLON.SetParentAction\", SetParentAction);\r\n"]}
|
|
1
|
+
{"version":3,"file":"directActions.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Actions/directActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,SAAS,EA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YACtC,OAAO;SACV;QAED,MAAM,uBAAuB,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,KAAK,EAAE,CAAC;QACtE,uBAAuB,CAAC,MAAM,EAAE,CAAC;QAEjC,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,uBAAuB,CAAC,CAAC;QAErG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;IACvC,CAAC;IAED;;;;OAIG;IACI,SAAS,CAAC,MAAW;QACxB,OAAO,KAAK,CAAC,UAAU,CACnB;YACI,IAAI,EAAE,iBAAiB;YACvB,UAAU,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACjG,EACD,MAAM,CACT,CAAC;IACN,CAAC;CACJ;AAED,aAAa,CAAC,yBAAyB,EAAE,eAAe,CAAC,CAAC;AAC1D,aAAa,CAAC,2BAA2B,EAAE,iBAAiB,CAAC,CAAC;AAC9D,aAAa,CAAC,yBAAyB,EAAE,eAAe,CAAC,CAAC;AAC1D,aAAa,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC;AAClE,aAAa,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC;AAClE,aAAa,CAAC,8BAA8B,EAAE,oBAAoB,CAAC,CAAC;AACpE,aAAa,CAAC,wBAAwB,EAAE,cAAc,CAAC,CAAC;AACxD,aAAa,CAAC,wBAAwB,EAAE,cAAc,CAAC,CAAC;AACxD,aAAa,CAAC,yBAAyB,EAAE,eAAe,CAAC,CAAC","sourcesContent":["import { Logger } from \"../Misc/logger\";\r\nimport { Vector3 } from \"../Maths/math.vector\";\r\nimport { Action } from \"./action\";\r\nimport type { Condition } from \"./condition\";\r\nimport { Constants } from \"../Engines/constants\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\n\r\ndeclare type ActionEvent = import(\"./actionEvent\").ActionEvent;\r\n\r\n/**\r\n * This defines an action responsible to toggle a boolean once triggered.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions\r\n */\r\nexport class SwitchBooleanAction extends Action {\r\n /**\r\n * The path to the boolean property in the target object\r\n */\r\n public propertyPath: string;\r\n\r\n private _target: any;\r\n private _effectiveTarget: any;\r\n private _property: string;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param target defines the object containing the boolean\r\n * @param propertyPath defines the path to the boolean property in the target object\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, target: any, propertyPath: string, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this.propertyPath = propertyPath;\r\n this._target = this._effectiveTarget = target;\r\n }\r\n\r\n /** @internal */\r\n public _prepare(): void {\r\n this._effectiveTarget = this._getEffectiveTarget(this._effectiveTarget, this.propertyPath);\r\n this._property = this._getProperty(this.propertyPath);\r\n }\r\n\r\n /**\r\n * Execute the action toggle the boolean value.\r\n */\r\n public execute(): void {\r\n this._effectiveTarget[this._property] = !this._effectiveTarget[this._property];\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"SwitchBooleanAction\",\r\n properties: [Action._GetTargetProperty(this._target), { name: \"propertyPath\", value: this.propertyPath }],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to set a the state field of the target\r\n * to a desired value once triggered.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions\r\n */\r\nexport class SetStateAction extends Action {\r\n /**\r\n * The value to store in the state field.\r\n */\r\n public value: string;\r\n\r\n private _target: any;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param target defines the object containing the state property\r\n * @param value defines the value to store in the state field\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, target: any, value: string, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this.value = value;\r\n this._target = target;\r\n }\r\n\r\n /**\r\n * Execute the action and store the value on the target state property.\r\n */\r\n public execute(): void {\r\n this._target.state = this.value;\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"SetStateAction\",\r\n properties: [Action._GetTargetProperty(this._target), { name: \"value\", value: this.value }],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to set a property of the target\r\n * to a desired value once triggered.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions\r\n */\r\nexport class SetValueAction extends Action {\r\n /**\r\n * The path of the property to set in the target.\r\n */\r\n public propertyPath: string;\r\n\r\n /**\r\n * The value to set in the property\r\n */\r\n public value: any;\r\n\r\n private _target: any;\r\n private _effectiveTarget: any;\r\n private _property: string;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param target defines the object containing the property\r\n * @param propertyPath defines the path of the property to set in the target\r\n * @param value defines the value to set in the property\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, target: any, propertyPath: string, value: any, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this.propertyPath = propertyPath;\r\n this.value = value;\r\n this._target = this._effectiveTarget = target;\r\n }\r\n\r\n /** @internal */\r\n public _prepare(): void {\r\n this._effectiveTarget = this._getEffectiveTarget(this._effectiveTarget, this.propertyPath);\r\n this._property = this._getProperty(this.propertyPath);\r\n }\r\n\r\n /**\r\n * Execute the action and set the targeted property to the desired value.\r\n */\r\n public execute(): void {\r\n this._effectiveTarget[this._property] = this.value;\r\n\r\n if (this._target.markAsDirty) {\r\n this._target.markAsDirty(this._property);\r\n }\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"SetValueAction\",\r\n properties: [\r\n Action._GetTargetProperty(this._target),\r\n { name: \"propertyPath\", value: this.propertyPath },\r\n { name: \"value\", value: Action._SerializeValueAsString(this.value) },\r\n ],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to increment the target value\r\n * to a desired value once triggered.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions\r\n */\r\nexport class IncrementValueAction extends Action {\r\n /**\r\n * The path of the property to increment in the target.\r\n */\r\n public propertyPath: string;\r\n\r\n /**\r\n * The value we should increment the property by.\r\n */\r\n public value: any;\r\n\r\n private _target: any;\r\n private _effectiveTarget: any;\r\n private _property: string;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param target defines the object containing the property\r\n * @param propertyPath defines the path of the property to increment in the target\r\n * @param value defines the value value we should increment the property by\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, target: any, propertyPath: string, value: any, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this.propertyPath = propertyPath;\r\n this.value = value;\r\n this._target = this._effectiveTarget = target;\r\n }\r\n\r\n /** @internal */\r\n public _prepare(): void {\r\n this._effectiveTarget = this._getEffectiveTarget(this._effectiveTarget, this.propertyPath);\r\n this._property = this._getProperty(this.propertyPath);\r\n\r\n if (typeof this._effectiveTarget[this._property] !== \"number\") {\r\n Logger.Warn(\"Warning: IncrementValueAction can only be used with number values\");\r\n }\r\n }\r\n\r\n /**\r\n * Execute the action and increment the target of the value amount.\r\n */\r\n public execute(): void {\r\n this._effectiveTarget[this._property] += this.value;\r\n\r\n if (this._target.markAsDirty) {\r\n this._target.markAsDirty(this._property);\r\n }\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"IncrementValueAction\",\r\n properties: [\r\n Action._GetTargetProperty(this._target),\r\n { name: \"propertyPath\", value: this.propertyPath },\r\n { name: \"value\", value: Action._SerializeValueAsString(this.value) },\r\n ],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to start an animation once triggered.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions\r\n */\r\nexport class PlayAnimationAction extends Action {\r\n /**\r\n * Where the animation should start (animation frame)\r\n */\r\n public from: number;\r\n\r\n /**\r\n * Where the animation should stop (animation frame)\r\n */\r\n public to: number;\r\n\r\n /**\r\n * Define if the animation should loop or stop after the first play.\r\n */\r\n public loop?: boolean;\r\n\r\n private _target: any;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param target defines the target animation or animation name\r\n * @param from defines from where the animation should start (animation frame)\r\n * @param to defines where the animation should stop (animation frame)\r\n * @param loop defines if the animation should loop or stop after the first play\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, target: any, from: number, to: number, loop?: boolean, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this.from = from;\r\n this.to = to;\r\n this.loop = loop;\r\n this._target = target;\r\n }\r\n\r\n /** @internal */\r\n public _prepare(): void {}\r\n\r\n /**\r\n * Execute the action and play the animation.\r\n */\r\n public execute(): void {\r\n const scene = this._actionManager.getScene();\r\n scene.beginAnimation(this._target, this.from, this.to, this.loop);\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"PlayAnimationAction\",\r\n properties: [\r\n Action._GetTargetProperty(this._target),\r\n { name: \"from\", value: String(this.from) },\r\n { name: \"to\", value: String(this.to) },\r\n { name: \"loop\", value: Action._SerializeValueAsString(this.loop) || false },\r\n ],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to stop an animation once triggered.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions\r\n */\r\nexport class StopAnimationAction extends Action {\r\n private _target: any;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param target defines the target animation or animation name\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, target: any, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this._target = target;\r\n }\r\n\r\n /** @internal */\r\n public _prepare(): void {}\r\n\r\n /**\r\n * Execute the action and stop the animation.\r\n */\r\n public execute(): void {\r\n const scene = this._actionManager.getScene();\r\n scene.stopAnimation(this._target);\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"StopAnimationAction\",\r\n properties: [Action._GetTargetProperty(this._target)],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible that does nothing once triggered.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions\r\n */\r\nexport class DoNothingAction extends Action {\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any = Constants.ACTION_NothingTrigger, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n }\r\n\r\n /**\r\n * Execute the action and do nothing.\r\n */\r\n public execute(): void {}\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"DoNothingAction\",\r\n properties: [],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to trigger several actions once triggered.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions\r\n */\r\nexport class CombineAction extends Action {\r\n /**\r\n * The list of aggregated animations to run.\r\n */\r\n public children: Action[];\r\n\r\n /**\r\n * defines if the children actions conditions should be check before execution\r\n */\r\n public enableChildrenConditions: boolean;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param children defines the list of aggregated animations to run\r\n * @param condition defines the trigger related conditions\r\n * @param enableChildrenConditions defines if the children actions conditions should be check before execution\r\n */\r\n constructor(triggerOptions: any, children: Action[], condition?: Condition, enableChildrenConditions = true) {\r\n super(triggerOptions, condition);\r\n this.children = children;\r\n this.enableChildrenConditions = enableChildrenConditions;\r\n }\r\n\r\n /** @internal */\r\n public _prepare(): void {\r\n for (let index = 0; index < this.children.length; index++) {\r\n this.children[index]._actionManager = this._actionManager;\r\n this.children[index]._prepare();\r\n }\r\n }\r\n\r\n /**\r\n * Execute the action and executes all the aggregated actions.\r\n * @param evt\r\n */\r\n public execute(evt: ActionEvent): void {\r\n for (const action of this.children) {\r\n if (!this.enableChildrenConditions || action._evaluateConditionForCurrentFrame()) {\r\n action.execute(evt);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n const serializationObject = super._serialize(\r\n {\r\n name: \"CombineAction\",\r\n properties: [],\r\n combine: [],\r\n },\r\n parent\r\n );\r\n\r\n for (let i = 0; i < this.children.length; i++) {\r\n serializationObject.combine.push(this.children[i].serialize(null));\r\n }\r\n\r\n return serializationObject;\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to run code (external event) once triggered.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions\r\n */\r\nexport class ExecuteCodeAction extends Action {\r\n /**\r\n * The callback function to run.\r\n */\r\n public func: (evt: ActionEvent) => void;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param func defines the callback function to run\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, func: (evt: ActionEvent) => void, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this.func = func;\r\n }\r\n\r\n /**\r\n * Execute the action and run the attached code.\r\n * @param evt\r\n */\r\n public execute(evt: ActionEvent): void {\r\n this.func(evt);\r\n }\r\n}\r\n\r\n/**\r\n * This defines an action responsible to set the parent property of the target once triggered.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions\r\n */\r\nexport class SetParentAction extends Action {\r\n private _parent: any;\r\n private _target: any;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param target defines the target containing the parent property\r\n * @param parent defines from where the animation should start (animation frame)\r\n * @param condition defines the trigger related conditions\r\n */\r\n constructor(triggerOptions: any, target: any, parent: any, condition?: Condition) {\r\n super(triggerOptions, condition);\r\n this._target = target;\r\n this._parent = parent;\r\n }\r\n\r\n /** @internal */\r\n public _prepare(): void {}\r\n\r\n /**\r\n * Execute the action and set the parent property.\r\n */\r\n public execute(): void {\r\n if (this._target.parent === this._parent) {\r\n return;\r\n }\r\n\r\n const invertParentWorldMatrix = this._parent.getWorldMatrix().clone();\r\n invertParentWorldMatrix.invert();\r\n\r\n this._target.position = Vector3.TransformCoordinates(this._target.position, invertParentWorldMatrix);\r\n\r\n this._target.parent = this._parent;\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"SetParentAction\",\r\n properties: [Action._GetTargetProperty(this._target), Action._GetTargetProperty(this._parent)],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.SetParentAction\", SetParentAction);\r\nRegisterClass(\"BABYLON.ExecuteCodeAction\", ExecuteCodeAction);\r\nRegisterClass(\"BABYLON.DoNothingAction\", DoNothingAction);\r\nRegisterClass(\"BABYLON.StopAnimationAction\", StopAnimationAction);\r\nRegisterClass(\"BABYLON.PlayAnimationAction\", PlayAnimationAction);\r\nRegisterClass(\"BABYLON.IncrementValueAction\", IncrementValueAction);\r\nRegisterClass(\"BABYLON.SetValueAction\", SetValueAction);\r\nRegisterClass(\"BABYLON.SetStateAction\", SetStateAction);\r\nRegisterClass(\"BABYLON.SetParentAction\", SetParentAction);\r\n"]}
|
|
@@ -4,7 +4,7 @@ import { Observable } from "../Misc/observable";
|
|
|
4
4
|
/**
|
|
5
5
|
* This defines an action responsible to change the value of a property
|
|
6
6
|
* by interpolating between its current value and the newly set one once triggered.
|
|
7
|
-
* @see https://doc.babylonjs.com/
|
|
7
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
8
8
|
*/
|
|
9
9
|
export declare class InterpolateValueAction extends Action {
|
|
10
10
|
/**
|
|
@@ -8,7 +8,7 @@ import { RegisterClass } from "../Misc/typeStore.js";
|
|
|
8
8
|
/**
|
|
9
9
|
* This defines an action responsible to change the value of a property
|
|
10
10
|
* by interpolating between its current value and the newly set one once triggered.
|
|
11
|
-
* @see https://doc.babylonjs.com/
|
|
11
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions
|
|
12
12
|
*/
|
|
13
13
|
export class InterpolateValueAction extends Action {
|
|
14
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interpolateValueAction.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Actions/interpolateValueAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,E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E;gBAC1B,IAAI,CAAC,mBAAmB,EAAE,CAAC;aAC9B;QACL,CAAC,CAAC;QAEF,KAAK,CAAC,oBAAoB,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;IAC9F,CAAC;IAED;;;;OAIG;IACI,SAAS,CAAC,MAAW;QACxB,OAAO,KAAK,CAAC,UAAU,CACnB;YACI,IAAI,EAAE,wBAAwB;YAC9B,UAAU,EAAE;gBACR,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC;gBACvC,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE;gBAClD,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;gBACpE,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,uBAAuB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;gBAC1E,EAAE,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,CAAC,uBAAuB,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,KAAK,EAAE;aAC5G;SACJ,EACD,MAAM,CACT,CAAC;IACN,CAAC;CACJ;AAED,aAAa,CAAC,gCAAgC,EAAE,sBAAsB,CAAC,CAAC","sourcesContent":["import { Action } from \"./action\";\r\nimport type { Condition } from \"./condition\";\r\n\r\nimport { Logger } from \"../Misc/logger\";\r\nimport { Observable } from \"../Misc/observable\";\r\nimport { Color3 } from \"../Maths/math.color\";\r\nimport { Vector3, Matrix, Quaternion } from \"../Maths/math.vector\";\r\nimport { Animation } from \"../Animations/animation\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\n\r\n/**\r\n * This defines an action responsible to change the value of a property\r\n * by interpolating between its current value and the newly set one once triggered.\r\n * @see https://doc.babylonjs.com/
|
|
1
|
+
{"version":3,"file":"interpolateValueAction.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Actions/interpolateValueAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;;;;GAIG;AACH,MAAM,OAAO,sBAAuB,SAAQ,MAAM;IAmC9C;;;;;;;;;;OAUG;IACH,YACI,cAAmB,EACnB,MAAW,EACX,YAAoB,EACpB,KAAU,EACV,WAAmB,IAAI,EACvB,SAAqB,EACrB,mBAA6B,EAC7B,mBAAgC;QAEhC,KAAK,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;QA7CrC;;WAEG;QACI,aAAQ,GAAW,IAAI,CAAC;QAY/B;;WAEG;QACI,kCAA6B,GAAG,IAAI,UAAU,EAA0B,CAAC;QA6B5E,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QAC/C,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC;IAClD,CAAC;IAED,gBAAgB;IACT,QAAQ;QACX,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,mBAAm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ED,aAAa,CAAC,gCAAgC,EAAE,sBAAsB,CAAC,CAAC","sourcesContent":["import { Action } from \"./action\";\r\nimport type { Condition } from \"./condition\";\r\n\r\nimport { Logger } from \"../Misc/logger\";\r\nimport { Observable } from \"../Misc/observable\";\r\nimport { Color3 } from \"../Maths/math.color\";\r\nimport { Vector3, Matrix, Quaternion } from \"../Maths/math.vector\";\r\nimport { Animation } from \"../Animations/animation\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\n\r\n/**\r\n * This defines an action responsible to change the value of a property\r\n * by interpolating between its current value and the newly set one once triggered.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/events/actions\r\n */\r\nexport class InterpolateValueAction extends Action {\r\n /**\r\n * Defines the path of the property where the value should be interpolated\r\n */\r\n public propertyPath: string;\r\n\r\n /**\r\n * Defines the target value at the end of the interpolation.\r\n */\r\n public value: any;\r\n\r\n /**\r\n * Defines the time it will take for the property to interpolate to the value.\r\n */\r\n public duration: number = 1000;\r\n\r\n /**\r\n * Defines if the other scene animations should be stopped when the action has been triggered\r\n */\r\n public stopOtherAnimations?: boolean;\r\n\r\n /**\r\n * Defines a callback raised once the interpolation animation has been done.\r\n */\r\n public onInterpolationDone?: () => void;\r\n\r\n /**\r\n * Observable triggered once the interpolation animation has been done.\r\n */\r\n public onInterpolationDoneObservable = new Observable<InterpolateValueAction>();\r\n\r\n private _target: any;\r\n private _effectiveTarget: any;\r\n private _property: string;\r\n\r\n /**\r\n * Instantiate the action\r\n * @param triggerOptions defines the trigger options\r\n * @param target defines the object containing the value to interpolate\r\n * @param propertyPath defines the path to the property in the target object\r\n * @param value defines the target value at the end of the interpolation\r\n * @param duration defines the time it will take for the property to interpolate to the value.\r\n * @param condition defines the trigger related conditions\r\n * @param stopOtherAnimations defines if the other scene animations should be stopped when the action has been triggered\r\n * @param onInterpolationDone defines a callback raised once the interpolation animation has been done\r\n */\r\n constructor(\r\n triggerOptions: any,\r\n target: any,\r\n propertyPath: string,\r\n value: any,\r\n duration: number = 1000,\r\n condition?: Condition,\r\n stopOtherAnimations?: boolean,\r\n onInterpolationDone?: () => void\r\n ) {\r\n super(triggerOptions, condition);\r\n\r\n this.propertyPath = propertyPath;\r\n this.value = value;\r\n this.duration = duration;\r\n this.stopOtherAnimations = stopOtherAnimations;\r\n this.onInterpolationDone = onInterpolationDone;\r\n this._target = this._effectiveTarget = target;\r\n }\r\n\r\n /** @internal */\r\n public _prepare(): void {\r\n this._effectiveTarget = this._getEffectiveTarget(this._effectiveTarget, this.propertyPath);\r\n this._property = this._getProperty(this.propertyPath);\r\n }\r\n\r\n /**\r\n * Execute the action starts the value interpolation.\r\n */\r\n public execute(): void {\r\n const scene = this._actionManager.getScene();\r\n const keys = [\r\n {\r\n frame: 0,\r\n value: this._effectiveTarget[this._property],\r\n },\r\n {\r\n frame: 100,\r\n value: this.value,\r\n },\r\n ];\r\n\r\n let dataType: number;\r\n\r\n if (typeof this.value === \"number\") {\r\n dataType = Animation.ANIMATIONTYPE_FLOAT;\r\n } else if (this.value instanceof Color3) {\r\n dataType = Animation.ANIMATIONTYPE_COLOR3;\r\n } else if (this.value instanceof Vector3) {\r\n dataType = Animation.ANIMATIONTYPE_VECTOR3;\r\n } else if (this.value instanceof Matrix) {\r\n dataType = Animation.ANIMATIONTYPE_MATRIX;\r\n } else if (this.value instanceof Quaternion) {\r\n dataType = Animation.ANIMATIONTYPE_QUATERNION;\r\n } else {\r\n Logger.Warn(\"InterpolateValueAction: Unsupported type (\" + typeof this.value + \")\");\r\n return;\r\n }\r\n\r\n const animation = new Animation(\"InterpolateValueAction\", this._property, 100 * (1000.0 / this.duration), dataType, Animation.ANIMATIONLOOPMODE_CONSTANT);\r\n\r\n animation.setKeys(keys);\r\n\r\n if (this.stopOtherAnimations) {\r\n scene.stopAnimation(this._effectiveTarget);\r\n }\r\n\r\n const wrapper = () => {\r\n this.onInterpolationDoneObservable.notifyObservers(this);\r\n if (this.onInterpolationDone) {\r\n this.onInterpolationDone();\r\n }\r\n };\r\n\r\n scene.beginDirectAnimation(this._effectiveTarget, [animation], 0, 100, false, 1, wrapper);\r\n }\r\n\r\n /**\r\n * Serializes the actions and its related information.\r\n * @param parent defines the object to serialize in\r\n * @returns the serialized object\r\n */\r\n public serialize(parent: any): any {\r\n return super._serialize(\r\n {\r\n name: \"InterpolateValueAction\",\r\n properties: [\r\n Action._GetTargetProperty(this._target),\r\n { name: \"propertyPath\", value: this.propertyPath },\r\n { name: \"value\", value: Action._SerializeValueAsString(this.value) },\r\n { name: \"duration\", value: Action._SerializeValueAsString(this.duration) },\r\n { name: \"stopOtherAnimations\", value: Action._SerializeValueAsString(this.stopOtherAnimations) || false },\r\n ],\r\n },\r\n parent\r\n );\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.InterpolateValueAction\", InterpolateValueAction);\r\n"]}
|
|
@@ -134,13 +134,13 @@ export declare class Animatable {
|
|
|
134
134
|
reset(): void;
|
|
135
135
|
/**
|
|
136
136
|
* Allows the animatable to blend with current running animations
|
|
137
|
-
* @see https://doc.babylonjs.com/
|
|
137
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-blending
|
|
138
138
|
* @param blendingSpeed defines the blending speed to use
|
|
139
139
|
*/
|
|
140
140
|
enableBlending(blendingSpeed: number): void;
|
|
141
141
|
/**
|
|
142
142
|
* Disable animation blending
|
|
143
|
-
* @see https://doc.babylonjs.com/
|
|
143
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-blending
|
|
144
144
|
*/
|
|
145
145
|
disableBlending(): void;
|
|
146
146
|
/**
|
package/Animations/animatable.js
CHANGED
|
@@ -211,7 +211,7 @@ export class Animatable {
|
|
|
211
211
|
}
|
|
212
212
|
/**
|
|
213
213
|
* Allows the animatable to blend with current running animations
|
|
214
|
-
* @see https://doc.babylonjs.com/
|
|
214
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-blending
|
|
215
215
|
* @param blendingSpeed defines the blending speed to use
|
|
216
216
|
*/
|
|
217
217
|
enableBlending(blendingSpeed) {
|
|
@@ -223,7 +223,7 @@ export class Animatable {
|
|
|
223
223
|
}
|
|
224
224
|
/**
|
|
225
225
|
* Disable animation blending
|
|
226
|
-
* @see https://doc.babylonjs.com/
|
|
226
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-blending
|
|
227
227
|
*/
|
|
228
228
|
disableBlending() {
|
|
229
229
|
const runtimeAnimations = this._runtimeAnimations;
|