@onerjs/core 8.53.5 → 8.53.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Animations/animationGroup.d.ts +0 -1
- package/Animations/animationGroup.js +0 -1
- package/Animations/animationGroup.js.map +1 -1
- package/Animations/animationGroup.pure.js +2 -0
- package/Animations/animationGroup.pure.js.map +1 -1
- package/Animations/runtimeAnimation.js +11 -0
- package/Animations/runtimeAnimation.js.map +1 -1
- package/Audio/audioSceneComponent.pure.js +1 -1
- package/AudioV2/abstractAudio/abstractSound.d.ts +2 -1
- package/AudioV2/abstractAudio/abstractSound.js +7 -2
- package/AudioV2/abstractAudio/abstractSound.js.map +1 -1
- package/AudioV2/abstractAudio/abstractSoundInstance.d.ts +3 -1
- package/AudioV2/abstractAudio/abstractSoundInstance.js.map +1 -1
- package/AudioV2/abstractAudio/staticSound.d.ts +6 -0
- package/AudioV2/abstractAudio/staticSound.js +17 -1
- package/AudioV2/abstractAudio/staticSound.js.map +1 -1
- package/AudioV2/abstractAudio/staticSoundInstance.d.ts +4 -2
- package/AudioV2/abstractAudio/staticSoundInstance.js.map +1 -1
- package/AudioV2/abstractAudio/streamingSound.d.ts +6 -0
- package/AudioV2/abstractAudio/streamingSound.js +9 -1
- package/AudioV2/abstractAudio/streamingSound.js.map +1 -1
- package/AudioV2/webAudio/webAudioStaticSound.d.ts +7 -1
- package/AudioV2/webAudio/webAudioStaticSound.js +56 -8
- package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
- package/AudioV2/webAudio/webAudioStreamingSound.d.ts +3 -1
- package/AudioV2/webAudio/webAudioStreamingSound.js +16 -4
- package/AudioV2/webAudio/webAudioStreamingSound.js.map +1 -1
- package/BakedVertexAnimation/bakedVertexAnimationManager.d.ts +2 -2
- package/BakedVertexAnimation/bakedVertexAnimationManager.js +151 -121
- package/BakedVertexAnimation/bakedVertexAnimationManager.js.map +1 -1
- package/Behaviors/Cameras/interpolatingBehavior.d.ts +17 -2
- package/Behaviors/Cameras/interpolatingBehavior.js +53 -23
- package/Behaviors/Cameras/interpolatingBehavior.js.map +1 -1
- package/Bones/bone.pure.js +3 -3
- package/Buffers/buffer.pure.js +0 -12
- package/Buffers/buffer.pure.js.map +1 -1
- package/Cameras/Inputs/BaseCameraMouseWheelInput.js +141 -126
- package/Cameras/Inputs/BaseCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/BaseCameraPointersInput.d.ts +2 -1
- package/Cameras/Inputs/BaseCameraPointersInput.js +290 -277
- package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraGamepadInput.js +115 -102
- package/Cameras/Inputs/arcRotateCameraGamepadInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.d.ts +3 -0
- package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js +334 -273
- package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js +273 -258
- package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraPointersInput.js +237 -213
- package/Cameras/Inputs/arcRotateCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/flyCameraKeyboardInput.js +199 -168
- package/Cameras/Inputs/flyCameraKeyboardInput.js.map +1 -1
- package/Cameras/Inputs/flyCameraMouseInput.js +243 -229
- package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
- package/Cameras/Inputs/followCameraKeyboardMoveInput.js +311 -266
- package/Cameras/Inputs/followCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/followCameraMouseWheelInput.js +139 -119
- package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/followCameraPointersInput.js +239 -203
- package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraGamepadInput.js +127 -114
- package/Cameras/Inputs/freeCameraGamepadInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraKeyboardMoveInput.js +278 -244
- package/Cameras/Inputs/freeCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraMouseInput.js +216 -202
- package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraMouseWheelInput.js +368 -353
- package/Cameras/Inputs/freeCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraTouchInput.js +185 -172
- package/Cameras/Inputs/freeCameraTouchInput.js.map +1 -1
- package/Cameras/Inputs/geospatialCameraKeyboardInput.d.ts +2 -0
- package/Cameras/Inputs/geospatialCameraKeyboardInput.js +291 -246
- package/Cameras/Inputs/geospatialCameraKeyboardInput.js.map +1 -1
- package/Cameras/Inputs/geospatialCameraPointersInput.d.ts +11 -1
- package/Cameras/Inputs/geospatialCameraPointersInput.js +18 -2
- package/Cameras/Inputs/geospatialCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/orbitCameraPointersInput.js +112 -96
- package/Cameras/Inputs/orbitCameraPointersInput.js.map +1 -1
- package/Cameras/VR/vrExperienceHelper.d.ts +0 -2
- package/Cameras/VR/vrExperienceHelper.js +0 -2
- package/Cameras/VR/vrExperienceHelper.js.map +1 -1
- package/Cameras/VR/vrExperienceHelper.pure.js +5 -0
- package/Cameras/VR/vrExperienceHelper.pure.js.map +1 -1
- package/Cameras/arcRotateCamera.pure.js +1559 -1479
- package/Cameras/arcRotateCamera.pure.js.map +1 -1
- package/Cameras/camera.pure.js +1225 -1178
- package/Cameras/camera.pure.js.map +1 -1
- package/Cameras/flyCamera.pure.js +369 -351
- package/Cameras/flyCamera.pure.js.map +1 -1
- package/Cameras/followCamera.pure.js +229 -192
- package/Cameras/followCamera.pure.js.map +1 -1
- package/Cameras/freeCamera.pure.js +373 -351
- package/Cameras/freeCamera.pure.js.map +1 -1
- package/Cameras/geospatialCamera.pure.d.ts +30 -7
- package/Cameras/geospatialCamera.pure.js +502 -457
- package/Cameras/geospatialCamera.pure.js.map +1 -1
- package/Cameras/geospatialCameraMovement.js +2 -2
- package/Cameras/geospatialCameraMovement.js.map +1 -1
- package/Cameras/targetCamera.pure.d.ts +7 -0
- package/Cameras/targetCamera.pure.js +550 -509
- package/Cameras/targetCamera.pure.js.map +1 -1
- package/Cameras/universalCamera.pure.js +98 -85
- package/Cameras/universalCamera.pure.js.map +1 -1
- package/Collisions/gpuPicker.d.ts +111 -4
- package/Collisions/gpuPicker.js +696 -119
- package/Collisions/gpuPicker.js.map +1 -1
- package/Compute/computeShader.pure.js +372 -355
- package/Compute/computeShader.pure.js.map +1 -1
- package/Culling/Helper/transformFeedbackBoundingHelper.pure.js +2 -2
- package/Decorators/nodeDecorator.d.ts +11 -1
- package/Decorators/nodeDecorator.js +43 -6
- package/Decorators/nodeDecorator.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.loadFile.pure.js +8 -0
- package/Engines/AbstractEngine/abstractEngine.loadFile.pure.js.map +1 -1
- package/Engines/Native/nativeHelpers.js +15 -0
- package/Engines/Native/nativeHelpers.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +7 -2
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/Native/nativeRenderTargetWrapper.d.ts +5 -0
- package/Engines/Native/nativeRenderTargetWrapper.js +35 -1
- package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
- package/Engines/Processors/shaderProcessor.js +5 -3
- package/Engines/Processors/shaderProcessor.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.videoTexture.pure.js +16 -3
- package/Engines/WebGPU/Extensions/engine.videoTexture.pure.js.map +1 -1
- package/Engines/WebGPU/webgpuClearQuad.pure.js +7 -1
- package/Engines/WebGPU/webgpuClearQuad.pure.js.map +1 -1
- package/Engines/abstractEngine.functions.d.ts +8 -2
- package/Engines/abstractEngine.functions.js +12 -4
- package/Engines/abstractEngine.functions.js.map +1 -1
- package/Engines/abstractEngine.pure.d.ts +20 -1
- package/Engines/abstractEngine.pure.js +21 -134
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/engine.d.ts +208 -0
- package/Engines/engine.pure.js +0 -15
- package/Engines/engine.pure.js.map +1 -1
- package/Engines/nullEngine.pure.d.ts +66 -0
- package/Engines/nullEngine.pure.js +97 -0
- package/Engines/nullEngine.pure.js.map +1 -1
- package/Engines/thinEngine.pure.d.ts +0 -13
- package/Engines/thinEngine.pure.js +4 -23
- package/Engines/thinEngine.pure.js.map +1 -1
- package/Engines/thinNativeEngine.d.ts +0 -1
- package/Engines/thinNativeEngine.js +0 -1
- package/Engines/thinNativeEngine.js.map +1 -1
- package/Engines/thinNativeEngine.pure.d.ts +27 -0
- package/Engines/thinNativeEngine.pure.js +383 -17
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +1 -0
- package/Engines/webgpuEngine.js +1 -0
- package/Engines/webgpuEngine.js.map +1 -1
- package/Engines/webgpuEngine.pure.d.ts +9 -0
- package/Engines/webgpuEngine.pure.js +7 -0
- package/Engines/webgpuEngine.pure.js.map +1 -1
- package/FlowGraph/flowGraph.js +9 -0
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphContext.js +597 -584
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphDataConnection.pure.d.ts +14 -0
- package/FlowGraph/flowGraphDataConnection.pure.js +38 -1
- package/FlowGraph/flowGraphDataConnection.pure.js.map +1 -1
- package/FlowGraph/serialization.d.ts +11 -0
- package/FlowGraph/serialization.js +11 -1
- package/FlowGraph/serialization.js.map +1 -1
- package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.pure.js +182 -170
- package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.pure.js +196 -184
- package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Layers/selectionOutlineLayerBlock.pure.js +222 -210
- package/FrameGraph/Node/Blocks/Layers/selectionOutlineLayerBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js +123 -111
- package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js +158 -146
- package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.pure.js +63 -51
- package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.pure.js +122 -110
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.pure.js +76 -64
- package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/chromaticAberrationPostProcessBlock.pure.js +89 -77
- package/FrameGraph/Node/Blocks/PostProcesses/chromaticAberrationPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.pure.js +134 -122
- package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.pure.js +58 -46
- package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/convolutionPostProcessBlock.pure.js +107 -95
- package/FrameGraph/Node/Blocks/PostProcesses/convolutionPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.pure.js +181 -169
- package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.pure.js +63 -51
- package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.pure.js +63 -51
- package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/grainPostProcessBlock.pure.js +76 -64
- package/FrameGraph/Node/Blocks/PostProcesses/grainPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.pure.js +246 -234
- package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/motionBlurPostProcessBlock.pure.js +108 -96
- package/FrameGraph/Node/Blocks/PostProcesses/motionBlurPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.pure.js +87 -75
- package/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.pure.js +76 -64
- package/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.pure.js +313 -301
- package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.pure.js +502 -490
- package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/taaPostProcessBlock.pure.js +147 -135
- package/FrameGraph/Node/Blocks/PostProcesses/taaPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.pure.js +90 -78
- package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.pure.js +179 -167
- package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +462 -451
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js +265 -253
- package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.pure.js +204 -192
- package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js +611 -550
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/iblShadowsRendererBlock.pure.js +320 -308
- package/FrameGraph/Node/Blocks/Rendering/iblShadowsRendererBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/utilityLayerRendererBlock.pure.js +87 -75
- package/FrameGraph/Node/Blocks/Rendering/utilityLayerRendererBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Textures/clearBlock.pure.js +154 -142
- package/FrameGraph/Node/Blocks/Textures/clearBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.pure.js +150 -138
- package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/inputBlock.pure.js +270 -256
- package/FrameGraph/Node/Blocks/inputBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/lightingVolumeBlock.pure.js +95 -83
- package/FrameGraph/Node/Blocks/lightingVolumeBlock.pure.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraph.js +715 -693
- package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraphBlock.js +548 -533
- package/FrameGraph/Node/nodeRenderGraphBlock.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.d.ts +2 -2
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.js +43 -51
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.d.ts +0 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.js +0 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.d.ts +0 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js +66 -35
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js.map +1 -1
- package/Helpers/environmentHelper.js +2 -2
- package/Helpers/environmentHelper.js.map +1 -1
- package/Layers/effectLayer.js +529 -519
- package/Layers/effectLayer.js.map +1 -1
- package/Layers/glowLayer.pure.js +428 -413
- package/Layers/glowLayer.pure.js.map +1 -1
- package/Layers/highlightLayer.pure.js +473 -458
- package/Layers/highlightLayer.pure.js.map +1 -1
- package/Layers/selectionOutlineLayer.pure.js +360 -345
- package/Layers/selectionOutlineLayer.pure.js.map +1 -1
- package/Lights/Clustered/clusteredLightContainer.pure.d.ts +1 -1
- package/Lights/Clustered/clusteredLightContainer.pure.js +583 -558
- package/Lights/Clustered/clusteredLightContainer.pure.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.js +6 -1
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Lights/areaLight.pure.js +61 -39
- package/Lights/areaLight.pure.js.map +1 -1
- package/Lights/directionalLight.pure.js +308 -284
- package/Lights/directionalLight.pure.js.map +1 -1
- package/Lights/hemisphericLight.pure.js +123 -104
- package/Lights/hemisphericLight.pure.js.map +1 -1
- package/Lights/light.d.ts +5 -3
- package/Lights/light.js +869 -827
- package/Lights/light.js.map +1 -1
- package/Lights/pointLight.pure.js +185 -174
- package/Lights/pointLight.pure.js.map +1 -1
- package/Lights/rectAreaLight.pure.d.ts +17 -0
- package/Lights/rectAreaLight.pure.js +238 -159
- package/Lights/rectAreaLight.pure.js.map +1 -1
- package/Lights/shadowLight.js +280 -268
- package/Lights/shadowLight.js.map +1 -1
- package/Lights/spotLight.pure.js +460 -427
- package/Lights/spotLight.pure.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.pure.js +17 -5
- package/Loading/Plugins/babylonFileLoader.pure.js.map +1 -1
- package/Loading/sceneLoader.d.ts +5 -1
- package/Loading/sceneLoader.js +299 -402
- package/Loading/sceneLoader.js.map +1 -1
- package/Materials/Background/backgroundMaterial.pure.d.ts +18 -18
- package/Materials/Background/backgroundMaterial.pure.js +949 -794
- package/Materials/Background/backgroundMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.d.ts +15 -0
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js +34 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.d.ts +9 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +26 -2
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.d.ts +2 -1
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js +169 -149
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.pure.js +442 -429
- package/Materials/Node/Blocks/Dual/lightBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.pure.js +396 -383
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/sceneDepthBlock.pure.js +237 -220
- package/Materials/Node/Blocks/Dual/sceneDepthBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/textureBlock.pure.js +1 -1
- package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.pure.js +150 -133
- package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js +265 -250
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.pure.js +159 -142
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js +214 -201
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.pure.js +419 -400
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js +3 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/clearCoatBlock.pure.js +302 -289
- package/Materials/Node/Blocks/PBR/clearCoatBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js +1327 -1272
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/reflectionBlock.pure.js +352 -337
- package/Materials/Node/Blocks/PBR/reflectionBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/refractionBlock.pure.js +297 -277
- package/Materials/Node/Blocks/PBR/refractionBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/sheenBlock.pure.js +146 -131
- package/Materials/Node/Blocks/PBR/sheenBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.pure.js +158 -145
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/clampBlock.pure.js +92 -77
- package/Materials/Node/Blocks/clampBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/cloudBlock.pure.js +145 -132
- package/Materials/Node/Blocks/cloudBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/conditionalBlock.pure.js +182 -169
- package/Materials/Node/Blocks/conditionalBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/curveBlock.pure.js +259 -246
- package/Materials/Node/Blocks/curveBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/debugBlock.pure.js +119 -106
- package/Materials/Node/Blocks/debugBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/loopBlock.pure.js +123 -110
- package/Materials/Node/Blocks/loopBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/meshAttributeExistsBlock.pure.js +185 -172
- package/Materials/Node/Blocks/meshAttributeExistsBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/remapBlock.pure.js +127 -112
- package/Materials/Node/Blocks/remapBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/transformBlock.pure.js +196 -185
- package/Materials/Node/Blocks/transformBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/triPlanarBlock.pure.js +451 -438
- package/Materials/Node/Blocks/triPlanarBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/trigonometryBlock.pure.js +184 -171
- package/Materials/Node/Blocks/trigonometryBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/waveBlock.pure.js +97 -84
- package/Materials/Node/Blocks/waveBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/worleyNoise3DBlock.pure.js +276 -263
- package/Materials/Node/Blocks/worleyNoise3DBlock.pure.js.map +1 -1
- package/Materials/Node/nodeMaterial.pure.js +1765 -1737
- package/Materials/Node/nodeMaterial.pure.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.d.ts +3 -3
- package/Materials/PBR/openpbrMaterial.pure.d.ts +102 -102
- package/Materials/PBR/openpbrMaterial.pure.js +3115 -2243
- package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrAnisotropicConfiguration.d.ts +3 -3
- package/Materials/PBR/pbrAnisotropicConfiguration.js +255 -227
- package/Materials/PBR/pbrAnisotropicConfiguration.js.map +1 -1
- package/Materials/PBR/pbrBRDFConfiguration.d.ts +9 -9
- package/Materials/PBR/pbrBRDFConfiguration.js +203 -155
- package/Materials/PBR/pbrBRDFConfiguration.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.d.ts +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.js +1751 -1736
- package/Materials/PBR/pbrBaseMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrBaseSimpleMaterial.d.ts +13 -13
- package/Materials/PBR/pbrBaseSimpleMaterial.js +205 -117
- package/Materials/PBR/pbrBaseSimpleMaterial.js.map +1 -1
- package/Materials/PBR/pbrClearCoatConfiguration.d.ts +9 -9
- package/Materials/PBR/pbrClearCoatConfiguration.js +464 -406
- package/Materials/PBR/pbrClearCoatConfiguration.js.map +1 -1
- package/Materials/PBR/pbrIridescenceConfiguration.d.ts +3 -3
- package/Materials/PBR/pbrIridescenceConfiguration.js +271 -239
- package/Materials/PBR/pbrIridescenceConfiguration.js.map +1 -1
- package/Materials/PBR/pbrMaterial.pure.d.ts +66 -66
- package/Materials/PBR/pbrMaterial.pure.js +1041 -685
- package/Materials/PBR/pbrMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.d.ts +5 -5
- package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.js +176 -115
- package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrSheenConfiguration.d.ts +7 -7
- package/Materials/PBR/pbrSheenConfiguration.js +314 -270
- package/Materials/PBR/pbrSheenConfiguration.js.map +1 -1
- package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.d.ts +5 -5
- package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.js +172 -117
- package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrSubSurfaceConfiguration.d.ts +16 -16
- package/Materials/PBR/pbrSubSurfaceConfiguration.js +864 -764
- package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.d.ts +43 -0
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.js +64 -0
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.js.map +1 -0
- package/Materials/Textures/HTML/htmlInteractionManager.d.ts +69 -0
- package/Materials/Textures/HTML/htmlInteractionManager.js +130 -0
- package/Materials/Textures/HTML/htmlInteractionManager.js.map +1 -0
- package/Materials/Textures/HTML/htmlRaycastInteractionManager.d.ts +84 -0
- package/Materials/Textures/HTML/htmlRaycastInteractionManager.js +246 -0
- package/Materials/Textures/HTML/htmlRaycastInteractionManager.js.map +1 -0
- package/Materials/Textures/HTML/htmlTexture.d.ts +148 -0
- package/Materials/Textures/HTML/htmlTexture.js +455 -0
- package/Materials/Textures/HTML/htmlTexture.js.map +1 -0
- package/Materials/Textures/HTML/index.d.ts +4 -0
- package/Materials/Textures/HTML/index.js +5 -0
- package/Materials/Textures/HTML/index.js.map +1 -0
- package/Materials/Textures/HTML/pure.d.ts +5 -0
- package/Materials/Textures/HTML/pure.js +6 -0
- package/Materials/Textures/HTML/pure.js.map +1 -0
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js +671 -643
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
- package/Materials/Textures/baseTexture.pure.js +880 -825
- package/Materials/Textures/baseTexture.pure.js.map +1 -1
- package/Materials/Textures/cubeTexture.d.ts +0 -1
- package/Materials/Textures/cubeTexture.js +0 -1
- package/Materials/Textures/cubeTexture.js.map +1 -1
- package/Materials/Textures/cubeTexture.pure.js +368 -333
- package/Materials/Textures/cubeTexture.pure.js.map +1 -1
- package/Materials/Textures/dynamicTexture.d.ts +0 -1
- package/Materials/Textures/dynamicTexture.js +0 -1
- package/Materials/Textures/dynamicTexture.js.map +1 -1
- package/Materials/Textures/dynamicTexture.pure.js +2 -0
- package/Materials/Textures/dynamicTexture.pure.js.map +1 -1
- package/Materials/Textures/htmlElementTexture.d.ts +0 -2
- package/Materials/Textures/htmlElementTexture.js +0 -2
- package/Materials/Textures/htmlElementTexture.js.map +1 -1
- package/Materials/Textures/htmlElementTexture.pure.js +4 -0
- package/Materials/Textures/htmlElementTexture.pure.js.map +1 -1
- package/Materials/Textures/index.d.ts +1 -0
- package/Materials/Textures/index.js +1 -1
- package/Materials/Textures/index.js.map +1 -1
- package/Materials/Textures/multiRenderTarget.d.ts +0 -1
- package/Materials/Textures/multiRenderTarget.js +0 -1
- package/Materials/Textures/multiRenderTarget.js.map +1 -1
- package/Materials/Textures/multiRenderTarget.pure.js +2 -0
- package/Materials/Textures/multiRenderTarget.pure.js.map +1 -1
- package/Materials/Textures/pure.d.ts +1 -0
- package/Materials/Textures/pure.js +1 -0
- package/Materials/Textures/pure.js.map +1 -1
- package/Materials/Textures/texture.pure.js +961 -923
- package/Materials/Textures/texture.pure.js.map +1 -1
- package/Materials/Textures/videoTexture.pure.d.ts +3 -0
- package/Materials/Textures/videoTexture.pure.js +450 -401
- package/Materials/Textures/videoTexture.pure.js.map +1 -1
- package/Materials/colorCurves.pure.js +510 -477
- package/Materials/colorCurves.pure.js.map +1 -1
- package/Materials/effect.pure.js +0 -7
- package/Materials/effect.pure.js.map +1 -1
- package/Materials/imageProcessing.js +12 -4
- package/Materials/imageProcessing.js.map +1 -1
- package/Materials/imageProcessingConfiguration.pure.js +647 -587
- package/Materials/imageProcessingConfiguration.pure.js.map +1 -1
- package/Materials/material.decalMapConfiguration.pure.d.ts +2 -2
- package/Materials/material.decalMapConfiguration.pure.js +149 -130
- package/Materials/material.decalMapConfiguration.pure.js.map +1 -1
- package/Materials/material.detailMapConfiguration.d.ts +3 -3
- package/Materials/material.detailMapConfiguration.js +213 -175
- package/Materials/material.detailMapConfiguration.js.map +1 -1
- package/Materials/material.pure.js +1815 -1721
- package/Materials/material.pure.js.map +1 -1
- package/Materials/materialPluginBase.pure.js +270 -249
- package/Materials/materialPluginBase.pure.js.map +1 -1
- package/Materials/materialPluginManager.pure.js +18 -8
- package/Materials/materialPluginManager.pure.js.map +1 -1
- package/Materials/materialStencilState.js +211 -200
- package/Materials/materialStencilState.js.map +1 -1
- package/Materials/meshDebugPluginMaterial.pure.d.ts +2 -2
- package/Materials/meshDebugPluginMaterial.pure.js +397 -275
- package/Materials/meshDebugPluginMaterial.pure.js.map +1 -1
- package/Materials/standardMaterial.pure.d.ts +32 -32
- package/Materials/standardMaterial.pure.js +1804 -1394
- package/Materials/standardMaterial.pure.js.map +1 -1
- package/Maths/math.color.pure.js +5 -5
- package/Maths/math.functions.js +38 -30
- package/Maths/math.functions.js.map +1 -1
- package/Maths/math.vector.pure.js +25 -25
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +18 -8
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +86 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +255 -104
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.d.ts +39 -0
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js +322 -0
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js.map +1 -0
- package/Meshes/GreasedLine/greasedLineMesh.pure.js +4 -4
- package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js +3 -3
- package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js +107 -94
- package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.pure.js +276 -263
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.pure.js +247 -232
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js +299 -284
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/aggregatorBlock.pure.js +196 -181
- package/Meshes/Node/Blocks/Set/aggregatorBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/latticeBlock.pure.js +198 -179
- package/Meshes/Node/Blocks/Set/latticeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setColorsBlock.pure.js +151 -138
- package/Meshes/Node/Blocks/Set/setColorsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.pure.js +107 -94
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setNormalsBlock.pure.js +138 -125
- package/Meshes/Node/Blocks/Set/setNormalsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setPositionsBlock.pure.js +213 -200
- package/Meshes/Node/Blocks/Set/setPositionsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setTangentsBlock.pure.js +138 -125
- package/Meshes/Node/Blocks/Set/setTangentsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setUVsBlock.pure.js +179 -164
- package/Meshes/Node/Blocks/Set/setUVsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/boxBlock.pure.js +183 -170
- package/Meshes/Node/Blocks/Sources/boxBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/capsuleBlock.pure.js +125 -112
- package/Meshes/Node/Blocks/Sources/capsuleBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/cylinderBlock.pure.js +153 -140
- package/Meshes/Node/Blocks/Sources/cylinderBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/discBlock.pure.js +112 -99
- package/Meshes/Node/Blocks/Sources/discBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/gridBlock.pure.js +133 -120
- package/Meshes/Node/Blocks/Sources/gridBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/icoSphereBlock.pure.js +128 -115
- package/Meshes/Node/Blocks/Sources/icoSphereBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/meshBlock.pure.js +116 -103
- package/Meshes/Node/Blocks/Sources/meshBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/planeBlock.pure.js +160 -147
- package/Meshes/Node/Blocks/Sources/planeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/sphereBlock.pure.js +144 -131
- package/Meshes/Node/Blocks/Sources/sphereBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/torusBlock.pure.js +112 -99
- package/Meshes/Node/Blocks/Sources/torusBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.pure.js +200 -185
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/bevelBlock.pure.js +111 -98
- package/Meshes/Node/Blocks/bevelBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js +182 -165
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/cleanGeometryBlock.pure.js +89 -76
- package/Meshes/Node/Blocks/cleanGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/conditionBlock.pure.js +184 -169
- package/Meshes/Node/Blocks/conditionBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/extrudeGeometryBlock.pure.js +270 -255
- package/Meshes/Node/Blocks/extrudeGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryCollectionBlock.pure.js +172 -159
- package/Meshes/Node/Blocks/geometryCollectionBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryCurveBlock.pure.js +230 -217
- package/Meshes/Node/Blocks/geometryCurveBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryEaseBlock.pure.js +256 -245
- package/Meshes/Node/Blocks/geometryEaseBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js +206 -189
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryTransformBlock.pure.js +166 -153
- package/Meshes/Node/Blocks/geometryTransformBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.pure.js +221 -208
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mappingBlock.pure.js +150 -137
- package/Meshes/Node/Blocks/mappingBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mathBlock.pure.js +269 -256
- package/Meshes/Node/Blocks/mathBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mergeGeometryBlock.pure.js +141 -128
- package/Meshes/Node/Blocks/mergeGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/randomBlock.pure.js +161 -148
- package/Meshes/Node/Blocks/randomBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/subdivideBlock.pure.js +102 -87
- package/Meshes/Node/Blocks/subdivideBlock.pure.js.map +1 -1
- package/Meshes/Node/nodeGeometry.js +560 -538
- package/Meshes/Node/nodeGeometry.js.map +1 -1
- package/Meshes/Node/nodeGeometryBlock.js +473 -458
- package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
- package/Meshes/abstractMesh.pure.js +2218 -2207
- package/Meshes/abstractMesh.pure.js.map +1 -1
- package/Meshes/geometry.js +30 -15
- package/Meshes/geometry.js.map +1 -1
- package/Meshes/mesh.pure.js +26 -14
- package/Meshes/mesh.pure.js.map +1 -1
- package/Meshes/mesh.vertexData.js +1665 -1655
- package/Meshes/mesh.vertexData.js.map +1 -1
- package/Meshes/transformNode.pure.js +1400 -1372
- package/Meshes/transformNode.pure.js.map +1 -1
- package/Misc/decorators.d.ts +34 -19
- package/Misc/decorators.functions.d.ts +33 -2
- package/Misc/decorators.functions.js +114 -35
- package/Misc/decorators.functions.js.map +1 -1
- package/Misc/decorators.js +96 -68
- package/Misc/decorators.js.map +1 -1
- package/Misc/decorators.serialization.js +47 -40
- package/Misc/decorators.serialization.js.map +1 -1
- package/Misc/decorators.serializationUtilities.d.ts +24 -0
- package/Misc/decorators.serializationUtilities.js +20 -0
- package/Misc/decorators.serializationUtilities.js.map +1 -0
- package/Misc/dumpTools.pure.js +43 -33
- package/Misc/dumpTools.pure.js.map +1 -1
- package/Misc/fileTools.pure.js +8 -0
- package/Misc/fileTools.pure.js.map +1 -1
- package/Misc/observable.pure.js +0 -7
- package/Misc/observable.pure.js.map +1 -1
- package/Misc/snapshotRenderingHelper.d.ts +4 -1
- package/Misc/snapshotRenderingHelper.js.map +1 -1
- package/Misc/symbolMetadataPolyfill.d.ts +11 -0
- package/Misc/symbolMetadataPolyfill.js +22 -0
- package/Misc/symbolMetadataPolyfill.js.map +1 -0
- package/Misc/tools.pure.js +2 -2
- package/Misc/tools.pure.js.map +1 -1
- package/Morph/morphTarget.js +382 -365
- package/Morph/morphTarget.js.map +1 -1
- package/Particles/Node/Blocks/Conditions/particleConditionBlock.pure.js +160 -145
- package/Particles/Node/Blocks/Conditions/particleConditionBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/coneShapeBlock.pure.js +187 -174
- package/Particles/Node/Blocks/Emitters/coneShapeBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/meshShapeBlock.pure.js +238 -219
- package/Particles/Node/Blocks/Emitters/meshShapeBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.pure.js +140 -115
- package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/sphereShapeBlock.pure.js +157 -144
- package/Particles/Node/Blocks/Emitters/sphereShapeBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Triggers/particleTriggerBlock.pure.js +133 -119
- package/Particles/Node/Blocks/Triggers/particleTriggerBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Update/alignAngleBlock.pure.js +93 -80
- package/Particles/Node/Blocks/Update/alignAngleBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleDebugBlock.pure.js +117 -105
- package/Particles/Node/Blocks/particleDebugBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleFloatToIntBlock.pure.js +105 -92
- package/Particles/Node/Blocks/particleFloatToIntBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleGradientValueBlock.pure.js +82 -69
- package/Particles/Node/Blocks/particleGradientValueBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleLocalVariableBlock.pure.js +113 -101
- package/Particles/Node/Blocks/particleLocalVariableBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleMathBlock.pure.js +278 -265
- package/Particles/Node/Blocks/particleMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleNumberMathBlock.pure.js +155 -142
- package/Particles/Node/Blocks/particleNumberMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleRandomBlock.pure.js +156 -143
- package/Particles/Node/Blocks/particleRandomBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleTrigonometryBlock.pure.js +217 -204
- package/Particles/Node/Blocks/particleTrigonometryBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleVectorMathBlock.pure.js +106 -93
- package/Particles/Node/Blocks/particleVectorMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/systemBlock.pure.js +366 -330
- package/Particles/Node/Blocks/systemBlock.pure.js.map +1 -1
- package/Particles/Node/nodeParticleBlock.js +339 -324
- package/Particles/Node/nodeParticleBlock.js.map +1 -1
- package/Particles/Node/nodeParticleSystemSet.js +494 -473
- package/Particles/Node/nodeParticleSystemSet.js.map +1 -1
- package/Particles/gpuParticleSystem.d.ts +0 -1
- package/Particles/gpuParticleSystem.js +0 -1
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/gpuParticleSystem.pure.d.ts +4 -3
- package/Particles/gpuParticleSystem.pure.js +27 -16
- package/Particles/gpuParticleSystem.pure.js.map +1 -1
- package/Particles/particleSystem.pure.js +57 -2
- package/Particles/particleSystem.pure.js.map +1 -1
- package/Particles/thinParticleSystem.d.ts +0 -1
- package/Particles/thinParticleSystem.js +0 -1
- package/Particles/thinParticleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.pure.js +2 -0
- package/Particles/thinParticleSystem.pure.js.map +1 -1
- package/Particles/webgl2ParticleSystem.pure.js +2 -0
- package/Particles/webgl2ParticleSystem.pure.js.map +1 -1
- package/Physics/v1/physicsImpostor.pure.js +4 -4
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js +675 -656
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.d.ts +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.pure.js +521 -486
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.d.ts +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.pure.js +241 -220
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.pure.js +852 -835
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.pure.js +1135 -1073
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.pure.js +319 -303
- package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js +212 -199
- package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js.map +1 -1
- package/PostProcesses/blackAndWhitePostProcess.pure.js +67 -55
- package/PostProcesses/blackAndWhitePostProcess.pure.js.map +1 -1
- package/PostProcesses/bloomMergePostProcess.pure.js +74 -62
- package/PostProcesses/bloomMergePostProcess.pure.js.map +1 -1
- package/PostProcesses/blurPostProcess.pure.js +127 -115
- package/PostProcesses/blurPostProcess.pure.js.map +1 -1
- package/PostProcesses/chromaticAberrationPostProcess.pure.js +130 -118
- package/PostProcesses/chromaticAberrationPostProcess.pure.js.map +1 -1
- package/PostProcesses/circleOfConfusionPostProcess.pure.js +115 -104
- package/PostProcesses/circleOfConfusionPostProcess.pure.js.map +1 -1
- package/PostProcesses/colorCorrectionPostProcess.pure.js +55 -43
- package/PostProcesses/colorCorrectionPostProcess.pure.js.map +1 -1
- package/PostProcesses/convolutionPostProcess.pure.js +96 -84
- package/PostProcesses/convolutionPostProcess.pure.js.map +1 -1
- package/PostProcesses/extractHighlightsPostProcess.pure.js +68 -57
- package/PostProcesses/extractHighlightsPostProcess.pure.js.map +1 -1
- package/PostProcesses/filterPostProcess.pure.js +66 -54
- package/PostProcesses/filterPostProcess.pure.js.map +1 -1
- package/PostProcesses/fxaaPostProcess.pure.js.map +1 -1
- package/PostProcesses/grainPostProcess.pure.js +82 -70
- package/PostProcesses/grainPostProcess.pure.js.map +1 -1
- package/PostProcesses/imageProcessingPostProcess.js +334 -322
- package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
- package/PostProcesses/motionBlurPostProcess.pure.js +246 -235
- package/PostProcesses/motionBlurPostProcess.pure.js.map +1 -1
- package/PostProcesses/passPostProcess.pure.js +75 -63
- package/PostProcesses/passPostProcess.pure.js.map +1 -1
- package/PostProcesses/postProcess.pure.js +899 -835
- package/PostProcesses/postProcess.pure.js.map +1 -1
- package/PostProcesses/refractionPostProcess.pure.js +114 -87
- package/PostProcesses/refractionPostProcess.pure.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js +108 -96
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js.map +1 -1
- package/PostProcesses/screenSpaceReflectionPostProcess.pure.js +241 -220
- package/PostProcesses/screenSpaceReflectionPostProcess.pure.js.map +1 -1
- package/PostProcesses/sharpenPostProcess.pure.js +86 -74
- package/PostProcesses/sharpenPostProcess.pure.js.map +1 -1
- package/PostProcesses/tonemapPostProcess.pure.js +82 -70
- package/PostProcesses/tonemapPostProcess.pure.js.map +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.pure.js +500 -465
- package/PostProcesses/volumetricLightScatteringPostProcess.pure.js.map +1 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.d.ts +0 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.js +0 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.js.map +1 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.pure.js +2 -0
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.pure.js.map +1 -1
- package/Probes/reflectionProbe.pure.js +238 -224
- package/Probes/reflectionProbe.pure.js.map +1 -1
- package/Rendering/GlobalIllumination/giRSMManager.pure.d.ts +1 -1
- package/Rendering/GlobalIllumination/giRSMManager.pure.js +138 -105
- package/Rendering/GlobalIllumination/giRSMManager.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.d.ts +1 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js +155 -138
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.d.ts +0 -2
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +0 -2
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js +5 -0
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.d.ts +0 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js +0 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +1 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +34 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
- package/Rendering/edgesRenderer.pure.js.map +1 -1
- package/Rendering/prePassRenderer.d.ts +0 -2
- package/Rendering/prePassRenderer.js +0 -2
- package/Rendering/prePassRenderer.js.map +1 -1
- package/Rendering/prePassRenderer.pure.js +2 -0
- package/Rendering/prePassRenderer.pure.js.map +1 -1
- package/Rendering/reflectiveShadowMap.pure.d.ts +1 -1
- package/Rendering/reflectiveShadowMap.pure.js +151 -130
- package/Rendering/reflectiveShadowMap.pure.js.map +1 -1
- package/Rendering/thinDepthPeelingRenderer.d.ts +0 -1
- package/Rendering/thinDepthPeelingRenderer.js +0 -1
- package/Rendering/thinDepthPeelingRenderer.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js +1 -0
- package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js +35 -5
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/Shaders/gaussianSplatting.fragment.js +17 -1
- package/Shaders/gaussianSplatting.fragment.js.map +1 -1
- package/Shaders/gaussianSplatting.vertex.js +1 -1
- package/Shaders/gaussianSplatting.vertex.js.map +1 -1
- package/Shaders/gaussianSplattingDepth.vertex.js +1 -1
- package/Shaders/gaussianSplattingDepth.vertex.js.map +1 -1
- package/Shaders/picking.fragment.js +39 -3
- package/Shaders/picking.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +3 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/helperFunctions.js +2 -2
- package/ShadersWGSL/ShadersInclude/helperFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js +39 -7
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js +4 -3
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.fragment.js +14 -1
- package/ShadersWGSL/gaussianSplatting.fragment.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js +2 -2
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js +2 -2
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
- package/ShadersWGSL/lightingVolume.compute.js +2 -2
- package/ShadersWGSL/lightingVolume.compute.js.map +1 -1
- package/ShadersWGSL/picking.fragment.js +22 -1
- package/ShadersWGSL/picking.fragment.js.map +1 -1
- package/XR/features/Layers/WebXRCompositionLayer.d.ts +3 -2
- package/XR/features/Layers/WebXRCompositionLayer.js +2 -2
- package/XR/features/Layers/WebXRCompositionLayer.js.map +1 -1
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.d.ts +59 -0
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.js +120 -0
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.js.map +1 -0
- package/XR/features/Layers/WebXRWebGPUProjectionLayer.d.ts +25 -0
- package/XR/features/Layers/WebXRWebGPUProjectionLayer.js +69 -0
- package/XR/features/Layers/WebXRWebGPUProjectionLayer.js.map +1 -0
- package/XR/features/WebXRLayers.pure.d.ts +8 -0
- package/XR/features/WebXRLayers.pure.js +43 -6
- package/XR/features/WebXRLayers.pure.js.map +1 -1
- package/XR/native/nativeXRRenderTarget.d.ts +2 -2
- package/XR/native/nativeXRRenderTarget.js +2 -2
- package/XR/native/nativeXRRenderTarget.js.map +1 -1
- package/XR/webXRExperienceHelper.js +10 -1
- package/XR/webXRExperienceHelper.js.map +1 -1
- package/XR/webXRGraphicsBinding.d.ts +90 -0
- package/XR/webXRGraphicsBinding.js +85 -0
- package/XR/webXRGraphicsBinding.js.map +1 -0
- package/XR/webXRLayerRenderTargetTexture.d.ts +24 -0
- package/XR/webXRLayerRenderTargetTexture.js +30 -0
- package/XR/webXRLayerRenderTargetTexture.js.map +1 -0
- package/XR/webXRManagedOutputCanvas.d.ts +14 -0
- package/XR/webXRManagedOutputCanvas.js +24 -5
- package/XR/webXRManagedOutputCanvas.js.map +1 -1
- package/XR/webXRRenderTargetTextureProvider.d.ts +25 -4
- package/XR/webXRRenderTargetTextureProvider.js +33 -35
- package/XR/webXRRenderTargetTextureProvider.js.map +1 -1
- package/XR/webXRSessionManager.d.ts +11 -0
- package/XR/webXRSessionManager.js +37 -0
- package/XR/webXRSessionManager.js.map +1 -1
- package/XR/webXRTypes.d.ts +9 -6
- package/XR/webXRTypes.js.map +1 -1
- package/XR/webXRWebGLLayer.d.ts +2 -2
- package/XR/webXRWebGLLayer.js +2 -2
- package/XR/webXRWebGLLayer.js.map +1 -1
- package/XR/webXRWebGLRenderTargetTextureProvider.d.ts +12 -0
- package/XR/webXRWebGLRenderTargetTextureProvider.js +58 -0
- package/XR/webXRWebGLRenderTargetTextureProvider.js.map +1 -0
- package/XR/webXRWebGPURenderTargetTextureProvider.d.ts +69 -0
- package/XR/webXRWebGPURenderTargetTextureProvider.js +148 -0
- package/XR/webXRWebGPURenderTargetTextureProvider.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/node.js +878 -845
- package/node.js.map +1 -1
- package/package.json +8 -14
- package/scene.pure.d.ts +12 -0
- package/scene.pure.js +36 -0
- package/scene.pure.js.map +1 -1
- package/tslib.es6.js +304 -150
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeParticleSystemSet.js","sourceRoot":"","sources":["../../../../../dev/core/src/Particles/Node/nodeParticleSystemSet.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE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AC,CAAC;oBACtD,CAAC;gBACL,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,GAAG,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;YAC1E,OAAO,CAAC,IAAI,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;IACP,CAAC;;AAhmBD,gDAAgD;AAClC,+BAAS,GAAG,GAAG,KAAK,CAAC,cAAc,KAAK,cAAc,CAAC,OAAO,mDAAmD,AAAxG,CAAyG;AAEhI,sCAAsC;AACxB,gCAAU,GAAG,SAAS,CAAC,UAAU,AAAvB,CAAwB;AA2BzC;IADN,SAAS,EAAE;mDACQ;AAMb;IADN,SAAS,CAAC,SAAS,CAAC;sDACE","sourcesContent":["import { serialize } from \"core/Misc/decorators\";\r\nimport { ParticleSystemSet } from \"../particleSystemSet\";\r\nimport { SystemBlock } from \"./Blocks/systemBlock.pure\";\r\nimport { type Scene } from \"core/scene\";\r\nimport { NodeParticleBuildState } from \"./nodeParticleBuildState\";\r\nimport { type NodeParticleBlock } from \"./nodeParticleBlock\";\r\nimport { SerializationHelper } from \"core/Misc/decorators.serialization\";\r\nimport { Observable } from \"core/Misc/observable\";\r\nimport { GetClass } from \"core/Misc/typeStore\";\r\nimport { WebRequest } from \"core/Misc/webRequest\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { Tools } from \"core/Misc/tools.pure\";\r\nimport { AbstractEngine } from \"core/Engines/abstractEngine\";\r\nimport { ParticleInputBlock } from \"./Blocks/particleInputBlock.pure\";\r\nimport { ParticleTextureSourceBlock } from \"./Blocks/particleSourceTextureBlock.pure\";\r\nimport { NodeParticleContextualSources } from \"./Enums/nodeParticleContextualSources\";\r\nimport { UpdatePositionBlock } from \"./Blocks/Update/updatePositionBlock.pure\";\r\nimport { ParticleMathBlock, ParticleMathBlockOperations } from \"./Blocks/particleMathBlock.pure\";\r\nimport { type ParticleTeleportOutBlock } from \"./Blocks/Teleport/particleTeleportOutBlock\";\r\nimport { type ParticleTeleportInBlock } from \"./Blocks/Teleport/particleTeleportInBlock\";\r\nimport { BoxShapeBlock } from \"./Blocks/Emitters/boxShapeBlock.pure\";\r\nimport { CreateParticleBlock } from \"./Blocks/Emitters/createParticleBlock.pure\";\r\nimport { type Color4 } from \"core/Maths/math.color\";\r\nimport { type Nullable } from \"../../types\";\r\n\r\n// declare NODEPARTICLEEDITOR namespace for compilation issue\r\ndeclare let NODEPARTICLEEDITOR: any;\r\ndeclare let BABYLON: any;\r\n\r\n/**\r\n * Interface used to configure the node particle editor\r\n */\r\nexport interface INodeParticleEditorOptions {\r\n /** Define the URL to load node editor script from */\r\n editorURL?: string;\r\n /** Additional configuration for the NPE */\r\n nodeEditorConfig?: {\r\n backgroundColor?: Color4;\r\n /** If true, the node particle system set will be disposed when the editor is closed (default: true) */\r\n disposeOnClose?: boolean;\r\n };\r\n}\r\n\r\n/**\r\n * Defines a set of particle systems defined as a node graph.\r\n * NPE: #K6F1ZB#1\r\n * PG: #ZT509U#1\r\n */\r\nexport class NodeParticleSystemSet {\r\n private _systemBlocks: SystemBlock[] = [];\r\n private _buildId: number = 0;\r\n\r\n /** Define the Url to load node editor script */\r\n public static EditorURL = `${Tools._DefaultCdnUrl}/v${AbstractEngine.Version}/nodeParticleEditor/babylon.nodeParticleEditor.js`;\r\n\r\n /** Define the Url to load snippets */\r\n public static SnippetUrl = Constants.SnippetUrl;\r\n\r\n /**\r\n * Snippet ID if the material was created from the snippet server\r\n */\r\n public snippetId: string;\r\n\r\n /**\r\n * Gets an array of blocks that needs to be serialized even if they are not yet connected\r\n */\r\n public attachedBlocks: NodeParticleBlock[] = [];\r\n\r\n /**\r\n * Gets or sets data used by visual editor\r\n * @see https://npe.babylonjs.com\r\n */\r\n public editorData: any = null;\r\n\r\n /**\r\n * Observable raised when the particle set is built\r\n */\r\n public onBuildObservable = new Observable<NodeParticleSystemSet>();\r\n\r\n /**\r\n * The name of the set\r\n */\r\n @serialize()\r\n public name: string;\r\n\r\n /**\r\n * A free comment about the set\r\n */\r\n @serialize(\"comment\")\r\n public comment: string;\r\n\r\n /**\r\n * Gets the system blocks\r\n */\r\n public get systemBlocks(): SystemBlock[] {\r\n return this._systemBlocks;\r\n }\r\n\r\n /**\r\n * Gets the list of input blocks attached to this material\r\n * @returns an array of InputBlocks\r\n */\r\n public get inputBlocks() {\r\n const blocks: ParticleInputBlock[] = [];\r\n for (const block of this.attachedBlocks) {\r\n if (block.isInput) {\r\n blocks.push(block as ParticleInputBlock);\r\n }\r\n }\r\n\r\n return blocks;\r\n }\r\n\r\n /**\r\n * Get a block by its name\r\n * @param name defines the name of the block to retrieve\r\n * @returns the required block or null if not found\r\n */\r\n public getBlockByName(name: string) {\r\n let result = null;\r\n for (const block of this.attachedBlocks) {\r\n if (block.name === name) {\r\n if (!result) {\r\n result = block;\r\n } else {\r\n Tools.Warn(\"More than one block was found with the name `\" + name + \"`\");\r\n return result;\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Get a block using a predicate\r\n * @param predicate defines the predicate used to find the good candidate\r\n * @returns the required block or null if not found\r\n */\r\n public getBlockByPredicate(predicate: (block: NodeParticleBlock) => boolean) {\r\n for (const block of this.attachedBlocks) {\r\n if (predicate(block)) {\r\n return block;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Get an input block using a predicate\r\n * @param predicate defines the predicate used to find the good candidate\r\n * @returns the required input block or null if not found\r\n */\r\n public getInputBlockByPredicate(predicate: (block: ParticleInputBlock) => boolean): Nullable<ParticleInputBlock> {\r\n for (const block of this.attachedBlocks) {\r\n if (block.isInput && predicate(block as ParticleInputBlock)) {\r\n return block as ParticleInputBlock;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n /**\r\n * Creates a new set\r\n * @param name defines the name of the set\r\n */\r\n public constructor(name: string) {\r\n this.name = name;\r\n }\r\n\r\n /**\r\n * Gets the current class name of the node particle set e.g. \"NodeParticleSystemSet\"\r\n * @returns the class name\r\n */\r\n public getClassName(): string {\r\n return \"NodeParticleSystemSet\";\r\n }\r\n\r\n private _initializeBlock(node: NodeParticleBlock, autoConfigure = true) {\r\n if (this.attachedBlocks.indexOf(node) === -1) {\r\n this.attachedBlocks.push(node);\r\n }\r\n\r\n for (const input of node.inputs) {\r\n const connectedPoint = input.connectedPoint;\r\n if (connectedPoint) {\r\n const block = connectedPoint.ownerBlock;\r\n if (block !== node) {\r\n this._initializeBlock(block, autoConfigure);\r\n }\r\n }\r\n }\r\n }\r\n\r\n private BJSNODEPARTICLEEDITOR = this._getGlobalNodeParticleEditor();\r\n\r\n /** Get the editor from bundle or global\r\n * @returns the global NPE\r\n */\r\n private _getGlobalNodeParticleEditor(): any {\r\n // UMD global name detection from bundle metadata.\r\n // Note: rollup-built UMD bundles do not expose the editor class\r\n // directly on the namespace - it lives on `.default.NodeParticleEditor` -\r\n // so we unwrap that case before falling back to the BABYLON global.\r\n if (typeof NODEPARTICLEEDITOR !== \"undefined\") {\r\n if ((NODEPARTICLEEDITOR as any).NodeParticleEditor) {\r\n return NODEPARTICLEEDITOR;\r\n }\r\n if ((NODEPARTICLEEDITOR as any).default?.NodeParticleEditor) {\r\n return (NODEPARTICLEEDITOR as any).default;\r\n }\r\n }\r\n\r\n // In case of module let's check the global emitted from the editor entry point.\r\n if (typeof BABYLON !== \"undefined\" && typeof BABYLON.NodeParticleEditor !== \"undefined\") {\r\n return BABYLON;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /** Creates the node editor window.\r\n * @param additionalConfig Define the configuration of the editor\r\n */\r\n private _createNodeParticleEditor(additionalConfig?: any) {\r\n const nodeEditorConfig: any = {\r\n nodeParticleSet: this,\r\n ...additionalConfig,\r\n };\r\n this.BJSNODEPARTICLEEDITOR.NodeParticleEditor.Show(nodeEditorConfig);\r\n }\r\n\r\n /**\r\n * Launch the node particle editor\r\n * @param config Define the configuration of the editor\r\n * @returns a promise fulfilled when the node editor is visible\r\n */\r\n public async editAsync(config?: INodeParticleEditorOptions): Promise<void> {\r\n return await new Promise((resolve) => {\r\n this.BJSNODEPARTICLEEDITOR = this.BJSNODEPARTICLEEDITOR || this._getGlobalNodeParticleEditor();\r\n if (typeof this.BJSNODEPARTICLEEDITOR == \"undefined\") {\r\n const editorUrl = config && config.editorURL ? config.editorURL : NodeParticleSystemSet.EditorURL;\r\n\r\n // Load editor and add it to the DOM\r\n Tools.LoadBabylonScript(editorUrl, () => {\r\n this.BJSNODEPARTICLEEDITOR = this.BJSNODEPARTICLEEDITOR || this._getGlobalNodeParticleEditor();\r\n this._createNodeParticleEditor(config?.nodeEditorConfig);\r\n resolve();\r\n });\r\n } else {\r\n // Otherwise creates the editor\r\n this._createNodeParticleEditor(config?.nodeEditorConfig);\r\n resolve();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Builds the particle system set from the defined blocks.\r\n * @param scene defines the hosting scene\r\n * @param verbose defines whether to log detailed information during the build process (false by default)\r\n * @returns a promise that resolves to the built particle system set\r\n */\r\n public async buildAsync(scene: Scene, verbose = false): Promise<ParticleSystemSet> {\r\n const output = new ParticleSystemSet();\r\n\r\n // Initialize all blocks\r\n for (const block of this._systemBlocks) {\r\n this._initializeBlock(block);\r\n }\r\n\r\n // Build the blocks\r\n const buildPromises = new Array<Promise<void>>();\r\n for (const block of this.systemBlocks) {\r\n const state = new NodeParticleBuildState();\r\n state.buildId = this._buildId++;\r\n state.scene = scene;\r\n state.verbose = verbose;\r\n\r\n const system = block.createSystem(state);\r\n system._source = this;\r\n system._blockReference = block._internalId;\r\n\r\n // Errors\r\n state.emitErrors();\r\n\r\n buildPromises.push(state.waitForBuildPromisesAsync());\r\n\r\n output.systems.push(system);\r\n }\r\n\r\n await Promise.all(buildPromises);\r\n\r\n this.onBuildObservable.notifyObservers(this);\r\n\r\n return output;\r\n }\r\n\r\n /**\r\n * Clear the current node particle set\r\n */\r\n public clear() {\r\n this.attachedBlocks.length = 0;\r\n this._systemBlocks.length = 0;\r\n }\r\n\r\n /**\r\n * Clear the current set and restore it to a default state\r\n */\r\n public setToDefault() {\r\n this.clear();\r\n\r\n this.editorData = null;\r\n\r\n // Main system\r\n const system = new SystemBlock(\"Particle system\");\r\n\r\n // Update position\r\n const updatePositionBlock = new UpdatePositionBlock(\"Update position\");\r\n updatePositionBlock.output.connectTo(system.particle);\r\n\r\n // Contextual inputs\r\n const positionBlock = new ParticleInputBlock(\"Position\");\r\n positionBlock.contextualValue = NodeParticleContextualSources.Position;\r\n const directionBlock = new ParticleInputBlock(\"Scaled direction\");\r\n directionBlock.contextualValue = NodeParticleContextualSources.ScaledDirection;\r\n\r\n // Add\r\n const addBlock = new ParticleMathBlock(\"Add\");\r\n addBlock.operation = ParticleMathBlockOperations.Add;\r\n positionBlock.output.connectTo(addBlock.left);\r\n directionBlock.output.connectTo(addBlock.right);\r\n addBlock.output.connectTo(updatePositionBlock.position);\r\n\r\n // Create particle\r\n const createParticleBlock = new CreateParticleBlock(\"Create particle\");\r\n\r\n // Shape\r\n const emitterShape = new BoxShapeBlock(\"Box shape\");\r\n createParticleBlock.particle.connectTo(emitterShape.particle);\r\n emitterShape.output.connectTo(updatePositionBlock.particle);\r\n\r\n // Texture\r\n const textureBlock = new ParticleTextureSourceBlock(\"Texture\");\r\n textureBlock.textureOutput.connectTo(system.texture);\r\n textureBlock.url = Tools.GetAssetUrl(\"https://assets.babylonjs.com/core/textures/flare.png\");\r\n\r\n this._systemBlocks.push(system);\r\n }\r\n\r\n /**\r\n * Remove a block from the current system set\r\n * @param block defines the block to remove\r\n */\r\n public removeBlock(block: NodeParticleBlock) {\r\n const attachedBlockIndex = this.attachedBlocks.indexOf(block);\r\n if (attachedBlockIndex > -1) {\r\n this.attachedBlocks.splice(attachedBlockIndex, 1);\r\n }\r\n\r\n if (block.isSystem) {\r\n const index = this._systemBlocks.indexOf(block as SystemBlock);\r\n if (index > -1) {\r\n this._systemBlocks.splice(index, 1);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Clear the current graph and load a new one from a serialization object\r\n * @param source defines the JSON representation of the particle set\r\n * @param merge defines whether or not the source must be merged or replace the current content\r\n */\r\n public parseSerializedObject(source: any, merge = false) {\r\n if (!merge) {\r\n this.clear();\r\n }\r\n\r\n const map: { [key: number]: NodeParticleBlock } = {};\r\n\r\n // Create blocks\r\n for (const parsedBlock of source.blocks) {\r\n const blockType = GetClass(parsedBlock.customType);\r\n if (blockType) {\r\n const block: NodeParticleBlock = new blockType();\r\n block._deserialize(parsedBlock);\r\n map[parsedBlock.id] = block;\r\n\r\n this.attachedBlocks.push(block);\r\n\r\n if (block.isSystem) {\r\n this._systemBlocks.push(block as SystemBlock);\r\n }\r\n }\r\n }\r\n\r\n // Reconnect teleportation\r\n for (const block of this.attachedBlocks) {\r\n if (block.isTeleportOut) {\r\n const teleportOut = block as ParticleTeleportOutBlock;\r\n const id = teleportOut._tempEntryPointUniqueId;\r\n if (id) {\r\n const source = map[id] as ParticleTeleportInBlock;\r\n if (source) {\r\n source.attachToEndpoint(teleportOut);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Connections - Starts with input blocks only (except if in \"merge\" mode where we scan all blocks)\r\n for (let blockIndex = 0; blockIndex < source.blocks.length; blockIndex++) {\r\n const parsedBlock = source.blocks[blockIndex];\r\n const block = map[parsedBlock.id];\r\n\r\n if (!block) {\r\n continue;\r\n }\r\n\r\n if (block.inputs.length && parsedBlock.inputs.some((i: any) => i.targetConnectionName) && !merge) {\r\n continue;\r\n }\r\n this._restoreConnections(block, source, map);\r\n }\r\n\r\n // UI related info\r\n if (source.locations || (source.editorData && source.editorData.locations)) {\r\n const locations: {\r\n blockId: number;\r\n x: number;\r\n y: number;\r\n isCollapsed: boolean;\r\n }[] = source.locations || source.editorData.locations;\r\n\r\n for (const location of locations) {\r\n if (map[location.blockId]) {\r\n location.blockId = map[location.blockId].uniqueId;\r\n }\r\n }\r\n\r\n if (merge && this.editorData && this.editorData.locations) {\r\n locations.concat(this.editorData.locations);\r\n }\r\n\r\n if (source.locations) {\r\n this.editorData = {\r\n locations: locations,\r\n };\r\n } else {\r\n this.editorData = source.editorData;\r\n this.editorData.locations = locations;\r\n }\r\n\r\n const blockMap: { [key: number]: number } = {};\r\n\r\n for (const key in map) {\r\n blockMap[key] = map[key].uniqueId;\r\n }\r\n\r\n this.editorData.map = blockMap;\r\n }\r\n\r\n this.comment = source.comment;\r\n }\r\n\r\n private _restoreConnections(block: NodeParticleBlock, source: any, map: { [key: number]: NodeParticleBlock }) {\r\n for (const outputPoint of block.outputs) {\r\n for (const candidate of source.blocks) {\r\n const target = map[candidate.id];\r\n\r\n if (!target) {\r\n continue;\r\n }\r\n\r\n for (const input of candidate.inputs) {\r\n if (map[input.targetBlockId] === block && input.targetConnectionName === outputPoint.name) {\r\n const inputPoint = target.getInputByName(input.inputName);\r\n if (!inputPoint || inputPoint.isConnected) {\r\n continue;\r\n }\r\n\r\n outputPoint.connectTo(inputPoint, true);\r\n this._restoreConnections(target, source, map);\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Serializes this node particle set in a JSON representation\r\n * @param selectedBlocks defines the list of blocks to save (if null the whole node particle set will be saved)\r\n * @returns the serialized particle system set object\r\n */\r\n public serialize(selectedBlocks?: NodeParticleBlock[]): any {\r\n const serializationObject = selectedBlocks ? {} : SerializationHelper.Serialize(this);\r\n serializationObject.editorData = JSON.parse(JSON.stringify(this.editorData)); // Copy\r\n\r\n let blocks: NodeParticleBlock[] = [];\r\n\r\n if (selectedBlocks) {\r\n blocks = selectedBlocks;\r\n } else {\r\n serializationObject.customType = \"BABYLON.NodeParticleSystemSet\";\r\n }\r\n\r\n // Blocks\r\n serializationObject.blocks = [];\r\n\r\n for (const block of blocks) {\r\n serializationObject.blocks.push(block.serialize());\r\n }\r\n\r\n if (!selectedBlocks) {\r\n for (const block of this.attachedBlocks) {\r\n if (blocks.indexOf(block) !== -1) {\r\n continue;\r\n }\r\n serializationObject.blocks.push(block.serialize());\r\n }\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Makes a duplicate of the current particle system set.\r\n * @param name defines the name to use for the new particle system set\r\n * @returns the cloned particle system set\r\n */\r\n public clone(name: string): NodeParticleSystemSet {\r\n const serializationObject = this.serialize();\r\n\r\n const clone = SerializationHelper.Clone(() => new NodeParticleSystemSet(name), this);\r\n clone.name = name;\r\n clone.snippetId = this.snippetId;\r\n\r\n clone.parseSerializedObject(serializationObject);\r\n clone._buildId = this._buildId;\r\n\r\n return clone;\r\n }\r\n\r\n /**\r\n * Disposes the resources\r\n */\r\n public dispose(): void {\r\n for (const block of this.attachedBlocks) {\r\n block.dispose();\r\n }\r\n\r\n this.attachedBlocks.length = 0;\r\n this.onBuildObservable.clear();\r\n }\r\n\r\n /**\r\n * Creates a new node particle set set to default basic configuration\r\n * @param name defines the name of the particle set\r\n * @returns a new NodeParticleSystemSet\r\n */\r\n public static CreateDefault(name: string) {\r\n const nodeParticleSet = new NodeParticleSystemSet(name);\r\n\r\n nodeParticleSet.setToDefault();\r\n\r\n return nodeParticleSet;\r\n }\r\n\r\n /**\r\n * Creates a node particle set from parsed data\r\n * @param source defines the JSON representation of the particle set\r\n * @returns a new node particle set\r\n */\r\n public static Parse(source: any): NodeParticleSystemSet {\r\n const nodeParticleSet = SerializationHelper.Parse(() => new NodeParticleSystemSet(source.name), source, null);\r\n\r\n nodeParticleSet.parseSerializedObject(source);\r\n\r\n return nodeParticleSet;\r\n }\r\n\r\n /**\r\n * Creates a node particle set from a snippet saved in a remote file\r\n * @param name defines the name of the node particle set to create\r\n * @param url defines the url to load from\r\n * @param nodeParticleSet defines a node particle set to update (instead of creating a new one)\r\n * @returns a promise that will resolve to the new node particle set\r\n */\r\n // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax\r\n public static ParseFromFileAsync(name: string, url: string, nodeParticleSet?: NodeParticleSystemSet): Promise<NodeParticleSystemSet> {\r\n return new Promise((resolve, reject) => {\r\n const request = new WebRequest();\r\n request.addEventListener(\"readystatechange\", () => {\r\n if (request.readyState == 4) {\r\n if (request.status == 200) {\r\n const serializationObject = JSON.parse(request.responseText);\r\n if (!nodeParticleSet) {\r\n nodeParticleSet = SerializationHelper.Parse(() => new NodeParticleSystemSet(name), serializationObject, null);\r\n }\r\n\r\n nodeParticleSet.parseSerializedObject(serializationObject);\r\n\r\n resolve(nodeParticleSet);\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\r\n reject(\"Unable to load the node particle system set\");\r\n }\r\n }\r\n });\r\n\r\n request.open(\"GET\", url);\r\n request.send();\r\n });\r\n }\r\n\r\n /**\r\n * Creates a node particle set from a snippet saved by the node particle editor\r\n * @param snippetId defines the snippet to load\r\n * @param nodeParticleSet defines a node particle set to update (instead of creating a new one)\r\n * @returns a promise that will resolve to the new node particle set\r\n */\r\n // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax\r\n public static ParseFromSnippetAsync(snippetId: string, nodeParticleSet?: NodeParticleSystemSet): Promise<NodeParticleSystemSet> {\r\n if (snippetId === \"_BLANK\") {\r\n return Promise.resolve(NodeParticleSystemSet.CreateDefault(\"blank\"));\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n const request = new WebRequest();\r\n request.addEventListener(\"readystatechange\", () => {\r\n if (request.readyState == 4) {\r\n if (request.status == 200) {\r\n const snippet = JSON.parse(JSON.parse(request.responseText).jsonPayload);\r\n const serializationObject = JSON.parse(snippet.nodeParticle);\r\n\r\n if (!nodeParticleSet) {\r\n nodeParticleSet = SerializationHelper.Parse(() => new NodeParticleSystemSet(snippetId), serializationObject, null);\r\n }\r\n\r\n nodeParticleSet.parseSerializedObject(serializationObject);\r\n nodeParticleSet.snippetId = snippetId;\r\n\r\n try {\r\n resolve(nodeParticleSet);\r\n } catch (err) {\r\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\r\n reject(err);\r\n }\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\r\n reject(\"Unable to load the snippet \" + snippetId);\r\n }\r\n }\r\n });\r\n\r\n request.open(\"GET\", this.SnippetUrl + \"/\" + snippetId.replace(/#/g, \"/\"));\r\n request.send();\r\n });\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"nodeParticleSystemSet.js","sourceRoot":"","sources":["../../../../../dev/core/src/Particles/Node/nodeParticleSystemSet.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAGjG,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MA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,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;oBAC1E,OAAO,CAAC,IAAI,EAAE,CAAC;gBACnB,CAAC,CAAC,CAAC;YACP,CAAC;;;;gCAlkBA,SAAS,EAAE;mCAMX,SAAS,CAAC,SAAS,CAAC;YALrB,8JAAO,IAAI,6BAAJ,IAAI,mFAAS;YAMpB,uKAAO,OAAO,6BAAP,OAAO,yFAAS;;;QArCvB,gDAAgD;QAClC,YAAS,GAAG,GAAG,KAAK,CAAC,cAAc,KAAK,cAAc,CAAC,OAAO,mDAAoD;QAEhI,sCAAsC;QACxB,aAAU,GAAG,SAAS,CAAC,UAAW;;;SARvC,qBAAqB","sourcesContent":["import { serialize } from \"core/Misc/decorators\";\r\nimport { ParticleSystemSet } from \"../particleSystemSet\";\r\nimport { SystemBlock } from \"./Blocks/systemBlock.pure\";\r\nimport { type Scene } from \"core/scene\";\r\nimport { NodeParticleBuildState } from \"./nodeParticleBuildState\";\r\nimport { type NodeParticleBlock } from \"./nodeParticleBlock\";\r\nimport { SerializationHelper } from \"core/Misc/decorators.serialization\";\r\nimport { Observable } from \"core/Misc/observable\";\r\nimport { GetClass } from \"core/Misc/typeStore\";\r\nimport { WebRequest } from \"core/Misc/webRequest\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { Tools } from \"core/Misc/tools.pure\";\r\nimport { AbstractEngine } from \"core/Engines/abstractEngine\";\r\nimport { ParticleInputBlock } from \"./Blocks/particleInputBlock.pure\";\r\nimport { ParticleTextureSourceBlock } from \"./Blocks/particleSourceTextureBlock.pure\";\r\nimport { NodeParticleContextualSources } from \"./Enums/nodeParticleContextualSources\";\r\nimport { UpdatePositionBlock } from \"./Blocks/Update/updatePositionBlock.pure\";\r\nimport { ParticleMathBlock, ParticleMathBlockOperations } from \"./Blocks/particleMathBlock.pure\";\r\nimport { type ParticleTeleportOutBlock } from \"./Blocks/Teleport/particleTeleportOutBlock\";\r\nimport { type ParticleTeleportInBlock } from \"./Blocks/Teleport/particleTeleportInBlock\";\r\nimport { BoxShapeBlock } from \"./Blocks/Emitters/boxShapeBlock.pure\";\r\nimport { CreateParticleBlock } from \"./Blocks/Emitters/createParticleBlock.pure\";\r\nimport { type Color4 } from \"core/Maths/math.color\";\r\nimport { type Nullable } from \"../../types\";\r\n\r\n// declare NODEPARTICLEEDITOR namespace for compilation issue\r\ndeclare let NODEPARTICLEEDITOR: any;\r\ndeclare let BABYLON: any;\r\n\r\n/**\r\n * Interface used to configure the node particle editor\r\n */\r\nexport interface INodeParticleEditorOptions {\r\n /** Define the URL to load node editor script from */\r\n editorURL?: string;\r\n /** Additional configuration for the NPE */\r\n nodeEditorConfig?: {\r\n backgroundColor?: Color4;\r\n /** If true, the node particle system set will be disposed when the editor is closed (default: true) */\r\n disposeOnClose?: boolean;\r\n };\r\n}\r\n\r\n/**\r\n * Defines a set of particle systems defined as a node graph.\r\n * NPE: #K6F1ZB#1\r\n * PG: #ZT509U#1\r\n */\r\nexport class NodeParticleSystemSet {\r\n private _systemBlocks: SystemBlock[] = [];\r\n private _buildId: number = 0;\r\n\r\n /** Define the Url to load node editor script */\r\n public static EditorURL = `${Tools._DefaultCdnUrl}/v${AbstractEngine.Version}/nodeParticleEditor/babylon.nodeParticleEditor.js`;\r\n\r\n /** Define the Url to load snippets */\r\n public static SnippetUrl = Constants.SnippetUrl;\r\n\r\n /**\r\n * Snippet ID if the material was created from the snippet server\r\n */\r\n public snippetId: string;\r\n\r\n /**\r\n * Gets an array of blocks that needs to be serialized even if they are not yet connected\r\n */\r\n public attachedBlocks: NodeParticleBlock[] = [];\r\n\r\n /**\r\n * Gets or sets data used by visual editor\r\n * @see https://npe.babylonjs.com\r\n */\r\n public editorData: any = null;\r\n\r\n /**\r\n * Observable raised when the particle set is built\r\n */\r\n public onBuildObservable = new Observable<NodeParticleSystemSet>();\r\n\r\n /**\r\n * The name of the set\r\n */\r\n @serialize()\r\n public name: string;\r\n\r\n /**\r\n * A free comment about the set\r\n */\r\n @serialize(\"comment\")\r\n public comment: string;\r\n\r\n /**\r\n * Gets the system blocks\r\n */\r\n public get systemBlocks(): SystemBlock[] {\r\n return this._systemBlocks;\r\n }\r\n\r\n /**\r\n * Gets the list of input blocks attached to this material\r\n * @returns an array of InputBlocks\r\n */\r\n public get inputBlocks() {\r\n const blocks: ParticleInputBlock[] = [];\r\n for (const block of this.attachedBlocks) {\r\n if (block.isInput) {\r\n blocks.push(block as ParticleInputBlock);\r\n }\r\n }\r\n\r\n return blocks;\r\n }\r\n\r\n /**\r\n * Get a block by its name\r\n * @param name defines the name of the block to retrieve\r\n * @returns the required block or null if not found\r\n */\r\n public getBlockByName(name: string) {\r\n let result = null;\r\n for (const block of this.attachedBlocks) {\r\n if (block.name === name) {\r\n if (!result) {\r\n result = block;\r\n } else {\r\n Tools.Warn(\"More than one block was found with the name `\" + name + \"`\");\r\n return result;\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Get a block using a predicate\r\n * @param predicate defines the predicate used to find the good candidate\r\n * @returns the required block or null if not found\r\n */\r\n public getBlockByPredicate(predicate: (block: NodeParticleBlock) => boolean) {\r\n for (const block of this.attachedBlocks) {\r\n if (predicate(block)) {\r\n return block;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Get an input block using a predicate\r\n * @param predicate defines the predicate used to find the good candidate\r\n * @returns the required input block or null if not found\r\n */\r\n public getInputBlockByPredicate(predicate: (block: ParticleInputBlock) => boolean): Nullable<ParticleInputBlock> {\r\n for (const block of this.attachedBlocks) {\r\n if (block.isInput && predicate(block as ParticleInputBlock)) {\r\n return block as ParticleInputBlock;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n /**\r\n * Creates a new set\r\n * @param name defines the name of the set\r\n */\r\n public constructor(name: string) {\r\n this.name = name;\r\n }\r\n\r\n /**\r\n * Gets the current class name of the node particle set e.g. \"NodeParticleSystemSet\"\r\n * @returns the class name\r\n */\r\n public getClassName(): string {\r\n return \"NodeParticleSystemSet\";\r\n }\r\n\r\n private _initializeBlock(node: NodeParticleBlock, autoConfigure = true) {\r\n if (this.attachedBlocks.indexOf(node) === -1) {\r\n this.attachedBlocks.push(node);\r\n }\r\n\r\n for (const input of node.inputs) {\r\n const connectedPoint = input.connectedPoint;\r\n if (connectedPoint) {\r\n const block = connectedPoint.ownerBlock;\r\n if (block !== node) {\r\n this._initializeBlock(block, autoConfigure);\r\n }\r\n }\r\n }\r\n }\r\n\r\n private BJSNODEPARTICLEEDITOR = this._getGlobalNodeParticleEditor();\r\n\r\n /** Get the editor from bundle or global\r\n * @returns the global NPE\r\n */\r\n private _getGlobalNodeParticleEditor(): any {\r\n // UMD global name detection from bundle metadata.\r\n // Note: rollup-built UMD bundles do not expose the editor class\r\n // directly on the namespace - it lives on `.default.NodeParticleEditor` -\r\n // so we unwrap that case before falling back to the BABYLON global.\r\n if (typeof NODEPARTICLEEDITOR !== \"undefined\") {\r\n if ((NODEPARTICLEEDITOR as any).NodeParticleEditor) {\r\n return NODEPARTICLEEDITOR;\r\n }\r\n if ((NODEPARTICLEEDITOR as any).default?.NodeParticleEditor) {\r\n return (NODEPARTICLEEDITOR as any).default;\r\n }\r\n }\r\n\r\n // In case of module let's check the global emitted from the editor entry point.\r\n if (typeof BABYLON !== \"undefined\" && typeof BABYLON.NodeParticleEditor !== \"undefined\") {\r\n return BABYLON;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /** Creates the node editor window.\r\n * @param additionalConfig Define the configuration of the editor\r\n */\r\n private _createNodeParticleEditor(additionalConfig?: any) {\r\n const nodeEditorConfig: any = {\r\n nodeParticleSet: this,\r\n ...additionalConfig,\r\n };\r\n this.BJSNODEPARTICLEEDITOR.NodeParticleEditor.Show(nodeEditorConfig);\r\n }\r\n\r\n /**\r\n * Launch the node particle editor\r\n * @param config Define the configuration of the editor\r\n * @returns a promise fulfilled when the node editor is visible\r\n */\r\n public async editAsync(config?: INodeParticleEditorOptions): Promise<void> {\r\n return await new Promise((resolve) => {\r\n this.BJSNODEPARTICLEEDITOR = this.BJSNODEPARTICLEEDITOR || this._getGlobalNodeParticleEditor();\r\n if (typeof this.BJSNODEPARTICLEEDITOR == \"undefined\") {\r\n const editorUrl = config && config.editorURL ? config.editorURL : NodeParticleSystemSet.EditorURL;\r\n\r\n // Load editor and add it to the DOM\r\n Tools.LoadBabylonScript(editorUrl, () => {\r\n this.BJSNODEPARTICLEEDITOR = this.BJSNODEPARTICLEEDITOR || this._getGlobalNodeParticleEditor();\r\n this._createNodeParticleEditor(config?.nodeEditorConfig);\r\n resolve();\r\n });\r\n } else {\r\n // Otherwise creates the editor\r\n this._createNodeParticleEditor(config?.nodeEditorConfig);\r\n resolve();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Builds the particle system set from the defined blocks.\r\n * @param scene defines the hosting scene\r\n * @param verbose defines whether to log detailed information during the build process (false by default)\r\n * @returns a promise that resolves to the built particle system set\r\n */\r\n public async buildAsync(scene: Scene, verbose = false): Promise<ParticleSystemSet> {\r\n const output = new ParticleSystemSet();\r\n\r\n // Initialize all blocks\r\n for (const block of this._systemBlocks) {\r\n this._initializeBlock(block);\r\n }\r\n\r\n // Build the blocks\r\n const buildPromises = new Array<Promise<void>>();\r\n for (const block of this.systemBlocks) {\r\n const state = new NodeParticleBuildState();\r\n state.buildId = this._buildId++;\r\n state.scene = scene;\r\n state.verbose = verbose;\r\n\r\n const system = block.createSystem(state);\r\n system._source = this;\r\n system._blockReference = block._internalId;\r\n\r\n // Errors\r\n state.emitErrors();\r\n\r\n buildPromises.push(state.waitForBuildPromisesAsync());\r\n\r\n output.systems.push(system);\r\n }\r\n\r\n await Promise.all(buildPromises);\r\n\r\n this.onBuildObservable.notifyObservers(this);\r\n\r\n return output;\r\n }\r\n\r\n /**\r\n * Clear the current node particle set\r\n */\r\n public clear() {\r\n this.attachedBlocks.length = 0;\r\n this._systemBlocks.length = 0;\r\n }\r\n\r\n /**\r\n * Clear the current set and restore it to a default state\r\n */\r\n public setToDefault() {\r\n this.clear();\r\n\r\n this.editorData = null;\r\n\r\n // Main system\r\n const system = new SystemBlock(\"Particle system\");\r\n\r\n // Update position\r\n const updatePositionBlock = new UpdatePositionBlock(\"Update position\");\r\n updatePositionBlock.output.connectTo(system.particle);\r\n\r\n // Contextual inputs\r\n const positionBlock = new ParticleInputBlock(\"Position\");\r\n positionBlock.contextualValue = NodeParticleContextualSources.Position;\r\n const directionBlock = new ParticleInputBlock(\"Scaled direction\");\r\n directionBlock.contextualValue = NodeParticleContextualSources.ScaledDirection;\r\n\r\n // Add\r\n const addBlock = new ParticleMathBlock(\"Add\");\r\n addBlock.operation = ParticleMathBlockOperations.Add;\r\n positionBlock.output.connectTo(addBlock.left);\r\n directionBlock.output.connectTo(addBlock.right);\r\n addBlock.output.connectTo(updatePositionBlock.position);\r\n\r\n // Create particle\r\n const createParticleBlock = new CreateParticleBlock(\"Create particle\");\r\n\r\n // Shape\r\n const emitterShape = new BoxShapeBlock(\"Box shape\");\r\n createParticleBlock.particle.connectTo(emitterShape.particle);\r\n emitterShape.output.connectTo(updatePositionBlock.particle);\r\n\r\n // Texture\r\n const textureBlock = new ParticleTextureSourceBlock(\"Texture\");\r\n textureBlock.textureOutput.connectTo(system.texture);\r\n textureBlock.url = Tools.GetAssetUrl(\"https://assets.babylonjs.com/core/textures/flare.png\");\r\n\r\n this._systemBlocks.push(system);\r\n }\r\n\r\n /**\r\n * Remove a block from the current system set\r\n * @param block defines the block to remove\r\n */\r\n public removeBlock(block: NodeParticleBlock) {\r\n const attachedBlockIndex = this.attachedBlocks.indexOf(block);\r\n if (attachedBlockIndex > -1) {\r\n this.attachedBlocks.splice(attachedBlockIndex, 1);\r\n }\r\n\r\n if (block.isSystem) {\r\n const index = this._systemBlocks.indexOf(block as SystemBlock);\r\n if (index > -1) {\r\n this._systemBlocks.splice(index, 1);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Clear the current graph and load a new one from a serialization object\r\n * @param source defines the JSON representation of the particle set\r\n * @param merge defines whether or not the source must be merged or replace the current content\r\n */\r\n public parseSerializedObject(source: any, merge = false) {\r\n if (!merge) {\r\n this.clear();\r\n }\r\n\r\n const map: { [key: number]: NodeParticleBlock } = {};\r\n\r\n // Create blocks\r\n for (const parsedBlock of source.blocks) {\r\n const blockType = GetClass(parsedBlock.customType);\r\n if (blockType) {\r\n const block: NodeParticleBlock = new blockType();\r\n block._deserialize(parsedBlock);\r\n map[parsedBlock.id] = block;\r\n\r\n this.attachedBlocks.push(block);\r\n\r\n if (block.isSystem) {\r\n this._systemBlocks.push(block as SystemBlock);\r\n }\r\n }\r\n }\r\n\r\n // Reconnect teleportation\r\n for (const block of this.attachedBlocks) {\r\n if (block.isTeleportOut) {\r\n const teleportOut = block as ParticleTeleportOutBlock;\r\n const id = teleportOut._tempEntryPointUniqueId;\r\n if (id) {\r\n const source = map[id] as ParticleTeleportInBlock;\r\n if (source) {\r\n source.attachToEndpoint(teleportOut);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Connections - Starts with input blocks only (except if in \"merge\" mode where we scan all blocks)\r\n for (let blockIndex = 0; blockIndex < source.blocks.length; blockIndex++) {\r\n const parsedBlock = source.blocks[blockIndex];\r\n const block = map[parsedBlock.id];\r\n\r\n if (!block) {\r\n continue;\r\n }\r\n\r\n if (block.inputs.length && parsedBlock.inputs.some((i: any) => i.targetConnectionName) && !merge) {\r\n continue;\r\n }\r\n this._restoreConnections(block, source, map);\r\n }\r\n\r\n // UI related info\r\n if (source.locations || (source.editorData && source.editorData.locations)) {\r\n const locations: {\r\n blockId: number;\r\n x: number;\r\n y: number;\r\n isCollapsed: boolean;\r\n }[] = source.locations || source.editorData.locations;\r\n\r\n for (const location of locations) {\r\n if (map[location.blockId]) {\r\n location.blockId = map[location.blockId].uniqueId;\r\n }\r\n }\r\n\r\n if (merge && this.editorData && this.editorData.locations) {\r\n locations.concat(this.editorData.locations);\r\n }\r\n\r\n if (source.locations) {\r\n this.editorData = {\r\n locations: locations,\r\n };\r\n } else {\r\n this.editorData = source.editorData;\r\n this.editorData.locations = locations;\r\n }\r\n\r\n const blockMap: { [key: number]: number } = {};\r\n\r\n for (const key in map) {\r\n blockMap[key] = map[key].uniqueId;\r\n }\r\n\r\n this.editorData.map = blockMap;\r\n }\r\n\r\n this.comment = source.comment;\r\n }\r\n\r\n private _restoreConnections(block: NodeParticleBlock, source: any, map: { [key: number]: NodeParticleBlock }) {\r\n for (const outputPoint of block.outputs) {\r\n for (const candidate of source.blocks) {\r\n const target = map[candidate.id];\r\n\r\n if (!target) {\r\n continue;\r\n }\r\n\r\n for (const input of candidate.inputs) {\r\n if (map[input.targetBlockId] === block && input.targetConnectionName === outputPoint.name) {\r\n const inputPoint = target.getInputByName(input.inputName);\r\n if (!inputPoint || inputPoint.isConnected) {\r\n continue;\r\n }\r\n\r\n outputPoint.connectTo(inputPoint, true);\r\n this._restoreConnections(target, source, map);\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Serializes this node particle set in a JSON representation\r\n * @param selectedBlocks defines the list of blocks to save (if null the whole node particle set will be saved)\r\n * @returns the serialized particle system set object\r\n */\r\n public serialize(selectedBlocks?: NodeParticleBlock[]): any {\r\n const serializationObject = selectedBlocks ? {} : SerializationHelper.Serialize(this);\r\n serializationObject.editorData = JSON.parse(JSON.stringify(this.editorData)); // Copy\r\n\r\n let blocks: NodeParticleBlock[] = [];\r\n\r\n if (selectedBlocks) {\r\n blocks = selectedBlocks;\r\n } else {\r\n serializationObject.customType = \"BABYLON.NodeParticleSystemSet\";\r\n }\r\n\r\n // Blocks\r\n serializationObject.blocks = [];\r\n\r\n for (const block of blocks) {\r\n serializationObject.blocks.push(block.serialize());\r\n }\r\n\r\n if (!selectedBlocks) {\r\n for (const block of this.attachedBlocks) {\r\n if (blocks.indexOf(block) !== -1) {\r\n continue;\r\n }\r\n serializationObject.blocks.push(block.serialize());\r\n }\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Makes a duplicate of the current particle system set.\r\n * @param name defines the name to use for the new particle system set\r\n * @returns the cloned particle system set\r\n */\r\n public clone(name: string): NodeParticleSystemSet {\r\n const serializationObject = this.serialize();\r\n\r\n const clone = SerializationHelper.Clone(() => new NodeParticleSystemSet(name), this);\r\n clone.name = name;\r\n clone.snippetId = this.snippetId;\r\n\r\n clone.parseSerializedObject(serializationObject);\r\n clone._buildId = this._buildId;\r\n\r\n return clone;\r\n }\r\n\r\n /**\r\n * Disposes the resources\r\n */\r\n public dispose(): void {\r\n for (const block of this.attachedBlocks) {\r\n block.dispose();\r\n }\r\n\r\n this.attachedBlocks.length = 0;\r\n this.onBuildObservable.clear();\r\n }\r\n\r\n /**\r\n * Creates a new node particle set set to default basic configuration\r\n * @param name defines the name of the particle set\r\n * @returns a new NodeParticleSystemSet\r\n */\r\n public static CreateDefault(name: string) {\r\n const nodeParticleSet = new NodeParticleSystemSet(name);\r\n\r\n nodeParticleSet.setToDefault();\r\n\r\n return nodeParticleSet;\r\n }\r\n\r\n /**\r\n * Creates a node particle set from parsed data\r\n * @param source defines the JSON representation of the particle set\r\n * @returns a new node particle set\r\n */\r\n public static Parse(source: any): NodeParticleSystemSet {\r\n const nodeParticleSet = SerializationHelper.Parse(() => new NodeParticleSystemSet(source.name), source, null);\r\n\r\n nodeParticleSet.parseSerializedObject(source);\r\n\r\n return nodeParticleSet;\r\n }\r\n\r\n /**\r\n * Creates a node particle set from a snippet saved in a remote file\r\n * @param name defines the name of the node particle set to create\r\n * @param url defines the url to load from\r\n * @param nodeParticleSet defines a node particle set to update (instead of creating a new one)\r\n * @returns a promise that will resolve to the new node particle set\r\n */\r\n // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax\r\n public static ParseFromFileAsync(name: string, url: string, nodeParticleSet?: NodeParticleSystemSet): Promise<NodeParticleSystemSet> {\r\n return new Promise((resolve, reject) => {\r\n const request = new WebRequest();\r\n request.addEventListener(\"readystatechange\", () => {\r\n if (request.readyState == 4) {\r\n if (request.status == 200) {\r\n const serializationObject = JSON.parse(request.responseText);\r\n if (!nodeParticleSet) {\r\n nodeParticleSet = SerializationHelper.Parse(() => new NodeParticleSystemSet(name), serializationObject, null);\r\n }\r\n\r\n nodeParticleSet.parseSerializedObject(serializationObject);\r\n\r\n resolve(nodeParticleSet);\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\r\n reject(\"Unable to load the node particle system set\");\r\n }\r\n }\r\n });\r\n\r\n request.open(\"GET\", url);\r\n request.send();\r\n });\r\n }\r\n\r\n /**\r\n * Creates a node particle set from a snippet saved by the node particle editor\r\n * @param snippetId defines the snippet to load\r\n * @param nodeParticleSet defines a node particle set to update (instead of creating a new one)\r\n * @returns a promise that will resolve to the new node particle set\r\n */\r\n // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax\r\n public static ParseFromSnippetAsync(snippetId: string, nodeParticleSet?: NodeParticleSystemSet): Promise<NodeParticleSystemSet> {\r\n if (snippetId === \"_BLANK\") {\r\n return Promise.resolve(NodeParticleSystemSet.CreateDefault(\"blank\"));\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n const request = new WebRequest();\r\n request.addEventListener(\"readystatechange\", () => {\r\n if (request.readyState == 4) {\r\n if (request.status == 200) {\r\n const snippet = JSON.parse(JSON.parse(request.responseText).jsonPayload);\r\n const serializationObject = JSON.parse(snippet.nodeParticle);\r\n\r\n if (!nodeParticleSet) {\r\n nodeParticleSet = SerializationHelper.Parse(() => new NodeParticleSystemSet(snippetId), serializationObject, null);\r\n }\r\n\r\n nodeParticleSet.parseSerializedObject(serializationObject);\r\n nodeParticleSet.snippetId = snippetId;\r\n\r\n try {\r\n resolve(nodeParticleSet);\r\n } catch (err) {\r\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\r\n reject(err);\r\n }\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\r\n reject(\"Unable to load the snippet \" + snippetId);\r\n }\r\n }\r\n });\r\n\r\n request.open(\"GET\", this.SnippetUrl + \"/\" + snippetId.replace(/#/g, \"/\"));\r\n request.send();\r\n });\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gpuParticleSystem.js","sourceRoot":"","sources":["../../../../dev/core/src/Particles/gpuParticleSystem.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AAEzC,OAAO,
|
|
1
|
+
{"version":3,"file":"gpuParticleSystem.js","sourceRoot":"","sources":["../../../../dev/core/src/Particles/gpuParticleSystem.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AAEzC,OAAO,wCAAwC,CAAC;AAChD,OAAO,sCAAsC,CAAC","sourcesContent":["export * from \"./gpuParticleSystem.pure\";\n\nimport \"../Shaders/gpuRenderParticles.fragment\";\nimport \"../Shaders/gpuRenderParticles.vertex\";\n"]}
|
|
@@ -34,7 +34,6 @@ export declare class GPUParticleSystem extends BaseParticleSystem implements IDi
|
|
|
34
34
|
private _writePointer;
|
|
35
35
|
private _emitIndex;
|
|
36
36
|
private _emitCount;
|
|
37
|
-
private _emitRateControl;
|
|
38
37
|
private _updateBuffer;
|
|
39
38
|
private _buffer0;
|
|
40
39
|
private _buffer1;
|
|
@@ -110,14 +109,16 @@ export declare class GPUParticleSystem extends BaseParticleSystem implements IDi
|
|
|
110
109
|
*/
|
|
111
110
|
getCapacity(): number;
|
|
112
111
|
/**
|
|
113
|
-
* Gets whether emit rate control is enabled.
|
|
112
|
+
* Gets or sets whether emit rate control is enabled.
|
|
114
113
|
* When true, the GPU particle system limits the number of active particles
|
|
115
114
|
* to approximately emitRate * maxLifeTime (matching CPU particle behavior)
|
|
116
115
|
* and uses a circular buffer to recycle particle slots.
|
|
117
116
|
* When false (default), all dead particles are recycled immediately,
|
|
118
117
|
* which is the legacy GPU particle behavior.
|
|
118
|
+
* Changing the value takes effect on the next frame (the update and render effects are rebuilt
|
|
119
|
+
* automatically when their shader defines change; buffer allocation does not depend on it).
|
|
119
120
|
*/
|
|
120
|
-
|
|
121
|
+
emitRateControl: boolean;
|
|
121
122
|
/**
|
|
122
123
|
* Forces the particle to write their depth information to the depth buffer. This can help preventing other draw calls
|
|
123
124
|
* to override the particles.
|
|
@@ -59,17 +59,6 @@ export class GPUParticleSystem extends BaseParticleSystem {
|
|
|
59
59
|
getCapacity() {
|
|
60
60
|
return this._capacity;
|
|
61
61
|
}
|
|
62
|
-
/**
|
|
63
|
-
* Gets whether emit rate control is enabled.
|
|
64
|
-
* When true, the GPU particle system limits the number of active particles
|
|
65
|
-
* to approximately emitRate * maxLifeTime (matching CPU particle behavior)
|
|
66
|
-
* and uses a circular buffer to recycle particle slots.
|
|
67
|
-
* When false (default), all dead particles are recycled immediately,
|
|
68
|
-
* which is the legacy GPU particle behavior.
|
|
69
|
-
*/
|
|
70
|
-
get emitRateControl() {
|
|
71
|
-
return this._emitRateControl;
|
|
72
|
-
}
|
|
73
62
|
/**
|
|
74
63
|
* Gets or set the number of active particles
|
|
75
64
|
* The value cannot be greater than "capacity" (if it is, it will be limited to "capacity").
|
|
@@ -717,6 +706,17 @@ export class GPUParticleSystem extends BaseParticleSystem {
|
|
|
717
706
|
* An event triggered when the system is started
|
|
718
707
|
*/
|
|
719
708
|
this.onStartedObservable = new Observable();
|
|
709
|
+
/**
|
|
710
|
+
* Gets or sets whether emit rate control is enabled.
|
|
711
|
+
* When true, the GPU particle system limits the number of active particles
|
|
712
|
+
* to approximately emitRate * maxLifeTime (matching CPU particle behavior)
|
|
713
|
+
* and uses a circular buffer to recycle particle slots.
|
|
714
|
+
* When false (default), all dead particles are recycled immediately,
|
|
715
|
+
* which is the legacy GPU particle behavior.
|
|
716
|
+
* Changing the value takes effect on the next frame (the update and render effects are rebuilt
|
|
717
|
+
* automatically when their shader defines change; buffer allocation does not depend on it).
|
|
718
|
+
*/
|
|
719
|
+
this.emitRateControl = false;
|
|
720
720
|
/**
|
|
721
721
|
* Forces the particle to write their depth information to the depth buffer. This can help preventing other draw calls
|
|
722
722
|
* to override the particles.
|
|
@@ -803,7 +803,7 @@ export class GPUParticleSystem extends BaseParticleSystem {
|
|
|
803
803
|
this._maxActiveParticleCount = fullOptions.capacity;
|
|
804
804
|
this._currentActiveCount = 0;
|
|
805
805
|
this._isAnimationSheetEnabled = isAnimationSheetEnabled;
|
|
806
|
-
this.
|
|
806
|
+
this.emitRateControl = !!options.emitRateControl;
|
|
807
807
|
this.maxAttractors = options.maxAttractors ?? 8;
|
|
808
808
|
this.particleEmitterType = new BoxParticleEmitter();
|
|
809
809
|
// Random data
|
|
@@ -1131,7 +1131,7 @@ export class GPUParticleSystem extends BaseParticleSystem {
|
|
|
1131
1131
|
defines += "\n#define ATTRACTORS";
|
|
1132
1132
|
defines += "\n#define MAX_ATTRACTORS " + this.maxAttractors;
|
|
1133
1133
|
}
|
|
1134
|
-
if (this.
|
|
1134
|
+
if (this.emitRateControl) {
|
|
1135
1135
|
defines += "\n#define EMITRATECTRL";
|
|
1136
1136
|
}
|
|
1137
1137
|
if (this._startSizeGradients && this._startSizeGradients.length > 0) {
|
|
@@ -1291,7 +1291,7 @@ export class GPUParticleSystem extends BaseParticleSystem {
|
|
|
1291
1291
|
if (this.isAnimationSheetEnabled) {
|
|
1292
1292
|
defines.push("#define ANIMATESHEET");
|
|
1293
1293
|
}
|
|
1294
|
-
if (this.
|
|
1294
|
+
if (this.emitRateControl) {
|
|
1295
1295
|
defines.push("#define EMITRATECTRL");
|
|
1296
1296
|
}
|
|
1297
1297
|
if (fillImageProcessing && this._imageProcessingConfiguration) {
|
|
@@ -1750,7 +1750,7 @@ export class GPUParticleSystem extends BaseParticleSystem {
|
|
|
1750
1750
|
this._lifeTimeGradientMax = 1.0;
|
|
1751
1751
|
}
|
|
1752
1752
|
}
|
|
1753
|
-
if (this.
|
|
1753
|
+
if (this.emitRateControl) {
|
|
1754
1754
|
// Emit-rate-controlled mode: limits active particles to ~emitRate * maxLifeTime,
|
|
1755
1755
|
// matching CPU particle behavior with circular buffer recycling.
|
|
1756
1756
|
// Accumulate fractional particles over time. Manual emit bypasses the rate.
|
|
@@ -1979,10 +1979,21 @@ export class GPUParticleSystem extends BaseParticleSystem {
|
|
|
1979
1979
|
}
|
|
1980
1980
|
}
|
|
1981
1981
|
const serialization = this.serialize(cloneTexture);
|
|
1982
|
+
// When the texture is not serialized it is stored by name only, and Parse would reload it from
|
|
1983
|
+
// that name (which can resolve to a different image and reset texture settings like level).
|
|
1984
|
+
// Prefer a faithful copy of the source texture, and only skip the name-based reload when that
|
|
1985
|
+
// copy is available (clone() can legally return null for textures that do not implement it).
|
|
1986
|
+
const clonedTexture = cloneTexture === false && this.particleTexture ? this.particleTexture.clone() : null;
|
|
1987
|
+
if (clonedTexture) {
|
|
1988
|
+
serialization.textureName = undefined;
|
|
1989
|
+
}
|
|
1982
1990
|
const result = GPUParticleSystem.Parse(serialization, this._scene || this._engine, this._rootUrl);
|
|
1983
1991
|
result.name = name;
|
|
1984
1992
|
result.customShader = program;
|
|
1985
1993
|
result._customWrappers = custom;
|
|
1994
|
+
if (clonedTexture) {
|
|
1995
|
+
result.particleTexture = clonedTexture;
|
|
1996
|
+
}
|
|
1986
1997
|
if (newEmitter === undefined) {
|
|
1987
1998
|
newEmitter = this.emitter;
|
|
1988
1999
|
}
|
|
@@ -2213,7 +2224,7 @@ export class GPUParticleSystem extends BaseParticleSystem {
|
|
|
2213
2224
|
ParticleSystem._Serialize(serializationObject, this, serializeTexture);
|
|
2214
2225
|
serializationObject.activeParticleCount = this.activeParticleCount;
|
|
2215
2226
|
serializationObject.randomTextureSize = this._randomTextureSize;
|
|
2216
|
-
serializationObject.emitRateControl = this.
|
|
2227
|
+
serializationObject.emitRateControl = this.emitRateControl;
|
|
2217
2228
|
serializationObject.maxAttractors = this.maxAttractors;
|
|
2218
2229
|
serializationObject.customShader = this.customShader;
|
|
2219
2230
|
serializationObject.preventAutoStart = this.preventAutoStart;
|