@onerjs/core 8.56.4 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Animations/animatable.core.js +36 -0
- package/Animations/animatable.core.js.map +1 -1
- package/Animations/animationGroup.pure.d.ts +61 -1
- package/Animations/animationGroup.pure.js +191 -2
- package/Animations/animationGroup.pure.js.map +1 -1
- package/Animations/index.d.ts +1 -0
- package/Animations/index.js +1 -0
- package/Animations/index.js.map +1 -1
- package/Animations/pure.d.ts +1 -0
- package/Animations/pure.js +1 -0
- package/Animations/pure.js.map +1 -1
- package/Animations/rootMotion.d.ts +560 -0
- package/Animations/rootMotion.js +1709 -0
- package/Animations/rootMotion.js.map +1 -0
- package/Animations/runtimeAnimation.d.ts +57 -0
- package/Animations/runtimeAnimation.js +127 -3
- package/Animations/runtimeAnimation.js.map +1 -1
- package/Cameras/arcRotateCamera.pure.d.ts +2 -0
- package/Cameras/arcRotateCamera.pure.js +2 -0
- package/Cameras/arcRotateCamera.pure.js.map +1 -1
- package/Cameras/targetCamera.pure.d.ts +2 -0
- package/Cameras/targetCamera.pure.js +7 -1
- package/Cameras/targetCamera.pure.js.map +1 -1
- package/Collisions/gpuPicker.js +5 -5
- package/Collisions/gpuPicker.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.query.pure.js +4 -2
- package/Engines/AbstractEngine/abstractEngine.query.pure.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.query.types.d.ts +11 -2
- package/Engines/AbstractEngine/abstractEngine.query.types.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.renderPass.pure.js +1 -0
- package/Engines/AbstractEngine/abstractEngine.renderPass.pure.js.map +1 -1
- package/Engines/Extensions/engine.multiRender.pure.js +63 -0
- package/Engines/Extensions/engine.multiRender.pure.js.map +1 -1
- package/Engines/Extensions/engine.multiRender.types.d.ts +13 -0
- package/Engines/Extensions/engine.multiRender.types.js.map +1 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.pure.js +2 -2
- package/Engines/Extensions/engine.prefilteredCubeTexture.pure.js.map +1 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.types.d.ts +2 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.types.js.map +1 -1
- package/Engines/Extensions/index.d.ts +1 -0
- package/Engines/Extensions/index.js +1 -0
- package/Engines/Extensions/index.js.map +1 -1
- package/Engines/Extensions/pure.d.ts +1 -1
- package/Engines/Extensions/pure.js +1 -1
- package/Engines/Extensions/pure.js.map +1 -1
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.js +88 -39
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.js.map +1 -1
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.types.d.ts +20 -2
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.types.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.multiRender.pure.js +4 -0
- package/Engines/WebGPU/Extensions/engine.multiRender.pure.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.multiRender.types.d.ts +13 -0
- package/Engines/WebGPU/Extensions/engine.multiRender.types.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.query.pure.js +11 -3
- package/Engines/WebGPU/Extensions/engine.query.pure.js.map +1 -1
- package/Engines/WebGPU/Extensions/index.d.ts +1 -0
- package/Engines/WebGPU/Extensions/index.js +1 -0
- package/Engines/WebGPU/Extensions/index.js.map +1 -1
- package/Engines/WebGPU/Extensions/pure.d.ts +1 -1
- package/Engines/WebGPU/Extensions/pure.js +1 -1
- package/Engines/WebGPU/Extensions/pure.js.map +1 -1
- package/Engines/WebGPU/webgpuBundleList.d.ts +2 -0
- package/Engines/WebGPU/webgpuBundleList.js +4 -0
- package/Engines/WebGPU/webgpuBundleList.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js +5 -2
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
- package/Engines/WebGPU/webgpuHardwareTexture.js +3 -1
- package/Engines/WebGPU/webgpuHardwareTexture.js.map +1 -1
- package/Engines/WebGPU/webgpuOcclusionQuery.js +1 -1
- package/Engines/WebGPU/webgpuOcclusionQuery.js.map +1 -1
- package/Engines/WebGPU/webgpuSnapshotRendering.d.ts +4 -0
- package/Engines/WebGPU/webgpuSnapshotRendering.js +40 -7
- package/Engines/WebGPU/webgpuSnapshotRendering.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureHelper.d.ts +1 -1
- package/Engines/WebGPU/webgpuTextureHelper.js +2 -2
- package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureManager.d.ts +2 -0
- package/Engines/WebGPU/webgpuTextureManager.js +286 -13
- package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
- package/Engines/abstractEngine.pure.d.ts +2 -0
- package/Engines/abstractEngine.pure.js +7 -3
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/constants.d.ts +4 -0
- package/Engines/constants.js +4 -0
- package/Engines/constants.js.map +1 -1
- package/Engines/thinEngine.pure.d.ts +14 -0
- package/Engines/thinEngine.pure.js +48 -12
- package/Engines/thinEngine.pure.js.map +1 -1
- package/Engines/thinNativeEngine.pure.d.ts +1 -0
- package/Engines/thinNativeEngine.pure.js +7 -1
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Engines/thinWebGPUEngine.d.ts +4 -0
- package/Engines/thinWebGPUEngine.js +10 -1
- package/Engines/thinWebGPUEngine.js.map +1 -1
- package/Engines/webgpuEngine.pure.d.ts +5 -2
- package/Engines/webgpuEngine.pure.js +48 -13
- package/Engines/webgpuEngine.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.pure.js +2 -2
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.d.ts +11 -2
- package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.js +1 -1
- package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.pure.d.ts +9 -1
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.pure.js +6 -8
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.pure.d.ts +2 -0
- package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.pure.js +5 -1
- package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.pure.d.ts +2 -0
- package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.pure.js +5 -1
- package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.d.ts +9 -0
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.js +34 -9
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.d.ts +2 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.js +4 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.d.ts +2 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js +4 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSendCustomEventBlock.pure.js +19 -7
- package/FlowGraph/Blocks/Event/flowGraphSendCustomEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.d.ts +20 -2
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js +53 -10
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.pure.d.ts +16 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.pure.js +64 -14
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.pure.js +64 -16
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.pure.js.map +1 -1
- package/FlowGraph/flowGraph.d.ts +4 -0
- package/FlowGraph/flowGraph.js +38 -7
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphBlock.js +3 -0
- package/FlowGraph/flowGraphBlock.js.map +1 -1
- package/FlowGraph/flowGraphConnection.d.ts +7 -0
- package/FlowGraph/flowGraphConnection.js +7 -0
- package/FlowGraph/flowGraphConnection.js.map +1 -1
- package/FlowGraph/flowGraphContext.d.ts +2 -1
- package/FlowGraph/flowGraphContext.js +4 -3
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphCoordinator.d.ts +15 -1
- package/FlowGraph/flowGraphCoordinator.js +47 -16
- package/FlowGraph/flowGraphCoordinator.js.map +1 -1
- package/FlowGraph/flowGraphEventBlock.d.ts +5 -0
- package/FlowGraph/flowGraphEventBlock.js +7 -0
- package/FlowGraph/flowGraphEventBlock.js.map +1 -1
- package/FlowGraph/flowGraphHostResolver.d.ts +2 -1
- package/FlowGraph/flowGraphHostResolver.js.map +1 -1
- package/FlowGraph/flowGraphParser.js +60 -2
- package/FlowGraph/flowGraphParser.js.map +1 -1
- package/FlowGraph/serialization.d.ts +2 -0
- package/FlowGraph/serialization.js +10 -22
- package/FlowGraph/serialization.js.map +1 -1
- package/FlowGraph/typeDefinitions.d.ts +8 -0
- package/FlowGraph/typeDefinitions.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.d.ts +5 -0
- package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.js +8 -0
- package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.pure.d.ts +87 -0
- package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.pure.js +295 -0
- package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.pure.js.map +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/pure.d.ts +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/pure.js +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +4 -4
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.d.ts +5 -1
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js +13 -1
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/allBlocks.pure.js +2 -0
- package/FrameGraph/Node/Blocks/allBlocks.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/index.d.ts +1 -0
- package/FrameGraph/Node/Blocks/index.js +1 -0
- package/FrameGraph/Node/Blocks/index.js.map +1 -1
- package/FrameGraph/Node/Blocks/inputBlock.pure.js +20 -1
- package/FrameGraph/Node/Blocks/inputBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/pure.d.ts +1 -0
- package/FrameGraph/Node/Blocks/pure.js +1 -0
- package/FrameGraph/Node/Blocks/pure.js.map +1 -1
- package/FrameGraph/Node/Types/nodeRenderGraphTypes.d.ts +4 -2
- package/FrameGraph/Node/Types/nodeRenderGraphTypes.js +4 -2
- package/FrameGraph/Node/Types/nodeRenderGraphTypes.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraph.js +1 -1
- package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
- package/FrameGraph/Tasks/Layers/selectionOutlineTask.js +1 -0
- package/FrameGraph/Tasks/Layers/selectionOutlineTask.js.map +1 -1
- package/FrameGraph/Tasks/Misc/cullObjectsTask.js +5 -1
- package/FrameGraph/Tasks/Misc/cullObjectsTask.js.map +1 -1
- package/FrameGraph/Tasks/Misc/lightingVolumeTask.js +1 -0
- package/FrameGraph/Tasks/Misc/lightingVolumeTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/meshBlendingTask.d.ts +69 -0
- package/FrameGraph/Tasks/PostProcesses/meshBlendingTask.js +223 -0
- package/FrameGraph/Tasks/PostProcesses/meshBlendingTask.js.map +1 -0
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +25 -3
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +69 -33
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js +3 -1
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
- package/FrameGraph/frameGraphObjectList.d.ts +6 -1
- package/FrameGraph/frameGraphObjectList.js.map +1 -1
- package/FrameGraph/frameGraphRenderContext.d.ts +3 -1
- package/FrameGraph/frameGraphRenderContext.js +5 -5
- package/FrameGraph/frameGraphRenderContext.js.map +1 -1
- package/FrameGraph/index.d.ts +1 -0
- package/FrameGraph/index.js +1 -0
- package/FrameGraph/index.js.map +1 -1
- package/FrameGraph/pure.d.ts +1 -0
- package/FrameGraph/pure.js +1 -0
- package/FrameGraph/pure.js.map +1 -1
- package/Inputs/scene.inputManager.d.ts +4 -0
- package/Inputs/scene.inputManager.js +50 -8
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js +5 -5
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js +5 -5
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.d.ts +26 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +151 -47
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js +5 -5
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js +11 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/prePassOutputBlock.pure.js +17 -2
- package/Materials/Node/Blocks/Fragment/prePassOutputBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js +2 -2
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js.map +1 -1
- package/Materials/Node/nodeMaterial.pure.d.ts +4 -0
- package/Materials/Node/nodeMaterial.pure.js +4 -0
- package/Materials/Node/nodeMaterial.pure.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.d.ts +1 -1
- package/Materials/Node/nodeMaterialBuildState.js +25 -3
- package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
- package/Materials/PBR/openpbrMaterial.pure.d.ts +2 -0
- package/Materials/PBR/pbrBaseMaterial.pure.d.ts +2 -0
- package/Materials/Textures/Procedurals/proceduralTexture.pure.d.ts +13 -14
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js +6 -6
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
- package/Materials/Textures/baseTexture.pure.js +3 -0
- package/Materials/Textures/baseTexture.pure.js.map +1 -1
- package/Materials/Textures/cubeTexture.pure.js +1 -1
- package/Materials/Textures/cubeTexture.pure.js.map +1 -1
- package/Materials/Textures/internalTexture.d.ts +8 -1
- package/Materials/Textures/internalTexture.js +9 -2
- package/Materials/Textures/internalTexture.js.map +1 -1
- package/Materials/Textures/rawTexture2DArray.functions.d.ts +3 -3
- package/Materials/Textures/rawTexture2DArray.functions.js.map +1 -1
- package/Materials/Textures/rawTexture3D.d.ts +1 -1
- package/Materials/Textures/rawTexture3D.js +1 -1
- package/Materials/Textures/rawTexture3D.js.map +1 -1
- package/Materials/Textures/textureHelper.functions.d.ts +14 -0
- package/Materials/Textures/textureHelper.functions.js +24 -0
- package/Materials/Textures/textureHelper.functions.js.map +1 -1
- package/Materials/ditheredTileFadeMaterialPlugin.d.ts +210 -0
- package/Materials/ditheredTileFadeMaterialPlugin.js +509 -0
- package/Materials/ditheredTileFadeMaterialPlugin.js.map +1 -0
- package/Materials/index.d.ts +1 -0
- package/Materials/index.js +1 -0
- package/Materials/index.js.map +1 -1
- package/Materials/materialHelper.geometryrendering.d.ts +46 -1
- package/Materials/materialHelper.geometryrendering.js +105 -8
- package/Materials/materialHelper.geometryrendering.js.map +1 -1
- package/Materials/prepass.defines.d.ts +2 -0
- package/Materials/prepass.defines.js +2 -0
- package/Materials/prepass.defines.js.map +1 -1
- package/Materials/pure.d.ts +1 -0
- package/Materials/pure.js +1 -0
- package/Materials/pure.js.map +1 -1
- package/Materials/standardMaterial.pure.d.ts +2 -0
- package/Materials/standardMaterial.pure.js +6 -3
- package/Materials/standardMaterial.pure.js.map +1 -1
- package/Meshes/Builders/polygonBuilder.pure.d.ts +4 -0
- package/Meshes/Builders/polygonBuilder.pure.js +4 -1
- package/Meshes/Builders/polygonBuilder.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplatting.functions.d.ts +19 -0
- package/Meshes/GaussianSplatting/gaussianSplatting.functions.js +23 -0
- package/Meshes/GaussianSplatting/gaussianSplatting.functions.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +3 -14
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +20 -24
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +2 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +11 -4
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/abstractMesh.pure.d.ts +18 -0
- package/Meshes/abstractMesh.pure.js +22 -0
- package/Meshes/abstractMesh.pure.js.map +1 -1
- package/Meshes/index.d.ts +1 -0
- package/Meshes/index.js +1 -0
- package/Meshes/index.js.map +1 -1
- package/Meshes/instancedMesh.pure.d.ts +5 -0
- package/Meshes/instancedMesh.pure.js +12 -0
- package/Meshes/instancedMesh.pure.js.map +1 -1
- package/Meshes/mesh.pure.js +23 -8
- package/Meshes/mesh.pure.js.map +1 -1
- package/Meshes/meshBlendingTag.d.ts +47 -0
- package/Meshes/meshBlendingTag.js +64 -0
- package/Meshes/meshBlendingTag.js.map +1 -0
- package/Meshes/polygonMesh.js +2 -2
- package/Meshes/polygonMesh.js.map +1 -1
- package/Meshes/pure.d.ts +1 -0
- package/Meshes/pure.js +1 -0
- package/Meshes/pure.js.map +1 -1
- package/Misc/fileTools.pure.js +21 -0
- package/Misc/fileTools.pure.js.map +1 -1
- package/Misc/snapshotRenderingHelper.js +2 -2
- package/Misc/snapshotRenderingHelper.js.map +1 -1
- package/Misc/tools.pure.js +1 -1
- package/Misc/tools.pure.js.map +1 -1
- package/Particles/gpuParticleSystem.pure.d.ts +2 -0
- package/Particles/gpuParticleSystem.pure.js +89 -28
- package/Particles/gpuParticleSystem.pure.js.map +1 -1
- package/Particles/thinParticleSystem.pure.d.ts +2 -0
- package/Particles/thinParticleSystem.pure.js +84 -19
- package/Particles/thinParticleSystem.pure.js.map +1 -1
- package/Particles/webgl2ParticleSystem.pure.d.ts +1 -0
- package/Particles/webgl2ParticleSystem.pure.js +12 -4
- package/Particles/webgl2ParticleSystem.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.pure.js +7 -0
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/index.d.ts +2 -0
- package/PostProcesses/index.js +2 -0
- package/PostProcesses/index.js.map +1 -1
- package/PostProcesses/meshBlendingBlueNoise.d.ts +15 -0
- package/PostProcesses/meshBlendingBlueNoise.js +77 -0
- package/PostProcesses/meshBlendingBlueNoise.js.map +1 -0
- package/PostProcesses/meshBlendingPostProcess.d.ts +131 -0
- package/PostProcesses/meshBlendingPostProcess.js +315 -0
- package/PostProcesses/meshBlendingPostProcess.js.map +1 -0
- package/PostProcesses/pure.d.ts +2 -0
- package/PostProcesses/pure.js +2 -0
- package/PostProcesses/pure.js.map +1 -1
- package/PostProcesses/thinMeshBlendingPostProcess.d.ts +339 -0
- package/PostProcesses/thinMeshBlendingPostProcess.js +771 -0
- package/PostProcesses/thinMeshBlendingPostProcess.js.map +1 -0
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js +6 -6
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +8 -8
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
- package/Rendering/boundingBoxRenderer.pure.js +2 -1
- package/Rendering/boundingBoxRenderer.pure.js.map +1 -1
- package/Rendering/depthRenderer.pure.js +3 -4
- package/Rendering/depthRenderer.pure.js.map +1 -1
- package/Rendering/edgesRenderer.pure.d.ts +4 -2
- package/Rendering/edgesRenderer.pure.js +11 -2
- package/Rendering/edgesRenderer.pure.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObject.d.ts +10 -0
- package/Rendering/fluidRenderer/fluidRenderingObject.js +20 -0
- package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.d.ts +9 -3
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js +14 -9
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -1
- package/Rendering/geometryBufferRenderer.pure.d.ts +38 -4
- package/Rendering/geometryBufferRenderer.pure.js +126 -17
- package/Rendering/geometryBufferRenderer.pure.js.map +1 -1
- package/Rendering/objectRenderer.d.ts +7 -1
- package/Rendering/objectRenderer.js +45 -7
- package/Rendering/objectRenderer.js.map +1 -1
- package/Rendering/outlineRenderer.pure.js +6 -2
- package/Rendering/outlineRenderer.pure.js.map +1 -1
- package/Rendering/renderingManager.d.ts +1 -1
- package/Rendering/renderingManager.js +5 -4
- package/Rendering/renderingManager.js.map +1 -1
- package/Shaders/ShadersInclude/defaultFragmentAlpha.d.ts +5 -0
- package/Shaders/ShadersInclude/defaultFragmentAlpha.js +34 -0
- package/Shaders/ShadersInclude/defaultFragmentAlpha.js.map +1 -0
- package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.js +5 -1
- package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/geometryRenderingFragment.d.ts +5 -0
- package/Shaders/ShadersInclude/geometryRenderingFragment.js +74 -0
- package/Shaders/ShadersInclude/geometryRenderingFragment.js.map +1 -0
- package/Shaders/ShadersInclude/mrtFragmentDeclaration.js +89 -0
- package/Shaders/ShadersInclude/mrtFragmentDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrBlockPrePass.js +24 -17
- package/Shaders/ShadersInclude/openpbrBlockPrePass.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockPrePass.js +27 -20
- package/Shaders/ShadersInclude/pbrBlockPrePass.js.map +1 -1
- package/Shaders/ShadersInclude/pbrDebug.js +6 -2
- package/Shaders/ShadersInclude/pbrDebug.js.map +1 -1
- package/Shaders/ShadersInclude/prePassDeclaration.js +95 -2
- package/Shaders/ShadersInclude/prePassDeclaration.js.map +1 -1
- package/Shaders/default.fragment.js +31 -40
- package/Shaders/default.fragment.js.map +1 -1
- package/Shaders/depthOfField.fragment.js +13 -9
- package/Shaders/depthOfField.fragment.js.map +1 -1
- package/Shaders/fluidRenderingParticleDepth.vertex.js +16 -1
- package/Shaders/fluidRenderingParticleDepth.vertex.js.map +1 -1
- package/Shaders/fluidRenderingParticleThickness.vertex.js +16 -1
- package/Shaders/fluidRenderingParticleThickness.vertex.js.map +1 -1
- package/Shaders/gaussianSplatting.fragment.js +63 -3
- package/Shaders/gaussianSplatting.fragment.js.map +1 -1
- package/Shaders/gaussianSplatting.vertex.js +80 -0
- package/Shaders/gaussianSplatting.vertex.js.map +1 -1
- package/Shaders/geometry.fragment.js +17 -11
- package/Shaders/geometry.fragment.js.map +1 -1
- package/Shaders/gpuRenderParticles.fragment.js +43 -1
- package/Shaders/gpuRenderParticles.fragment.js.map +1 -1
- package/Shaders/gpuRenderParticles.vertex.js +96 -16
- package/Shaders/gpuRenderParticles.vertex.js.map +1 -1
- package/Shaders/meshBlending.fragment.d.ts +5 -0
- package/Shaders/meshBlending.fragment.js +519 -0
- package/Shaders/meshBlending.fragment.js.map +1 -0
- package/Shaders/particles.fragment.js +43 -1
- package/Shaders/particles.fragment.js.map +1 -1
- package/Shaders/particles.vertex.js +84 -3
- package/Shaders/particles.vertex.js.map +1 -1
- package/Shaders/sprites.fragment.js +52 -2
- package/Shaders/sprites.fragment.js.map +1 -1
- package/Shaders/sprites.vertex.js +62 -1
- package/Shaders/sprites.vertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/defaultFragmentAlpha.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/defaultFragmentAlpha.js +33 -0
- package/ShadersWGSL/ShadersInclude/defaultFragmentAlpha.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/geometryRenderingFragment.d.ts +6 -0
- package/ShadersWGSL/ShadersInclude/geometryRenderingFragment.js +76 -0
- package/ShadersWGSL/ShadersInclude/geometryRenderingFragment.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/lightFragment.js +1 -1
- package/ShadersWGSL/ShadersInclude/lightFragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/meshBlendTagFragmentOutput.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/meshBlendTagFragmentOutput.js +18 -0
- package/ShadersWGSL/ShadersInclude/meshBlendTagFragmentOutput.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/openpbrBlockPrePass.d.ts +1 -0
- package/ShadersWGSL/ShadersInclude/openpbrBlockPrePass.js +11 -25
- package/ShadersWGSL/ShadersInclude/openpbrBlockPrePass.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.d.ts +1 -0
- package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js +11 -25
- package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDebug.js +5 -1
- package/ShadersWGSL/ShadersInclude/pbrDebug.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/prePassDeclaration.js +6 -1
- package/ShadersWGSL/ShadersInclude/prePassDeclaration.js.map +1 -1
- package/ShadersWGSL/default.fragment.js +17 -48
- package/ShadersWGSL/default.fragment.js.map +1 -1
- package/ShadersWGSL/fluidRenderingParticleDepth.vertex.js +15 -2
- package/ShadersWGSL/fluidRenderingParticleDepth.vertex.js.map +1 -1
- package/ShadersWGSL/fluidRenderingParticleThickness.vertex.js +15 -2
- package/ShadersWGSL/fluidRenderingParticleThickness.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.fragment.js +63 -2
- package/ShadersWGSL/gaussianSplatting.fragment.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js +80 -0
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/geometry.fragment.js +37 -2
- package/ShadersWGSL/geometry.fragment.js.map +1 -1
- package/ShadersWGSL/gpuRenderParticles.fragment.js +47 -2
- package/ShadersWGSL/gpuRenderParticles.fragment.js.map +1 -1
- package/ShadersWGSL/gpuRenderParticles.vertex.js +110 -7
- package/ShadersWGSL/gpuRenderParticles.vertex.js.map +1 -1
- package/ShadersWGSL/meshBlending.fragment.d.ts +5 -0
- package/ShadersWGSL/meshBlending.fragment.js +576 -0
- package/ShadersWGSL/meshBlending.fragment.js.map +1 -0
- package/ShadersWGSL/openpbr.fragment.js +2 -1
- package/ShadersWGSL/openpbr.fragment.js.map +1 -1
- package/ShadersWGSL/particles.fragment.js +45 -1
- package/ShadersWGSL/particles.fragment.js.map +1 -1
- package/ShadersWGSL/particles.vertex.js +86 -4
- package/ShadersWGSL/particles.vertex.js.map +1 -1
- package/ShadersWGSL/pbr.fragment.js +2 -1
- package/ShadersWGSL/pbr.fragment.js.map +1 -1
- package/ShadersWGSL/sprites.fragment.js +56 -2
- package/ShadersWGSL/sprites.fragment.js.map +1 -1
- package/ShadersWGSL/sprites.vertex.js +62 -1
- package/ShadersWGSL/sprites.vertex.js.map +1 -1
- package/Sprites/spriteManager.d.ts +13 -0
- package/Sprites/spriteManager.js +15 -0
- package/Sprites/spriteManager.js.map +1 -1
- package/Sprites/spriteRenderer.d.ts +24 -1
- package/Sprites/spriteRenderer.js +368 -50
- package/Sprites/spriteRenderer.js.map +1 -1
- package/Sprites/thinSprite.d.ts +4 -0
- package/Sprites/thinSprite.js +4 -0
- package/Sprites/thinSprite.js.map +1 -1
- package/States/alphaCullingState.d.ts +3 -1
- package/States/alphaCullingState.js +18 -3
- package/States/alphaCullingState.js.map +1 -1
- package/XR/webXRDefaultExperience.d.ts +5 -1
- package/XR/webXRDefaultExperience.js.map +1 -1
- package/XR/webXREnterExitUI.d.ts +2 -1
- package/XR/webXREnterExitUI.js.map +1 -1
- package/package.json +1 -1
- package/scene.pure.d.ts +23 -0
- package/scene.pure.js +35 -0
- package/scene.pure.js.map +1 -1
|
@@ -171,7 +171,13 @@ export class AnimationGroup {
|
|
|
171
171
|
if (this._speedRatio === value) {
|
|
172
172
|
return;
|
|
173
173
|
}
|
|
174
|
+
if (this._animatables[0]) {
|
|
175
|
+
this._retainedCurrentFrame = this._animatables[0].masterFrame;
|
|
176
|
+
}
|
|
177
|
+
this._updateVirtualFrame();
|
|
174
178
|
this._speedRatio = value;
|
|
179
|
+
this._virtualFrameStart = this._virtualFrame;
|
|
180
|
+
this._virtualFrameStartTime = this._scene._animationTime;
|
|
175
181
|
for (let index = 0; index < this._animatables.length; index++) {
|
|
176
182
|
const animatable = this._animatables[index];
|
|
177
183
|
animatable.speedRatio = this._speedRatio;
|
|
@@ -334,6 +340,17 @@ export class AnimationGroup {
|
|
|
334
340
|
this._to = -Number.MAX_VALUE;
|
|
335
341
|
this._speedRatio = 1;
|
|
336
342
|
this._loopAnimation = false;
|
|
343
|
+
this._virtualFrame = 0;
|
|
344
|
+
this._virtualFrameStart = 0;
|
|
345
|
+
this._virtualFrameStartTime = 0;
|
|
346
|
+
this._virtualFrameRate = 60;
|
|
347
|
+
this._virtualFrameDirection = 1;
|
|
348
|
+
this._virtualFrameInitial = 0;
|
|
349
|
+
this._virtualFrameEnd = 0;
|
|
350
|
+
this._virtualSamplingObserver = null;
|
|
351
|
+
this._usesVirtualSampling = false;
|
|
352
|
+
this._retainedCurrentFrame = 0;
|
|
353
|
+
this._isStopping = false;
|
|
337
354
|
this._isAdditive = false;
|
|
338
355
|
this._weight = -1;
|
|
339
356
|
this._playOrder = 0;
|
|
@@ -492,10 +509,47 @@ export class AnimationGroup {
|
|
|
492
509
|
* @returns the current animation group
|
|
493
510
|
*/
|
|
494
511
|
start(loop = false, speedRatio = 1, from, to, isAdditive, predicate) {
|
|
512
|
+
return this._start(loop, speedRatio, from, to, isAdditive, false, predicate);
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Starts all animations using an unbounded requested timeline mapped to the animation's
|
|
516
|
+
* effective keyframe range.
|
|
517
|
+
* @param loop defines if animations must loop
|
|
518
|
+
* @param speedRatio defines the ratio to apply to animation speed
|
|
519
|
+
* @param from defines the requested start frame
|
|
520
|
+
* @param to defines the requested end frame
|
|
521
|
+
* @param isAdditive defines the additive state for the resulting animatables
|
|
522
|
+
* @returns the current animation group
|
|
523
|
+
*/
|
|
524
|
+
startWithVirtualTimeline(loop = false, speedRatio = 1, from, to, isAdditive) {
|
|
525
|
+
return this._start(loop, speedRatio, from, to, isAdditive, true);
|
|
526
|
+
}
|
|
527
|
+
_start(loop, speedRatio, from, to, isAdditive, useVirtualTimeline, predicate) {
|
|
495
528
|
if (this._isStarted || this._targetedAnimations.length === 0) {
|
|
496
529
|
return this;
|
|
497
530
|
}
|
|
498
531
|
this._loopAnimation = loop;
|
|
532
|
+
const effectiveFrom = from ?? this._from;
|
|
533
|
+
const effectiveTo = to ?? this._to;
|
|
534
|
+
this._virtualFrame = effectiveFrom;
|
|
535
|
+
this._virtualFrameStart = effectiveFrom;
|
|
536
|
+
this._virtualFrameStartTime = this._scene._animationTime;
|
|
537
|
+
this._virtualFrameRate = this._targetedAnimations[0]?.animation.framePerSecond ?? 60;
|
|
538
|
+
this._virtualFrameDirection = effectiveTo < effectiveFrom ? -1 : 1;
|
|
539
|
+
this._virtualFrameInitial = effectiveFrom;
|
|
540
|
+
this._virtualFrameEnd = effectiveTo;
|
|
541
|
+
const effectiveSamplingFrom = useVirtualTimeline ? this._mapVirtualFrame(effectiveFrom) : effectiveFrom;
|
|
542
|
+
const effectiveSamplingTo = useVirtualTimeline
|
|
543
|
+
? Number.isFinite(effectiveTo)
|
|
544
|
+
? this._mapVirtualFrame(effectiveTo)
|
|
545
|
+
: effectiveTo < effectiveFrom
|
|
546
|
+
? 0
|
|
547
|
+
: this._to
|
|
548
|
+
: effectiveTo;
|
|
549
|
+
this._retainedCurrentFrame = effectiveSamplingFrom;
|
|
550
|
+
this._usesVirtualSampling = useVirtualTimeline && (effectiveSamplingFrom !== effectiveFrom || effectiveSamplingTo !== effectiveTo);
|
|
551
|
+
const samplingFrom = this._usesVirtualSampling ? (this._virtualFrameDirection > 0 ? 0 : this._to) : effectiveSamplingFrom;
|
|
552
|
+
const samplingTo = this._usesVirtualSampling ? (this._virtualFrameDirection > 0 ? this._to : 0) : effectiveSamplingTo;
|
|
499
553
|
this._shouldStart = false;
|
|
500
554
|
this._animationLoopCount = 0;
|
|
501
555
|
this._animationLoopFlags.length = 0;
|
|
@@ -504,7 +558,7 @@ export class AnimationGroup {
|
|
|
504
558
|
if (predicate && !predicate(targetedAnimation)) {
|
|
505
559
|
continue;
|
|
506
560
|
}
|
|
507
|
-
const animatable = this._scene.beginDirectAnimation(targetedAnimation.target, [targetedAnimation.animation],
|
|
561
|
+
const animatable = this._scene.beginDirectAnimation(targetedAnimation.target, [targetedAnimation.animation], samplingFrom, samplingTo, this._usesVirtualSampling || loop, speedRatio, undefined, undefined, isAdditive !== undefined ? isAdditive : this._isAdditive);
|
|
508
562
|
animatable.weight = this._weight;
|
|
509
563
|
animatable.playOrder = this._playOrder;
|
|
510
564
|
animatable.onAnimationEnd = () => {
|
|
@@ -513,12 +567,20 @@ export class AnimationGroup {
|
|
|
513
567
|
};
|
|
514
568
|
this._processLoop(animatable, targetedAnimation, index);
|
|
515
569
|
this._animatables.push(animatable);
|
|
570
|
+
if (this._usesVirtualSampling && this._isTargetRetainedByMask(animatable.target)) {
|
|
571
|
+
animatable.goToFrame(effectiveSamplingFrom);
|
|
572
|
+
}
|
|
516
573
|
}
|
|
517
574
|
this.syncWithMask();
|
|
518
575
|
this._scene.sortActiveAnimatables();
|
|
519
576
|
this._speedRatio = speedRatio;
|
|
520
577
|
this._isStarted = true;
|
|
521
578
|
this._isPaused = false;
|
|
579
|
+
if (this._usesVirtualSampling) {
|
|
580
|
+
this._virtualSamplingObserver = this._scene.onAfterAnimationsObservable.add(() => {
|
|
581
|
+
this._sampleVirtualTimeline();
|
|
582
|
+
});
|
|
583
|
+
}
|
|
522
584
|
this.onAnimationGroupPlayObservable.notifyObservers(this);
|
|
523
585
|
return this;
|
|
524
586
|
}
|
|
@@ -530,6 +592,7 @@ export class AnimationGroup {
|
|
|
530
592
|
if (!this._isStarted) {
|
|
531
593
|
return this;
|
|
532
594
|
}
|
|
595
|
+
this._updateVirtualFrame();
|
|
533
596
|
this._isPaused = true;
|
|
534
597
|
for (let index = 0; index < this._animatables.length; index++) {
|
|
535
598
|
const animatable = this._animatables[index];
|
|
@@ -573,6 +636,13 @@ export class AnimationGroup {
|
|
|
573
636
|
const animatable = this._animatables[index];
|
|
574
637
|
animatable.reset();
|
|
575
638
|
}
|
|
639
|
+
this._virtualFrame = this._usesVirtualSampling ? this._virtualFrameInitial : (this._animatables[0]?.fromFrame ?? 0);
|
|
640
|
+
this._virtualFrameStart = this._virtualFrame;
|
|
641
|
+
this._virtualFrameStartTime = this._scene._animationTime;
|
|
642
|
+
if (this._usesVirtualSampling) {
|
|
643
|
+
this._retainedCurrentFrame = this._mapVirtualFrame(this._virtualFrame);
|
|
644
|
+
this._goToFrameWithMask(this._retainedCurrentFrame);
|
|
645
|
+
}
|
|
576
646
|
return this;
|
|
577
647
|
}
|
|
578
648
|
/**
|
|
@@ -588,6 +658,8 @@ export class AnimationGroup {
|
|
|
588
658
|
animatable.restart();
|
|
589
659
|
}
|
|
590
660
|
this.syncWithMask();
|
|
661
|
+
this._virtualFrameStart = this._virtualFrame;
|
|
662
|
+
this._virtualFrameStartTime = this._scene._animationTime;
|
|
591
663
|
this._isPaused = false;
|
|
592
664
|
this.onAnimationGroupPlayObservable.notifyObservers(this);
|
|
593
665
|
return this;
|
|
@@ -601,6 +673,12 @@ export class AnimationGroup {
|
|
|
601
673
|
if (!this._isStarted) {
|
|
602
674
|
return this;
|
|
603
675
|
}
|
|
676
|
+
if (this._animatables[0]) {
|
|
677
|
+
this._retainedCurrentFrame = this._animatables[0].masterFrame;
|
|
678
|
+
}
|
|
679
|
+
this._updateVirtualFrame();
|
|
680
|
+
this._removeVirtualSamplingObserver();
|
|
681
|
+
this._isStopping = true;
|
|
604
682
|
const list = this._animatables.slice();
|
|
605
683
|
for (let index = 0; index < list.length; index++) {
|
|
606
684
|
list[index].stop(undefined, undefined, true, skipOnAnimationEnd);
|
|
@@ -621,6 +699,8 @@ export class AnimationGroup {
|
|
|
621
699
|
}
|
|
622
700
|
this._scene._activeAnimatables.length = curIndex;
|
|
623
701
|
this._isStarted = false;
|
|
702
|
+
this._isStopping = false;
|
|
703
|
+
this._usesVirtualSampling = false;
|
|
624
704
|
return this;
|
|
625
705
|
}
|
|
626
706
|
/**
|
|
@@ -670,12 +750,113 @@ export class AnimationGroup {
|
|
|
670
750
|
return this;
|
|
671
751
|
}
|
|
672
752
|
/**
|
|
673
|
-
* Helper to get the current frame. This
|
|
753
|
+
* Helper to get the current frame. This returns 0 when the AnimationGroup is
|
|
754
|
+
* not running and might be inaccurate when animations use different frames.
|
|
674
755
|
* @returns current animation frame.
|
|
675
756
|
*/
|
|
676
757
|
getCurrentFrame() {
|
|
677
758
|
return this.animatables[0]?.masterFrame || 0;
|
|
678
759
|
}
|
|
760
|
+
/**
|
|
761
|
+
* Gets the last effective frame, retaining it after the group stops.
|
|
762
|
+
* @returns current or retained effective animation frame
|
|
763
|
+
*/
|
|
764
|
+
getRetainedCurrentFrame() {
|
|
765
|
+
if (this.animatables[0]) {
|
|
766
|
+
this._retainedCurrentFrame = this.animatables[0].masterFrame;
|
|
767
|
+
}
|
|
768
|
+
return this._retainedCurrentFrame;
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* Gets the current frame on the unbounded timeline requested by the caller.
|
|
772
|
+
* Unlike {@link getCurrentFrame}, this value is not clamped or wrapped by the
|
|
773
|
+
* animation's keyframe range and is retained after the group stops.
|
|
774
|
+
* @returns the current virtual animation frame
|
|
775
|
+
*/
|
|
776
|
+
getVirtualCurrentFrame() {
|
|
777
|
+
this._updateVirtualFrame();
|
|
778
|
+
return this._virtualFrame;
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Returns whether the virtual timeline crossed the requested frame.
|
|
782
|
+
* @param frame virtual frame to test
|
|
783
|
+
* @returns true when the frame was reached in the playback direction
|
|
784
|
+
*/
|
|
785
|
+
isVirtualFrameReached(frame) {
|
|
786
|
+
const current = this.getVirtualCurrentFrame();
|
|
787
|
+
return this._virtualFrameDirection > 0 ? current >= frame : current <= frame;
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* Returns whether a frame is inside the requested start/end interval.
|
|
791
|
+
* The end frame is excluded because natural completion takes precedence.
|
|
792
|
+
* @param frame virtual frame to test
|
|
793
|
+
* @returns true when a scheduled stop may occur at the frame
|
|
794
|
+
*/
|
|
795
|
+
isValidVirtualStopFrame(frame) {
|
|
796
|
+
return this._virtualFrameDirection > 0
|
|
797
|
+
? frame >= this._virtualFrameInitial && frame < this._virtualFrameEnd
|
|
798
|
+
: frame <= this._virtualFrameInitial && frame > this._virtualFrameEnd;
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Snaps both retained playheads to an exact virtual timeline position.
|
|
802
|
+
* @param frame virtual frame to retain
|
|
803
|
+
*/
|
|
804
|
+
setVirtualCurrentFrame(frame) {
|
|
805
|
+
this._virtualFrame = frame;
|
|
806
|
+
this._virtualFrameStart = frame;
|
|
807
|
+
this._virtualFrameStartTime = this._scene._animationTime;
|
|
808
|
+
this._retainedCurrentFrame = this._mapVirtualFrame(frame);
|
|
809
|
+
this._goToFrameWithMask(this._retainedCurrentFrame);
|
|
810
|
+
}
|
|
811
|
+
_updateVirtualFrame() {
|
|
812
|
+
if (!this._isStarted || this._isPaused) {
|
|
813
|
+
return;
|
|
814
|
+
}
|
|
815
|
+
const elapsedSeconds = (this._scene._animationTime - this._virtualFrameStartTime) / 1000;
|
|
816
|
+
this._virtualFrame = this._virtualFrameStart + elapsedSeconds * this._virtualFrameRate * this._speedRatio * this._virtualFrameDirection;
|
|
817
|
+
}
|
|
818
|
+
_sampleVirtualTimeline() {
|
|
819
|
+
this._updateVirtualFrame();
|
|
820
|
+
const reachedEnd = !this._loopAnimation &&
|
|
821
|
+
Number.isFinite(this._virtualFrameEnd) &&
|
|
822
|
+
(this._virtualFrameDirection > 0 ? this._virtualFrame >= this._virtualFrameEnd : this._virtualFrame <= this._virtualFrameEnd);
|
|
823
|
+
if (reachedEnd) {
|
|
824
|
+
this.setVirtualCurrentFrame(this._virtualFrameEnd);
|
|
825
|
+
this._removeVirtualSamplingObserver();
|
|
826
|
+
this.stop();
|
|
827
|
+
return;
|
|
828
|
+
}
|
|
829
|
+
this._retainedCurrentFrame = this._mapVirtualFrame(this._virtualFrame);
|
|
830
|
+
this._goToFrameWithMask(this._retainedCurrentFrame);
|
|
831
|
+
}
|
|
832
|
+
_goToFrameWithMask(frame) {
|
|
833
|
+
for (let index = 0; index < this._animatables.length; index++) {
|
|
834
|
+
const animatable = this._animatables[index];
|
|
835
|
+
if (this._isTargetRetainedByMask(animatable.target)) {
|
|
836
|
+
animatable.goToFrame(frame);
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
_isTargetRetainedByMask(target) {
|
|
841
|
+
return !this._mask || this._mask.disabled || this._mask.retainsTarget(target.name);
|
|
842
|
+
}
|
|
843
|
+
_removeVirtualSamplingObserver() {
|
|
844
|
+
if (this._virtualSamplingObserver) {
|
|
845
|
+
this._scene.onAfterAnimationsObservable.remove(this._virtualSamplingObserver);
|
|
846
|
+
this._virtualSamplingObserver = null;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
_mapVirtualFrame(frame) {
|
|
850
|
+
const maximum = this._to;
|
|
851
|
+
if (maximum === 0) {
|
|
852
|
+
return 0;
|
|
853
|
+
}
|
|
854
|
+
if (!Number.isFinite(frame) || !Number.isFinite(maximum) || maximum < 0) {
|
|
855
|
+
return frame;
|
|
856
|
+
}
|
|
857
|
+
const iteration = frame > 0 ? Math.ceil((frame - maximum) / maximum) : Math.floor(frame / maximum);
|
|
858
|
+
return frame - iteration * maximum;
|
|
859
|
+
}
|
|
679
860
|
/**
|
|
680
861
|
* Dispose all associated resources
|
|
681
862
|
*/
|
|
@@ -704,6 +885,10 @@ export class AnimationGroup {
|
|
|
704
885
|
this._isDisposed = true;
|
|
705
886
|
}
|
|
706
887
|
_checkAnimationGroupEnded(animatable, skipOnAnimationEnd = false) {
|
|
888
|
+
this._updateVirtualFrame();
|
|
889
|
+
if (!skipOnAnimationEnd && !this._isStopping) {
|
|
890
|
+
this._retainedCurrentFrame = animatable.masterFrame;
|
|
891
|
+
}
|
|
707
892
|
// animatable should be taken out of the array
|
|
708
893
|
const idx = this._animatables.indexOf(animatable);
|
|
709
894
|
if (idx > -1) {
|
|
@@ -711,6 +896,10 @@ export class AnimationGroup {
|
|
|
711
896
|
}
|
|
712
897
|
// all animatables were removed? animation group ended!
|
|
713
898
|
if (this._animatables.length === this._targetedAnimations.length - this._numActiveAnimatables) {
|
|
899
|
+
if (!skipOnAnimationEnd && !this._isStopping && Number.isFinite(this._virtualFrameEnd)) {
|
|
900
|
+
this._virtualFrame = this._virtualFrameEnd;
|
|
901
|
+
this._retainedCurrentFrame = this._mapVirtualFrame(this._virtualFrameEnd);
|
|
902
|
+
}
|
|
714
903
|
this._isStarted = false;
|
|
715
904
|
if (!skipOnAnimationEnd) {
|
|
716
905
|
this.onAnimationGroupEndObservable.notifyObservers(this);
|