@babylonjs/core 8.11.0 → 8.12.1
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/Cameras/arcRotateCamera.js +8 -0
- package/Cameras/arcRotateCamera.js.map +1 -1
- package/Cameras/targetCamera.js +2 -0
- package/Cameras/targetCamera.js.map +1 -1
- package/Collisions/gpuPicker.d.ts +4 -0
- package/Collisions/gpuPicker.js +6 -0
- package/Collisions/gpuPicker.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/constants.d.ts +4 -0
- package/Engines/constants.js +4 -0
- package/Engines/constants.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.d.ts +1 -0
- package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js +2 -0
- package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.d.ts +6 -1
- package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.js +29 -0
- package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.d.ts +6 -0
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +36 -9
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/shadowGeneratorBlock.js +1 -0
- package/FrameGraph/Node/Blocks/Rendering/shadowGeneratorBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/inputBlock.js +1 -0
- package/FrameGraph/Node/Blocks/inputBlock.js.map +1 -1
- package/FrameGraph/Node/Types/nodeRenderGraphTypes.d.ts +2 -0
- package/FrameGraph/Node/Types/nodeRenderGraphTypes.js +2 -0
- package/FrameGraph/Node/Types/nodeRenderGraphTypes.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/csmShadowGeneratorTask.d.ts +23 -0
- package/FrameGraph/Tasks/Rendering/csmShadowGeneratorTask.js +126 -21
- package/FrameGraph/Tasks/Rendering/csmShadowGeneratorTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +5 -0
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +4 -0
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/shadowGeneratorTask.d.ts +2 -4
- package/FrameGraph/Tasks/Rendering/shadowGeneratorTask.js +4 -17
- package/FrameGraph/Tasks/Rendering/shadowGeneratorTask.js.map +1 -1
- package/FrameGraph/frameGraph.js +1 -1
- package/FrameGraph/frameGraph.js.map +1 -1
- package/FrameGraph/frameGraphContext.d.ts +30 -0
- package/FrameGraph/frameGraphContext.js +47 -0
- package/FrameGraph/frameGraphContext.js.map +1 -1
- package/FrameGraph/frameGraphRenderContext.d.ts +1 -4
- package/FrameGraph/frameGraphRenderContext.js +2 -5
- package/FrameGraph/frameGraphRenderContext.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.d.ts +0 -1
- package/Lights/Shadows/cascadedShadowGenerator.js +0 -12
- package/Lights/Shadows/cascadedShadowGenerator.js.map +1 -1
- package/Materials/Node/Blocks/Dual/clipPlanesBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Dual/clipPlanesBlock.js +4 -1
- package/Materials/Node/Blocks/Dual/clipPlanesBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/currentScreenBlock.d.ts +2 -3
- package/Materials/Node/Blocks/Dual/currentScreenBlock.js +1 -1
- package/Materials/Node/Blocks/Dual/currentScreenBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/fogBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Dual/fogBlock.js +4 -1
- package/Materials/Node/Blocks/Dual/fogBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.js +2 -2
- package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.d.ts +1 -2
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js +1 -1
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.js +3 -4
- package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/textureBlock.d.ts +2 -3
- package/Materials/Node/Blocks/Dual/textureBlock.js +2 -2
- package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/TBNBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Fragment/TBNBlock.js +4 -1
- package/Materials/Node/Blocks/Fragment/TBNBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragCoordBlock.js +2 -2
- package/Materials/Node/Blocks/Fragment/fragCoordBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.d.ts +1 -2
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/frontFacingBlock.js +2 -2
- package/Materials/Node/Blocks/Fragment/frontFacingBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js +1 -2
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js +1 -1
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.d.ts +1 -2
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js +1 -1
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/screenSizeBlock.js +2 -2
- package/Materials/Node/Blocks/Fragment/screenSizeBlock.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.d.ts +3 -3
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js +6 -3
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/anisotropyBlock.d.ts +1 -2
- package/Materials/Node/Blocks/PBR/anisotropyBlock.js +2 -4
- package/Materials/Node/Blocks/PBR/anisotropyBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/clearCoatBlock.d.ts +1 -2
- package/Materials/Node/Blocks/PBR/clearCoatBlock.js +1 -2
- package/Materials/Node/Blocks/PBR/clearCoatBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/iridescenceBlock.d.ts +2 -3
- package/Materials/Node/Blocks/PBR/iridescenceBlock.js +1 -2
- package/Materials/Node/Blocks/PBR/iridescenceBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.d.ts +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +5 -2
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/reflectionBlock.d.ts +1 -2
- package/Materials/Node/Blocks/PBR/reflectionBlock.js +2 -2
- package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/refractionBlock.d.ts +1 -2
- package/Materials/Node/Blocks/PBR/refractionBlock.js +1 -2
- package/Materials/Node/Blocks/PBR/refractionBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/sheenBlock.d.ts +2 -3
- package/Materials/Node/Blocks/PBR/sheenBlock.js +1 -2
- package/Materials/Node/Blocks/PBR/sheenBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.d.ts +2 -3
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.js +1 -2
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.js.map +1 -1
- package/Materials/Node/Blocks/Particle/particleTextureBlock.d.ts +1 -2
- package/Materials/Node/Blocks/Particle/particleTextureBlock.js +1 -1
- package/Materials/Node/Blocks/Particle/particleTextureBlock.js.map +1 -1
- package/Materials/Node/Blocks/Vertex/bonesBlock.d.ts +2 -2
- package/Materials/Node/Blocks/Vertex/bonesBlock.js +3 -3
- package/Materials/Node/Blocks/Vertex/bonesBlock.js.map +1 -1
- package/Materials/Node/Blocks/Vertex/instancesBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Vertex/instancesBlock.js +1 -1
- package/Materials/Node/Blocks/Vertex/instancesBlock.js.map +1 -1
- package/Materials/Node/Blocks/Vertex/lightInformationBlock.d.ts +1 -2
- package/Materials/Node/Blocks/Vertex/lightInformationBlock.js +1 -1
- package/Materials/Node/Blocks/Vertex/lightInformationBlock.js.map +1 -1
- package/Materials/Node/Blocks/Vertex/morphTargetsBlock.d.ts +2 -2
- package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js +8 -2
- package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js.map +1 -1
- package/Materials/Node/Blocks/transformBlock.d.ts +3 -3
- package/Materials/Node/Blocks/transformBlock.js +4 -5
- package/Materials/Node/Blocks/transformBlock.js.map +1 -1
- package/Materials/Node/Blocks/triPlanarBlock.d.ts +1 -3
- package/Materials/Node/Blocks/triPlanarBlock.js +1 -1
- package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +1 -1
- package/Materials/Node/nodeMaterial.js +28 -42
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterialBlock.d.ts +8 -12
- package/Materials/Node/nodeMaterialBlock.js +10 -12
- package/Materials/Node/nodeMaterialBlock.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.js +3 -1
- package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildStateSharedData.d.ts +7 -3
- package/Materials/Node/nodeMaterialBuildStateSharedData.js +17 -6
- package/Materials/Node/nodeMaterialBuildStateSharedData.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.d.ts +2 -0
- package/Materials/PBR/pbrBaseMaterial.js +11 -0
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/Textures/Loaders/exrTextureLoader.d.ts +10 -0
- package/Materials/Textures/Loaders/exrTextureLoader.js +28 -1
- package/Materials/Textures/Loaders/exrTextureLoader.js.map +1 -1
- package/Materials/materialHelper.functions.js +1 -1
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Materials/materialHelper.geometryrendering.js +7 -0
- package/Materials/materialHelper.geometryrendering.js.map +1 -1
- package/Materials/standardMaterial.d.ts +2 -0
- package/Materials/standardMaterial.js +11 -0
- package/Materials/standardMaterial.js.map +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureBlock.d.ts +7 -0
- package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js +11 -5
- package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.d.ts +6 -0
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js +42 -4
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryOptimizeBlock.js +8 -0
- package/Meshes/Node/Blocks/geometryOptimizeBlock.js.map +1 -1
- package/Misc/environmentTextureTools.js +1 -1
- package/Misc/environmentTextureTools.js.map +1 -1
- package/Misc/minMaxReducer.d.ts +8 -6
- package/Misc/minMaxReducer.js +57 -90
- package/Misc/minMaxReducer.js.map +1 -1
- package/Misc/observable.d.ts +1 -1
- package/Misc/observable.js.map +1 -1
- package/Misc/thinMinMaxReducer.d.ts +47 -0
- package/Misc/thinMinMaxReducer.js +148 -0
- package/Misc/thinMinMaxReducer.js.map +1 -0
- package/Particles/EmitterTypes/customParticleEmitter.d.ts +5 -0
- package/Particles/EmitterTypes/customParticleEmitter.js +9 -1
- package/Particles/EmitterTypes/customParticleEmitter.js.map +1 -1
- package/Particles/IParticleSystem.d.ts +8 -0
- package/Particles/IParticleSystem.js.map +1 -1
- package/Particles/Node/Blocks/Conditions/particleConditionBlock.d.ts +75 -0
- package/Particles/Node/Blocks/Conditions/particleConditionBlock.js +179 -0
- package/Particles/Node/Blocks/Conditions/particleConditionBlock.js.map +1 -0
- package/Particles/Node/Blocks/Emitters/boxShapeBlock.d.ts +47 -0
- package/Particles/Node/Blocks/Emitters/boxShapeBlock.js +107 -0
- package/Particles/Node/Blocks/Emitters/boxShapeBlock.js.map +1 -0
- package/Particles/Node/Blocks/Emitters/createParticleBlock.d.ts +46 -0
- package/Particles/Node/Blocks/Emitters/createParticleBlock.js +97 -0
- package/Particles/Node/Blocks/Emitters/createParticleBlock.js.map +1 -0
- package/Particles/Node/Blocks/Emitters/customShapeBlock.d.ts +39 -0
- package/Particles/Node/Blocks/Emitters/customShapeBlock.js +84 -0
- package/Particles/Node/Blocks/Emitters/customShapeBlock.js.map +1 -0
- package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.d.ts +48 -0
- package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js +120 -0
- package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js.map +1 -0
- package/Particles/Node/Blocks/Emitters/index.d.ts +7 -0
- package/Particles/Node/Blocks/Emitters/index.js +8 -0
- package/Particles/Node/Blocks/Emitters/index.js.map +1 -0
- package/Particles/Node/Blocks/Emitters/pointShapeBlock.d.ts +39 -0
- package/Particles/Node/Blocks/Emitters/pointShapeBlock.js +86 -0
- package/Particles/Node/Blocks/Emitters/pointShapeBlock.js.map +1 -0
- package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.d.ts +53 -0
- package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.js +111 -0
- package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.js.map +1 -0
- package/Particles/Node/Blocks/Emitters/sphereShapeBlock.d.ts +43 -0
- package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js +108 -0
- package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js.map +1 -0
- package/Particles/Node/Blocks/Teleport/particleTeleportInBlock.d.ts +48 -0
- package/Particles/Node/Blocks/Teleport/particleTeleportInBlock.js +100 -0
- package/Particles/Node/Blocks/Teleport/particleTeleportInBlock.js.map +1 -0
- package/Particles/Node/Blocks/Teleport/particleTeleportOutBlock.d.ts +47 -0
- package/Particles/Node/Blocks/Teleport/particleTeleportOutBlock.js +82 -0
- package/Particles/Node/Blocks/Teleport/particleTeleportOutBlock.js.map +1 -0
- package/Particles/Node/Blocks/Triggers/particleTriggerBlock.d.ts +48 -0
- package/Particles/Node/Blocks/Triggers/particleTriggerBlock.js +133 -0
- package/Particles/Node/Blocks/Triggers/particleTriggerBlock.js.map +1 -0
- package/Particles/Node/Blocks/Triggers/triggerTools.d.ts +9 -0
- package/Particles/Node/Blocks/Triggers/triggerTools.js +16 -0
- package/Particles/Node/Blocks/Triggers/triggerTools.js.map +1 -0
- package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.d.ts +31 -0
- package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.js +64 -0
- package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.js.map +1 -0
- package/Particles/Node/Blocks/Update/basicSpriteUpdateBlock.d.ts +31 -0
- package/Particles/Node/Blocks/Update/basicSpriteUpdateBlock.js +63 -0
- package/Particles/Node/Blocks/Update/basicSpriteUpdateBlock.js.map +1 -0
- package/Particles/Node/Blocks/Update/updateAngleBlock.d.ts +35 -0
- package/Particles/Node/Blocks/Update/updateAngleBlock.js +73 -0
- package/Particles/Node/Blocks/Update/updateAngleBlock.js.map +1 -0
- package/Particles/Node/Blocks/Update/updateColorBlock.d.ts +35 -0
- package/Particles/Node/Blocks/Update/updateColorBlock.js +73 -0
- package/Particles/Node/Blocks/Update/updateColorBlock.js.map +1 -0
- package/Particles/Node/Blocks/Update/updateDirectionBlock.d.ts +35 -0
- package/Particles/Node/Blocks/Update/updateDirectionBlock.js +73 -0
- package/Particles/Node/Blocks/Update/updateDirectionBlock.js.map +1 -0
- package/Particles/Node/Blocks/Update/updateFlowMapBlock.d.ts +41 -0
- package/Particles/Node/Blocks/Update/updateFlowMapBlock.js +102 -0
- package/Particles/Node/Blocks/Update/updateFlowMapBlock.js.map +1 -0
- package/Particles/Node/Blocks/Update/updatePositionBlock.d.ts +35 -0
- package/Particles/Node/Blocks/Update/updatePositionBlock.js +73 -0
- package/Particles/Node/Blocks/Update/updatePositionBlock.js.map +1 -0
- package/Particles/Node/Blocks/Update/updateScaleBlock.d.ts +35 -0
- package/Particles/Node/Blocks/Update/updateScaleBlock.js +73 -0
- package/Particles/Node/Blocks/Update/updateScaleBlock.js.map +1 -0
- package/Particles/Node/Blocks/Update/updateSpriteCellIndexBlock.d.ts +35 -0
- package/Particles/Node/Blocks/Update/updateSpriteCellIndexBlock.js +74 -0
- package/Particles/Node/Blocks/Update/updateSpriteCellIndexBlock.js.map +1 -0
- package/Particles/Node/Blocks/index.d.ts +27 -0
- package/Particles/Node/Blocks/index.js +29 -0
- package/Particles/Node/Blocks/index.js.map +1 -0
- package/Particles/Node/Blocks/particleConverterBlock.d.ts +85 -0
- package/Particles/Node/Blocks/particleConverterBlock.js +267 -0
- package/Particles/Node/Blocks/particleConverterBlock.js.map +1 -0
- package/Particles/Node/Blocks/particleDebugBlock.d.ts +37 -0
- package/Particles/Node/Blocks/particleDebugBlock.js +109 -0
- package/Particles/Node/Blocks/particleDebugBlock.js.map +1 -0
- package/Particles/Node/Blocks/particleElbowBlock.d.ts +27 -0
- package/Particles/Node/Blocks/particleElbowBlock.js +47 -0
- package/Particles/Node/Blocks/particleElbowBlock.js.map +1 -0
- package/Particles/Node/Blocks/particleGradientBlock.d.ts +28 -0
- package/Particles/Node/Blocks/particleGradientBlock.js +118 -0
- package/Particles/Node/Blocks/particleGradientBlock.js.map +1 -0
- package/Particles/Node/Blocks/particleGradientValueBlock.d.ts +32 -0
- package/Particles/Node/Blocks/particleGradientValueBlock.js +79 -0
- package/Particles/Node/Blocks/particleGradientValueBlock.js.map +1 -0
- package/Particles/Node/Blocks/particleInputBlock.d.ts +87 -0
- package/Particles/Node/Blocks/particleInputBlock.js +279 -0
- package/Particles/Node/Blocks/particleInputBlock.js.map +1 -0
- package/Particles/Node/Blocks/particleLerpBlock.d.ts +34 -0
- package/Particles/Node/Blocks/particleLerpBlock.js +92 -0
- package/Particles/Node/Blocks/particleLerpBlock.js.map +1 -0
- package/Particles/Node/Blocks/particleMathBlock.d.ts +64 -0
- package/Particles/Node/Blocks/particleMathBlock.js +321 -0
- package/Particles/Node/Blocks/particleMathBlock.js.map +1 -0
- package/Particles/Node/Blocks/particleRandomBlock.d.ts +52 -0
- package/Particles/Node/Blocks/particleRandomBlock.js +161 -0
- package/Particles/Node/Blocks/particleRandomBlock.js.map +1 -0
- package/Particles/Node/Blocks/particleSourceTextureBlock.d.ts +65 -0
- package/Particles/Node/Blocks/particleSourceTextureBlock.js +173 -0
- package/Particles/Node/Blocks/particleSourceTextureBlock.js.map +1 -0
- package/Particles/Node/Blocks/particleTrigonometryBlock.d.ts +80 -0
- package/Particles/Node/Blocks/particleTrigonometryBlock.js +272 -0
- package/Particles/Node/Blocks/particleTrigonometryBlock.js.map +1 -0
- package/Particles/Node/Blocks/randomRangeBlock.d.ts +45 -0
- package/Particles/Node/Blocks/randomRangeBlock.js +151 -0
- package/Particles/Node/Blocks/randomRangeBlock.js.map +1 -0
- package/Particles/Node/Blocks/systemBlock.d.ts +71 -0
- package/Particles/Node/Blocks/systemBlock.js +193 -0
- package/Particles/Node/Blocks/systemBlock.js.map +1 -0
- package/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes.d.ts +39 -0
- package/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes.js +41 -0
- package/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes.js.map +1 -0
- package/Particles/Node/Enums/nodeParticleContextualSources.d.ts +31 -0
- package/Particles/Node/Enums/nodeParticleContextualSources.js +34 -0
- package/Particles/Node/Enums/nodeParticleContextualSources.js.map +1 -0
- package/Particles/Node/Enums/nodeParticleSystemSources.d.ts +13 -0
- package/Particles/Node/Enums/nodeParticleSystemSources.js +15 -0
- package/Particles/Node/Enums/nodeParticleSystemSources.js.map +1 -0
- package/Particles/Node/index.d.ts +8 -0
- package/Particles/Node/index.js +10 -0
- package/Particles/Node/index.js.map +1 -0
- package/Particles/Node/nodeParticleBlock.d.ts +154 -0
- package/Particles/Node/nodeParticleBlock.js +355 -0
- package/Particles/Node/nodeParticleBlock.js.map +1 -0
- package/Particles/Node/nodeParticleBlockConnectionPoint.d.ts +188 -0
- package/Particles/Node/nodeParticleBlockConnectionPoint.js +337 -0
- package/Particles/Node/nodeParticleBlockConnectionPoint.js.map +1 -0
- package/Particles/Node/nodeParticleBuildState.d.ts +89 -0
- package/Particles/Node/nodeParticleBuildState.js +170 -0
- package/Particles/Node/nodeParticleBuildState.js.map +1 -0
- package/Particles/Node/nodeParticleSystemSet.d.ts +121 -0
- package/Particles/Node/nodeParticleSystemSet.js +383 -0
- package/Particles/Node/nodeParticleSystemSet.js.map +1 -0
- package/Particles/Queue/executionQueue.d.ts +2 -0
- package/Particles/Queue/executionQueue.js +10 -0
- package/Particles/Queue/executionQueue.js.map +1 -1
- package/Particles/baseParticleSystem.d.ts +6 -1
- package/Particles/baseParticleSystem.js +7 -0
- package/Particles/baseParticleSystem.js.map +1 -1
- package/Particles/flowMap.d.ts +7 -0
- package/Particles/flowMap.js +32 -0
- package/Particles/flowMap.js.map +1 -1
- package/Particles/gpuParticleSystem.d.ts +4 -0
- package/Particles/gpuParticleSystem.js +4 -0
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/index.d.ts +1 -0
- package/Particles/index.js +1 -0
- package/Particles/index.js.map +1 -1
- package/Particles/particleSystem.d.ts +12 -0
- package/Particles/particleSystem.js +22 -1
- package/Particles/particleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.d.ts +32 -11
- package/Particles/thinParticleSystem.js +62 -36
- package/Particles/thinParticleSystem.js.map +1 -1
- package/PostProcesses/postProcessManager.d.ts +2 -1
- package/PostProcesses/postProcessManager.js +3 -2
- package/PostProcesses/postProcessManager.js.map +1 -1
- package/Shaders/ShadersInclude/defaultUboDeclaration.js +1 -1
- package/Shaders/ShadersInclude/defaultUboDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/defaultVertexDeclaration.js +1 -0
- package/Shaders/ShadersInclude/defaultVertexDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/lightFragment.js +5 -2
- package/Shaders/ShadersInclude/lightFragment.js.map +1 -1
- package/Shaders/ShadersInclude/morphTargetsVertexDeclaration.js +3 -0
- package/Shaders/ShadersInclude/morphTargetsVertexDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockPrePass.js +3 -0
- package/Shaders/ShadersInclude/pbrBlockPrePass.js.map +1 -1
- package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js +1 -1
- package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrUboDeclaration.js +1 -1
- package/Shaders/ShadersInclude/pbrUboDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/pbrVertexDeclaration.js +1 -0
- package/Shaders/ShadersInclude/pbrVertexDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/prePassDeclaration.js +3 -0
- package/Shaders/ShadersInclude/prePassDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/prePassVertex.js +3 -0
- package/Shaders/ShadersInclude/prePassVertex.js.map +1 -1
- package/Shaders/ShadersInclude/prePassVertexDeclaration.js +3 -0
- package/Shaders/ShadersInclude/prePassVertexDeclaration.js.map +1 -1
- package/Shaders/default.fragment.js +3 -0
- package/Shaders/default.fragment.js.map +1 -1
- package/Shaders/minmaxRedux.fragment.js +13 -5
- package/Shaders/minmaxRedux.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/lightFragment.js +5 -2
- package/ShadersWGSL/ShadersInclude/lightFragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/morphTargetsVertexDeclaration.js +3 -0
- package/ShadersWGSL/ShadersInclude/morphTargetsVertexDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js +3 -0
- package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/prePassDeclaration.js +3 -0
- package/ShadersWGSL/ShadersInclude/prePassDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/prePassVertex.js +3 -0
- package/ShadersWGSL/ShadersInclude/prePassVertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js +3 -0
- package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js.map +1 -1
- package/ShadersWGSL/default.fragment.js +3 -0
- package/ShadersWGSL/default.fragment.js.map +1 -1
- package/ShadersWGSL/minmaxRedux.fragment.js +14 -6
- package/ShadersWGSL/minmaxRedux.fragment.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +5 -0
- package/scene.js +8 -0
- package/scene.js.map +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { NodeParticleBlock } from "../nodeParticleBlock.js";
|
|
2
|
+
import type { NodeParticleConnectionPoint } from "../nodeParticleBlockConnectionPoint.js";
|
|
3
|
+
import { ParticleRandomBlockLocks } from "./particleRandomBlock.js";
|
|
4
|
+
/**
|
|
5
|
+
* Block used to pick a value randomly from a range
|
|
6
|
+
*/
|
|
7
|
+
export declare class RandomRangeBlock extends NodeParticleBlock {
|
|
8
|
+
private _currentLockId;
|
|
9
|
+
/**
|
|
10
|
+
* Gets or sets a value indicating if that block will lock its value for a specific event
|
|
11
|
+
*/
|
|
12
|
+
lockMode: ParticleRandomBlockLocks;
|
|
13
|
+
/**
|
|
14
|
+
* Create a new RandomRangeBlock
|
|
15
|
+
* @param name defines the block name
|
|
16
|
+
*/
|
|
17
|
+
constructor(name: string);
|
|
18
|
+
/**
|
|
19
|
+
* Gets the min input component
|
|
20
|
+
*/
|
|
21
|
+
get min(): NodeParticleConnectionPoint;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the max input component
|
|
24
|
+
*/
|
|
25
|
+
get max(): NodeParticleConnectionPoint;
|
|
26
|
+
/**
|
|
27
|
+
* Gets the output component
|
|
28
|
+
*/
|
|
29
|
+
get output(): NodeParticleConnectionPoint;
|
|
30
|
+
/**
|
|
31
|
+
* Gets the current class name
|
|
32
|
+
* @returns the class name
|
|
33
|
+
*/
|
|
34
|
+
getClassName(): string;
|
|
35
|
+
/**
|
|
36
|
+
* Builds the block
|
|
37
|
+
*/
|
|
38
|
+
_build(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Serializes this block in a JSON representation
|
|
41
|
+
* @returns the serialized block object
|
|
42
|
+
*/
|
|
43
|
+
serialize(): any;
|
|
44
|
+
_deserialize(serializationObject: any): void;
|
|
45
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { __decorate } from "../../../tslib.es6.js";
|
|
2
|
+
import { Vector2, Vector3 } from "../../../Maths/math.vector.js";
|
|
3
|
+
import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
4
|
+
import { NodeParticleBlockConnectionPointTypes } from "../Enums/nodeParticleBlockConnectionPointTypes.js";
|
|
5
|
+
import { NodeParticleBlock } from "../nodeParticleBlock.js";
|
|
6
|
+
import { Color4 } from "../../../Maths/math.color.js";
|
|
7
|
+
import { ParticleRandomBlockLocks } from "./particleRandomBlock.js";
|
|
8
|
+
import { editableInPropertyPage } from "../../../Decorators/nodeDecorator.js";
|
|
9
|
+
/**
|
|
10
|
+
* Block used to pick a value randomly from a range
|
|
11
|
+
*/
|
|
12
|
+
export class RandomRangeBlock extends NodeParticleBlock {
|
|
13
|
+
/**
|
|
14
|
+
* Create a new RandomRangeBlock
|
|
15
|
+
* @param name defines the block name
|
|
16
|
+
*/
|
|
17
|
+
constructor(name) {
|
|
18
|
+
super(name);
|
|
19
|
+
this._currentLockId = -2;
|
|
20
|
+
/**
|
|
21
|
+
* Gets or sets a value indicating if that block will lock its value for a specific event
|
|
22
|
+
*/
|
|
23
|
+
this.lockMode = ParticleRandomBlockLocks.PerParticle;
|
|
24
|
+
this.registerInput("min", NodeParticleBlockConnectionPointTypes.AutoDetect);
|
|
25
|
+
this.registerInput("max", NodeParticleBlockConnectionPointTypes.AutoDetect);
|
|
26
|
+
this.registerOutput("output", NodeParticleBlockConnectionPointTypes.BasedOnInput);
|
|
27
|
+
this.output._typeConnectionSource = this.min;
|
|
28
|
+
this._linkConnectionTypes(0, 1);
|
|
29
|
+
const excludedConnectionPointTypes = [
|
|
30
|
+
NodeParticleBlockConnectionPointTypes.Matrix,
|
|
31
|
+
NodeParticleBlockConnectionPointTypes.Particle,
|
|
32
|
+
NodeParticleBlockConnectionPointTypes.Texture,
|
|
33
|
+
NodeParticleBlockConnectionPointTypes.System,
|
|
34
|
+
NodeParticleBlockConnectionPointTypes.FloatGradient,
|
|
35
|
+
NodeParticleBlockConnectionPointTypes.Color4Gradient,
|
|
36
|
+
NodeParticleBlockConnectionPointTypes.Vector2Gradient,
|
|
37
|
+
NodeParticleBlockConnectionPointTypes.Vector3Gradient,
|
|
38
|
+
];
|
|
39
|
+
this.min.excludedConnectionPointTypes.push(...excludedConnectionPointTypes);
|
|
40
|
+
this.max.excludedConnectionPointTypes.push(...excludedConnectionPointTypes);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Gets the min input component
|
|
44
|
+
*/
|
|
45
|
+
get min() {
|
|
46
|
+
return this._inputs[0];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Gets the max input component
|
|
50
|
+
*/
|
|
51
|
+
get max() {
|
|
52
|
+
return this._inputs[1];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Gets the output component
|
|
56
|
+
*/
|
|
57
|
+
get output() {
|
|
58
|
+
return this._outputs[0];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Gets the current class name
|
|
62
|
+
* @returns the class name
|
|
63
|
+
*/
|
|
64
|
+
getClassName() {
|
|
65
|
+
return "RandomRangeBlock";
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Builds the block
|
|
69
|
+
*/
|
|
70
|
+
_build() {
|
|
71
|
+
let func = null;
|
|
72
|
+
this._currentLockId = -2;
|
|
73
|
+
switch (this.min.type) {
|
|
74
|
+
case NodeParticleBlockConnectionPointTypes.Float:
|
|
75
|
+
case NodeParticleBlockConnectionPointTypes.Int:
|
|
76
|
+
func = (state) => {
|
|
77
|
+
const minValue = this.min.getConnectedValue(state);
|
|
78
|
+
const maxValue = this.max.getConnectedValue(state);
|
|
79
|
+
return Math.random() * (maxValue - minValue) + minValue;
|
|
80
|
+
};
|
|
81
|
+
break;
|
|
82
|
+
case NodeParticleBlockConnectionPointTypes.Vector2:
|
|
83
|
+
func = (state) => {
|
|
84
|
+
const minValue = this.min.getConnectedValue(state);
|
|
85
|
+
const maxValue = this.max.getConnectedValue(state);
|
|
86
|
+
return new Vector2(Math.random() * (maxValue.x - minValue.x) + minValue.x, Math.random() * (maxValue.y - minValue.y) + minValue.y);
|
|
87
|
+
};
|
|
88
|
+
break;
|
|
89
|
+
case NodeParticleBlockConnectionPointTypes.Vector3:
|
|
90
|
+
func = (state) => {
|
|
91
|
+
const minValue = this.min.getConnectedValue(state);
|
|
92
|
+
const maxValue = this.max.getConnectedValue(state);
|
|
93
|
+
return new Vector3(Math.random() * (maxValue.x - minValue.x) + minValue.x, Math.random() * (maxValue.y - minValue.y) + minValue.y, Math.random() * (maxValue.z - minValue.z) + minValue.z);
|
|
94
|
+
};
|
|
95
|
+
break;
|
|
96
|
+
case NodeParticleBlockConnectionPointTypes.Color4:
|
|
97
|
+
func = (state) => {
|
|
98
|
+
const minValue = this.min.getConnectedValue(state);
|
|
99
|
+
const maxValue = this.max.getConnectedValue(state);
|
|
100
|
+
return new Color4(Math.random() * (maxValue.r - minValue.r) + minValue.r, Math.random() * (maxValue.g - minValue.g) + minValue.g, Math.random() * (maxValue.b - minValue.b) + minValue.b, Math.random() * (maxValue.a - minValue.a) + minValue.a);
|
|
101
|
+
};
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
this.output._storedFunction = (state) => {
|
|
105
|
+
let lockId = 0;
|
|
106
|
+
switch (this.lockMode) {
|
|
107
|
+
case ParticleRandomBlockLocks.PerParticle:
|
|
108
|
+
lockId = state.particleContext?.id || -1;
|
|
109
|
+
break;
|
|
110
|
+
case ParticleRandomBlockLocks.PerSystem:
|
|
111
|
+
lockId = state.buildId || 0;
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
if (this._currentLockId !== lockId) {
|
|
115
|
+
if (this.lockMode !== ParticleRandomBlockLocks.None) {
|
|
116
|
+
this._currentLockId = lockId;
|
|
117
|
+
}
|
|
118
|
+
this.output._storedValue = func(state);
|
|
119
|
+
}
|
|
120
|
+
return this.output._storedValue;
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Serializes this block in a JSON representation
|
|
125
|
+
* @returns the serialized block object
|
|
126
|
+
*/
|
|
127
|
+
serialize() {
|
|
128
|
+
const serializationObject = super.serialize();
|
|
129
|
+
serializationObject.lockMode = this.lockMode;
|
|
130
|
+
return serializationObject;
|
|
131
|
+
}
|
|
132
|
+
_deserialize(serializationObject) {
|
|
133
|
+
super._deserialize(serializationObject);
|
|
134
|
+
if (serializationObject.lockMode !== undefined) {
|
|
135
|
+
this.lockMode = serializationObject.lockMode;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
__decorate([
|
|
140
|
+
editableInPropertyPage("LockMode", 4 /* PropertyTypeForEdition.List */, "ADVANCED", {
|
|
141
|
+
notifiers: { rebuild: true },
|
|
142
|
+
embedded: true,
|
|
143
|
+
options: [
|
|
144
|
+
{ label: "None", value: ParticleRandomBlockLocks.None },
|
|
145
|
+
{ label: "Per particle", value: ParticleRandomBlockLocks.PerParticle },
|
|
146
|
+
{ label: "Per system", value: ParticleRandomBlockLocks.PerSystem },
|
|
147
|
+
],
|
|
148
|
+
})
|
|
149
|
+
], RandomRangeBlock.prototype, "lockMode", void 0);
|
|
150
|
+
RegisterClass("BABYLON.RandomRangeBlock", RandomRangeBlock);
|
|
151
|
+
//# sourceMappingURL=randomRangeBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"randomRangeBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Particles/Node/Blocks/randomRangeBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,sCAA+B;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,gDAAgD,CAAC;AACvG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,EAAE,MAAM,EAAE,qCAA8B;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAA0B,6CAAsC;AAG/F;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAA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,CAAC;YAC7C,IAAI,CAAC,QAAQ,GAAG,mBAAmB,CAAC,QAAQ,CAAC;QACjD,CAAC;IACL,CAAC;CACJ;AApJU;IATN,sBAAsB,CAAC,UAAU,uCAA+B,UAAU,EAAE;QACzE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QAC5B,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE;YACL,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,wBAAwB,CAAC,IAAI,EAAE;YACvD,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,wBAAwB,CAAC,WAAW,EAAE;YACtE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,wBAAwB,CAAC,SAAS,EAAE;SACrE;KACJ,CAAC;kDACqD;AAsJ3D,aAAa,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,CAAC","sourcesContent":["import { Vector2, Vector3 } from \"core/Maths/math.vector\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeParticleBlockConnectionPointTypes } from \"../Enums/nodeParticleBlockConnectionPointTypes\";\r\nimport { NodeParticleBlock } from \"../nodeParticleBlock\";\r\nimport type { NodeParticleConnectionPoint } from \"../nodeParticleBlockConnectionPoint\";\r\nimport type { NodeParticleBuildState } from \"../nodeParticleBuildState\";\r\nimport { Color4 } from \"core/Maths/math.color\";\r\nimport { ParticleRandomBlockLocks } from \"./particleRandomBlock\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"core/Decorators/nodeDecorator\";\r\nimport type { Nullable } from \"core/types\";\r\n\r\n/**\r\n * Block used to pick a value randomly from a range\r\n */\r\nexport class RandomRangeBlock extends NodeParticleBlock {\r\n private _currentLockId = -2;\r\n /**\r\n * Gets or sets a value indicating if that block will lock its value for a specific event\r\n */\r\n @editableInPropertyPage(\"LockMode\", PropertyTypeForEdition.List, \"ADVANCED\", {\r\n notifiers: { rebuild: true },\r\n embedded: true,\r\n options: [\r\n { label: \"None\", value: ParticleRandomBlockLocks.None },\r\n { label: \"Per particle\", value: ParticleRandomBlockLocks.PerParticle },\r\n { label: \"Per system\", value: ParticleRandomBlockLocks.PerSystem },\r\n ],\r\n })\r\n public lockMode = ParticleRandomBlockLocks.PerParticle;\r\n /**\r\n * Create a new RandomRangeBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"min\", NodeParticleBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"max\", NodeParticleBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeParticleBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this.output._typeConnectionSource = this.min;\r\n\r\n this._linkConnectionTypes(0, 1);\r\n const excludedConnectionPointTypes = [\r\n NodeParticleBlockConnectionPointTypes.Matrix,\r\n NodeParticleBlockConnectionPointTypes.Particle,\r\n NodeParticleBlockConnectionPointTypes.Texture,\r\n NodeParticleBlockConnectionPointTypes.System,\r\n NodeParticleBlockConnectionPointTypes.FloatGradient,\r\n NodeParticleBlockConnectionPointTypes.Color4Gradient,\r\n NodeParticleBlockConnectionPointTypes.Vector2Gradient,\r\n NodeParticleBlockConnectionPointTypes.Vector3Gradient,\r\n ] as const;\r\n\r\n this.min.excludedConnectionPointTypes.push(...excludedConnectionPointTypes);\r\n this.max.excludedConnectionPointTypes.push(...excludedConnectionPointTypes);\r\n }\r\n\r\n /**\r\n * Gets the min input component\r\n */\r\n public get min(): NodeParticleConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the max input component\r\n */\r\n public get max(): NodeParticleConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeParticleConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"RandomRangeBlock\";\r\n }\r\n\r\n /**\r\n * Builds the block\r\n */\r\n public override _build() {\r\n let func: Nullable<(state: NodeParticleBuildState) => any> = null;\r\n this._currentLockId = -2;\r\n\r\n switch (this.min.type) {\r\n case NodeParticleBlockConnectionPointTypes.Float:\r\n case NodeParticleBlockConnectionPointTypes.Int:\r\n func = (state) => {\r\n const minValue = this.min.getConnectedValue(state);\r\n const maxValue = this.max.getConnectedValue(state);\r\n return Math.random() * (maxValue - minValue) + minValue;\r\n };\r\n break;\r\n case NodeParticleBlockConnectionPointTypes.Vector2:\r\n func = (state) => {\r\n const minValue = this.min.getConnectedValue(state);\r\n const maxValue = this.max.getConnectedValue(state);\r\n return new Vector2(Math.random() * (maxValue.x - minValue.x) + minValue.x, Math.random() * (maxValue.y - minValue.y) + minValue.y);\r\n };\r\n break;\r\n case NodeParticleBlockConnectionPointTypes.Vector3:\r\n func = (state) => {\r\n const minValue = this.min.getConnectedValue(state);\r\n const maxValue = this.max.getConnectedValue(state);\r\n return new Vector3(\r\n Math.random() * (maxValue.x - minValue.x) + minValue.x,\r\n Math.random() * (maxValue.y - minValue.y) + minValue.y,\r\n Math.random() * (maxValue.z - minValue.z) + minValue.z\r\n );\r\n };\r\n break;\r\n case NodeParticleBlockConnectionPointTypes.Color4:\r\n func = (state) => {\r\n const minValue = this.min.getConnectedValue(state);\r\n const maxValue = this.max.getConnectedValue(state);\r\n return new Color4(\r\n Math.random() * (maxValue.r - minValue.r) + minValue.r,\r\n Math.random() * (maxValue.g - minValue.g) + minValue.g,\r\n Math.random() * (maxValue.b - minValue.b) + minValue.b,\r\n Math.random() * (maxValue.a - minValue.a) + minValue.a\r\n );\r\n };\r\n break;\r\n }\r\n\r\n this.output._storedFunction = (state: NodeParticleBuildState) => {\r\n let lockId = 0;\r\n\r\n switch (this.lockMode) {\r\n case ParticleRandomBlockLocks.PerParticle:\r\n lockId = state.particleContext?.id || -1;\r\n break;\r\n case ParticleRandomBlockLocks.PerSystem:\r\n lockId = state.buildId || 0;\r\n break;\r\n }\r\n\r\n if (this._currentLockId !== lockId) {\r\n if (this.lockMode !== ParticleRandomBlockLocks.None) {\r\n this._currentLockId = lockId;\r\n }\r\n this.output._storedValue = func!(state);\r\n }\r\n return this.output._storedValue;\r\n };\r\n }\r\n\r\n /**\r\n * Serializes this block in a JSON representation\r\n * @returns the serialized block object\r\n */\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.lockMode = this.lockMode;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n if (serializationObject.lockMode !== undefined) {\r\n this.lockMode = serializationObject.lockMode;\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.RandomRangeBlock\", RandomRangeBlock);\r\n"]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { ParticleSystem } from "../../particleSystem.js";
|
|
2
|
+
import { NodeParticleBlock } from "../nodeParticleBlock.js";
|
|
3
|
+
import type { NodeParticleConnectionPoint } from "../nodeParticleBlockConnectionPoint.js";
|
|
4
|
+
import type { NodeParticleBuildState } from "../nodeParticleBuildState.js";
|
|
5
|
+
/**
|
|
6
|
+
* Block used to get a system of particles
|
|
7
|
+
*/
|
|
8
|
+
export declare class SystemBlock extends NodeParticleBlock {
|
|
9
|
+
/**
|
|
10
|
+
* Gets or sets the blend mode for the particle system
|
|
11
|
+
*/
|
|
12
|
+
blendMode: number;
|
|
13
|
+
/**
|
|
14
|
+
* Gets or sets the epsilon value used for comparison
|
|
15
|
+
*/
|
|
16
|
+
capacity: number;
|
|
17
|
+
/**
|
|
18
|
+
* Gets or sets the emit rate
|
|
19
|
+
*/
|
|
20
|
+
emitRate: number;
|
|
21
|
+
/**
|
|
22
|
+
* Gets or sets the target stop duration for the particle system
|
|
23
|
+
*/
|
|
24
|
+
targetStopDuration: number;
|
|
25
|
+
/**
|
|
26
|
+
* Gets or sets the target stop duration for the particle system
|
|
27
|
+
*/
|
|
28
|
+
startDelay: number;
|
|
29
|
+
/**
|
|
30
|
+
* Gets or sets a boolean indicating if the system should not start automatically
|
|
31
|
+
*/
|
|
32
|
+
doNoStart: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Create a new SystemBlock
|
|
35
|
+
* @param name defines the block name
|
|
36
|
+
*/
|
|
37
|
+
constructor(name: string);
|
|
38
|
+
/**
|
|
39
|
+
* Gets the current class name
|
|
40
|
+
* @returns the class name
|
|
41
|
+
*/
|
|
42
|
+
getClassName(): string;
|
|
43
|
+
/**
|
|
44
|
+
* Gets the particle input component
|
|
45
|
+
*/
|
|
46
|
+
get particle(): NodeParticleConnectionPoint;
|
|
47
|
+
/**
|
|
48
|
+
* Gets the texture input component
|
|
49
|
+
*/
|
|
50
|
+
get texture(): NodeParticleConnectionPoint;
|
|
51
|
+
/**
|
|
52
|
+
* Gets the onStart input component
|
|
53
|
+
*/
|
|
54
|
+
get onStart(): NodeParticleConnectionPoint;
|
|
55
|
+
/**
|
|
56
|
+
* Gets the onEnd input component
|
|
57
|
+
*/
|
|
58
|
+
get onEnd(): NodeParticleConnectionPoint;
|
|
59
|
+
/**
|
|
60
|
+
* Gets the system output component
|
|
61
|
+
*/
|
|
62
|
+
get system(): NodeParticleConnectionPoint;
|
|
63
|
+
/**
|
|
64
|
+
* Builds the block and return a functional particle system
|
|
65
|
+
* @param state defines the building state
|
|
66
|
+
* @returns the built particle system
|
|
67
|
+
*/
|
|
68
|
+
createSystem(state: NodeParticleBuildState): ParticleSystem;
|
|
69
|
+
serialize(): any;
|
|
70
|
+
_deserialize(serializationObject: any): void;
|
|
71
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { __decorate } from "../../../tslib.es6.js";
|
|
2
|
+
import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
3
|
+
import { NodeParticleBlockConnectionPointTypes } from "../Enums/nodeParticleBlockConnectionPointTypes.js";
|
|
4
|
+
import { NodeParticleBlock } from "../nodeParticleBlock.js";
|
|
5
|
+
import { editableInPropertyPage } from "../../../Decorators/nodeDecorator.js";
|
|
6
|
+
import { BaseParticleSystem } from "../../baseParticleSystem.js";
|
|
7
|
+
import { _TriggerSubEmitter } from "./Triggers/triggerTools.js";
|
|
8
|
+
/**
|
|
9
|
+
* Block used to get a system of particles
|
|
10
|
+
*/
|
|
11
|
+
export class SystemBlock extends NodeParticleBlock {
|
|
12
|
+
/**
|
|
13
|
+
* Create a new SystemBlock
|
|
14
|
+
* @param name defines the block name
|
|
15
|
+
*/
|
|
16
|
+
constructor(name) {
|
|
17
|
+
super(name);
|
|
18
|
+
/**
|
|
19
|
+
* Gets or sets the blend mode for the particle system
|
|
20
|
+
*/
|
|
21
|
+
this.blendMode = BaseParticleSystem.BLENDMODE_ONEONE;
|
|
22
|
+
/**
|
|
23
|
+
* Gets or sets the epsilon value used for comparison
|
|
24
|
+
*/
|
|
25
|
+
this.capacity = 1000;
|
|
26
|
+
/**
|
|
27
|
+
* Gets or sets the emit rate
|
|
28
|
+
*/
|
|
29
|
+
this.emitRate = 10;
|
|
30
|
+
/**
|
|
31
|
+
* Gets or sets the target stop duration for the particle system
|
|
32
|
+
*/
|
|
33
|
+
this.targetStopDuration = 0;
|
|
34
|
+
/**
|
|
35
|
+
* Gets or sets the target stop duration for the particle system
|
|
36
|
+
*/
|
|
37
|
+
this.startDelay = 0;
|
|
38
|
+
/**
|
|
39
|
+
* Gets or sets a boolean indicating if the system should not start automatically
|
|
40
|
+
*/
|
|
41
|
+
this.doNoStart = false;
|
|
42
|
+
this._isSystem = true;
|
|
43
|
+
this.registerInput("particle", NodeParticleBlockConnectionPointTypes.Particle);
|
|
44
|
+
this.registerInput("texture", NodeParticleBlockConnectionPointTypes.Texture);
|
|
45
|
+
this.registerInput("onStart", NodeParticleBlockConnectionPointTypes.System, true);
|
|
46
|
+
this.registerInput("onEnd", NodeParticleBlockConnectionPointTypes.System, true);
|
|
47
|
+
this.registerOutput("system", NodeParticleBlockConnectionPointTypes.System);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Gets the current class name
|
|
51
|
+
* @returns the class name
|
|
52
|
+
*/
|
|
53
|
+
getClassName() {
|
|
54
|
+
return "SystemBlock";
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Gets the particle input component
|
|
58
|
+
*/
|
|
59
|
+
get particle() {
|
|
60
|
+
return this._inputs[0];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Gets the texture input component
|
|
64
|
+
*/
|
|
65
|
+
get texture() {
|
|
66
|
+
return this._inputs[1];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Gets the onStart input component
|
|
70
|
+
*/
|
|
71
|
+
get onStart() {
|
|
72
|
+
return this._inputs[2];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Gets the onEnd input component
|
|
76
|
+
*/
|
|
77
|
+
get onEnd() {
|
|
78
|
+
return this._inputs[3];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Gets the system output component
|
|
82
|
+
*/
|
|
83
|
+
get system() {
|
|
84
|
+
return this._outputs[0];
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Builds the block and return a functional particle system
|
|
88
|
+
* @param state defines the building state
|
|
89
|
+
* @returns the built particle system
|
|
90
|
+
*/
|
|
91
|
+
createSystem(state) {
|
|
92
|
+
state.capacity = this.capacity;
|
|
93
|
+
state.buildId = this._buildId++;
|
|
94
|
+
this.build(state);
|
|
95
|
+
const particleSystem = this.particle.getConnectedValue(state);
|
|
96
|
+
particleSystem.particleTexture = this.texture.getConnectedValue(state);
|
|
97
|
+
particleSystem.emitRate = this.emitRate;
|
|
98
|
+
particleSystem.blendMode = this.blendMode;
|
|
99
|
+
particleSystem.name = this.name;
|
|
100
|
+
particleSystem._nodeGenerated = true;
|
|
101
|
+
particleSystem._targetStopDuration = this.targetStopDuration;
|
|
102
|
+
particleSystem.startDelay = this.startDelay;
|
|
103
|
+
this.system._storedValue = this;
|
|
104
|
+
particleSystem.canStart = () => {
|
|
105
|
+
return !this.doNoStart;
|
|
106
|
+
};
|
|
107
|
+
particleSystem.onStartedObservable.add((system) => {
|
|
108
|
+
// Triggers
|
|
109
|
+
const onStartSystem = this.onStart.getConnectedValue(state);
|
|
110
|
+
if (onStartSystem) {
|
|
111
|
+
system.onStartedObservable.addOnce(() => {
|
|
112
|
+
state.systemContext = particleSystem;
|
|
113
|
+
const clone = _TriggerSubEmitter(onStartSystem, state.scene, state.emitterPosition);
|
|
114
|
+
this.onDisposeObservable.addOnce(() => {
|
|
115
|
+
// Clean up the cloned system when the original system is disposed
|
|
116
|
+
clone.dispose();
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
const onEndSystem = this.onEnd.getConnectedValue(state);
|
|
121
|
+
if (onEndSystem) {
|
|
122
|
+
system.onStoppedObservable.addOnce(() => {
|
|
123
|
+
state.systemContext = particleSystem;
|
|
124
|
+
const clone = _TriggerSubEmitter(onEndSystem, state.scene, state.emitterPosition);
|
|
125
|
+
this.onDisposeObservable.addOnce(() => {
|
|
126
|
+
// Clean up the cloned system when the original system is disposed
|
|
127
|
+
clone.dispose();
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
this.onDisposeObservable.addOnce(() => {
|
|
133
|
+
particleSystem.dispose();
|
|
134
|
+
});
|
|
135
|
+
// Return
|
|
136
|
+
return particleSystem;
|
|
137
|
+
}
|
|
138
|
+
serialize() {
|
|
139
|
+
const serializationObject = super.serialize();
|
|
140
|
+
serializationObject.capacity = this.capacity;
|
|
141
|
+
serializationObject.emitRate = this.emitRate;
|
|
142
|
+
serializationObject.blendMode = this.blendMode;
|
|
143
|
+
serializationObject.doNoStart = this.doNoStart;
|
|
144
|
+
serializationObject.targetStopDuration = this.targetStopDuration;
|
|
145
|
+
serializationObject.startDelay = this.startDelay;
|
|
146
|
+
return serializationObject;
|
|
147
|
+
}
|
|
148
|
+
_deserialize(serializationObject) {
|
|
149
|
+
super._deserialize(serializationObject);
|
|
150
|
+
this.capacity = serializationObject.capacity;
|
|
151
|
+
this.emitRate = serializationObject.emitRate;
|
|
152
|
+
this.doNoStart = !!serializationObject.doNoStart;
|
|
153
|
+
if (serializationObject.blendMode !== undefined) {
|
|
154
|
+
this.blendMode = serializationObject.blendMode;
|
|
155
|
+
}
|
|
156
|
+
if (serializationObject.targetStopDuration !== undefined) {
|
|
157
|
+
this.targetStopDuration = serializationObject.targetStopDuration;
|
|
158
|
+
}
|
|
159
|
+
if (serializationObject.startDelay !== undefined) {
|
|
160
|
+
this.startDelay = serializationObject.startDelay;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
__decorate([
|
|
165
|
+
editableInPropertyPage("Blend mode", 4 /* PropertyTypeForEdition.List */, "ADVANCED", {
|
|
166
|
+
notifiers: { rebuild: true },
|
|
167
|
+
embedded: true,
|
|
168
|
+
options: [
|
|
169
|
+
{ label: "OneOne", value: BaseParticleSystem.BLENDMODE_ONEONE },
|
|
170
|
+
{ label: "Standard", value: BaseParticleSystem.BLENDMODE_STANDARD },
|
|
171
|
+
{ label: "Add", value: BaseParticleSystem.BLENDMODE_ADD },
|
|
172
|
+
{ label: "Multiply", value: BaseParticleSystem.BLENDMODE_MULTIPLY },
|
|
173
|
+
{ label: "MultiplyAdd", value: BaseParticleSystem.BLENDMODE_MULTIPLYADD },
|
|
174
|
+
],
|
|
175
|
+
})
|
|
176
|
+
], SystemBlock.prototype, "blendMode", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
editableInPropertyPage("Capacity", 2 /* PropertyTypeForEdition.Int */, "ADVANCED", { embedded: true, notifiers: { rebuild: true }, min: 0, max: 10000 })
|
|
179
|
+
], SystemBlock.prototype, "capacity", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
editableInPropertyPage("Emit rate", 2 /* PropertyTypeForEdition.Int */, "ADVANCED", { embedded: true, notifiers: { rebuild: true }, min: 0 })
|
|
182
|
+
], SystemBlock.prototype, "emitRate", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
editableInPropertyPage("Target duration", 1 /* PropertyTypeForEdition.Float */, "ADVANCED", { embedded: true, notifiers: { rebuild: true }, min: 0 })
|
|
185
|
+
], SystemBlock.prototype, "targetStopDuration", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
editableInPropertyPage("Delay start(ms)", 1 /* PropertyTypeForEdition.Float */, "ADVANCED", { embedded: true, notifiers: { rebuild: true }, min: 0 })
|
|
188
|
+
], SystemBlock.prototype, "startDelay", void 0);
|
|
189
|
+
__decorate([
|
|
190
|
+
editableInPropertyPage("Do no start", 0 /* PropertyTypeForEdition.Boolean */, "ADVANCED", { embedded: true, notifiers: { rebuild: true } })
|
|
191
|
+
], SystemBlock.prototype, "doNoStart", void 0);
|
|
192
|
+
RegisterClass("BABYLON.SystemBlock", SystemBlock);
|
|
193
|
+
//# sourceMappingURL=systemBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"systemBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Particles/Node/Blocks/systemBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,gDAAgD,CAAC;AACvG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,EAAE,sBAAsB,EAA0B,6CAAsC;AAC/F,OAAO,EAAE,kBAAkB,EAAE,oCAA0C;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,iBAAiB;IA+C9C;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAnDhB;;WAEG;QAYI,cAAS,GAAG,kBAAkB,CAAC,gBAAgB,CAAC;QAEvD;;WAEG;QAEI,aAAQ,GAAG,IAAI,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BAAkB,CAAC,qBAAqB,EAAE;SAC5E;KACJ,CAAC;8CACqD;AAMhD;IADN,sBAAsB,CAAC,UAAU,sCAA8B,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;6CAC1H;AAMhB;IADN,sBAAsB,CAAC,WAAW,sCAA8B,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;6CACjH;AAMd;IADN,sBAAsB,CAAC,iBAAiB,wCAAgC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;uDAChH;AAMvB;IADN,sBAAsB,CAAC,iBAAiB,wCAAgC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;+CACxH;AAMf;IADN,sBAAsB,CAAC,aAAa,0CAAkC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;8CAC3G;AA8J7B,aAAa,CAAC,qBAAqB,EAAE,WAAW,CAAC,CAAC","sourcesContent":["import type { ParticleSystem } from \"core/Particles/particleSystem\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeParticleBlockConnectionPointTypes } from \"../Enums/nodeParticleBlockConnectionPointTypes\";\r\nimport { NodeParticleBlock } from \"../nodeParticleBlock\";\r\nimport type { NodeParticleConnectionPoint } from \"../nodeParticleBlockConnectionPoint\";\r\nimport type { NodeParticleBuildState } from \"../nodeParticleBuildState\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"core/Decorators/nodeDecorator\";\r\nimport { BaseParticleSystem } from \"core/Particles/baseParticleSystem\";\r\nimport { _TriggerSubEmitter } from \"./Triggers/triggerTools\";\r\n\r\n/**\r\n * Block used to get a system of particles\r\n */\r\nexport class SystemBlock extends NodeParticleBlock {\r\n /**\r\n * Gets or sets the blend mode for the particle system\r\n */\r\n @editableInPropertyPage(\"Blend mode\", PropertyTypeForEdition.List, \"ADVANCED\", {\r\n notifiers: { rebuild: true },\r\n embedded: true,\r\n options: [\r\n { label: \"OneOne\", value: BaseParticleSystem.BLENDMODE_ONEONE },\r\n { label: \"Standard\", value: BaseParticleSystem.BLENDMODE_STANDARD },\r\n { label: \"Add\", value: BaseParticleSystem.BLENDMODE_ADD },\r\n { label: \"Multiply\", value: BaseParticleSystem.BLENDMODE_MULTIPLY },\r\n { label: \"MultiplyAdd\", value: BaseParticleSystem.BLENDMODE_MULTIPLYADD },\r\n ],\r\n })\r\n public blendMode = BaseParticleSystem.BLENDMODE_ONEONE;\r\n\r\n /**\r\n * Gets or sets the epsilon value used for comparison\r\n */\r\n @editableInPropertyPage(\"Capacity\", PropertyTypeForEdition.Int, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0, max: 10000 })\r\n public capacity = 1000;\r\n\r\n /**\r\n * Gets or sets the emit rate\r\n */\r\n @editableInPropertyPage(\"Emit rate\", PropertyTypeForEdition.Int, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0 })\r\n public emitRate = 10;\r\n\r\n /**\r\n * Gets or sets the target stop duration for the particle system\r\n */\r\n @editableInPropertyPage(\"Target duration\", PropertyTypeForEdition.Float, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0 })\r\n public targetStopDuration = 0;\r\n\r\n /**\r\n * Gets or sets the target stop duration for the particle system\r\n */\r\n @editableInPropertyPage(\"Delay start(ms)\", PropertyTypeForEdition.Float, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0 })\r\n public startDelay = 0;\r\n\r\n /**\r\n * Gets or sets a boolean indicating if the system should not start automatically\r\n */\r\n @editableInPropertyPage(\"Do no start\", PropertyTypeForEdition.Boolean, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true } })\r\n public doNoStart = false;\r\n\r\n /**\r\n * Create a new SystemBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this._isSystem = true;\r\n\r\n this.registerInput(\"particle\", NodeParticleBlockConnectionPointTypes.Particle);\r\n this.registerInput(\"texture\", NodeParticleBlockConnectionPointTypes.Texture);\r\n this.registerInput(\"onStart\", NodeParticleBlockConnectionPointTypes.System, true);\r\n this.registerInput(\"onEnd\", NodeParticleBlockConnectionPointTypes.System, true);\r\n this.registerOutput(\"system\", NodeParticleBlockConnectionPointTypes.System);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"SystemBlock\";\r\n }\r\n\r\n /**\r\n * Gets the particle input component\r\n */\r\n public get particle(): NodeParticleConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the texture input component\r\n */\r\n public get texture(): NodeParticleConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the onStart input component\r\n */\r\n public get onStart(): NodeParticleConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the onEnd input component\r\n */\r\n public get onEnd(): NodeParticleConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the system output component\r\n */\r\n public get system(): NodeParticleConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Builds the block and return a functional particle system\r\n * @param state defines the building state\r\n * @returns the built particle system\r\n */\r\n public createSystem(state: NodeParticleBuildState): ParticleSystem {\r\n state.capacity = this.capacity;\r\n state.buildId = this._buildId++;\r\n\r\n this.build(state);\r\n\r\n const particleSystem = this.particle.getConnectedValue(state) as ParticleSystem;\r\n particleSystem.particleTexture = this.texture.getConnectedValue(state);\r\n particleSystem.emitRate = this.emitRate;\r\n particleSystem.blendMode = this.blendMode;\r\n particleSystem.name = this.name;\r\n particleSystem._nodeGenerated = true;\r\n particleSystem._targetStopDuration = this.targetStopDuration;\r\n particleSystem.startDelay = this.startDelay;\r\n\r\n this.system._storedValue = this;\r\n\r\n particleSystem.canStart = () => {\r\n return !this.doNoStart;\r\n };\r\n\r\n particleSystem.onStartedObservable.add((system) => {\r\n // Triggers\r\n const onStartSystem = this.onStart.getConnectedValue(state);\r\n if (onStartSystem) {\r\n system.onStartedObservable.addOnce(() => {\r\n state.systemContext = particleSystem;\r\n const clone = _TriggerSubEmitter(onStartSystem, state.scene, state.emitterPosition!);\r\n\r\n this.onDisposeObservable.addOnce(() => {\r\n // Clean up the cloned system when the original system is disposed\r\n clone.dispose();\r\n });\r\n });\r\n }\r\n\r\n const onEndSystem = this.onEnd.getConnectedValue(state);\r\n if (onEndSystem) {\r\n system.onStoppedObservable.addOnce(() => {\r\n state.systemContext = particleSystem;\r\n const clone = _TriggerSubEmitter(onEndSystem, state.scene, state.emitterPosition!);\r\n\r\n this.onDisposeObservable.addOnce(() => {\r\n // Clean up the cloned system when the original system is disposed\r\n clone.dispose();\r\n });\r\n });\r\n }\r\n });\r\n\r\n this.onDisposeObservable.addOnce(() => {\r\n particleSystem.dispose();\r\n });\r\n\r\n // Return\r\n return particleSystem;\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.capacity = this.capacity;\r\n serializationObject.emitRate = this.emitRate;\r\n serializationObject.blendMode = this.blendMode;\r\n serializationObject.doNoStart = this.doNoStart;\r\n serializationObject.targetStopDuration = this.targetStopDuration;\r\n serializationObject.startDelay = this.startDelay;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.capacity = serializationObject.capacity;\r\n this.emitRate = serializationObject.emitRate;\r\n this.doNoStart = !!serializationObject.doNoStart;\r\n\r\n if (serializationObject.blendMode !== undefined) {\r\n this.blendMode = serializationObject.blendMode;\r\n }\r\n\r\n if (serializationObject.targetStopDuration !== undefined) {\r\n this.targetStopDuration = serializationObject.targetStopDuration;\r\n }\r\n\r\n if (serializationObject.startDelay !== undefined) {\r\n this.startDelay = serializationObject.startDelay;\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.SystemBlock\", SystemBlock);\r\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the kind of connection point for node geometry
|
|
3
|
+
*/
|
|
4
|
+
export declare enum NodeParticleBlockConnectionPointTypes {
|
|
5
|
+
/** Int */
|
|
6
|
+
Int = 1,
|
|
7
|
+
/** Float */
|
|
8
|
+
Float = 2,
|
|
9
|
+
/** Vector2 */
|
|
10
|
+
Vector2 = 4,
|
|
11
|
+
/** Vector3 */
|
|
12
|
+
Vector3 = 8,
|
|
13
|
+
/** Matrix */
|
|
14
|
+
Matrix = 16,
|
|
15
|
+
/** Particle */
|
|
16
|
+
Particle = 32,
|
|
17
|
+
/** Texture */
|
|
18
|
+
Texture = 64,
|
|
19
|
+
/** Color4 */
|
|
20
|
+
Color4 = 128,
|
|
21
|
+
/** FloatGradient */
|
|
22
|
+
FloatGradient = 256,
|
|
23
|
+
/** Vector2Gradient */
|
|
24
|
+
Vector2Gradient = 512,
|
|
25
|
+
/** Vector3Gradient */
|
|
26
|
+
Vector3Gradient = 1024,
|
|
27
|
+
/** Color4Gradient */
|
|
28
|
+
Color4Gradient = 2048,
|
|
29
|
+
/** System */
|
|
30
|
+
System = 4096,
|
|
31
|
+
/** Detect type based on connection */
|
|
32
|
+
AutoDetect = 8192,
|
|
33
|
+
/** Output type that will be defined by input type */
|
|
34
|
+
BasedOnInput = 16384,
|
|
35
|
+
/** Undefined */
|
|
36
|
+
Undefined = 32768,
|
|
37
|
+
/** Bitmask of all types */
|
|
38
|
+
All = 65535
|
|
39
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the kind of connection point for node geometry
|
|
3
|
+
*/
|
|
4
|
+
export var NodeParticleBlockConnectionPointTypes;
|
|
5
|
+
(function (NodeParticleBlockConnectionPointTypes) {
|
|
6
|
+
/** Int */
|
|
7
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Int"] = 1] = "Int";
|
|
8
|
+
/** Float */
|
|
9
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Float"] = 2] = "Float";
|
|
10
|
+
/** Vector2 */
|
|
11
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Vector2"] = 4] = "Vector2";
|
|
12
|
+
/** Vector3 */
|
|
13
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Vector3"] = 8] = "Vector3";
|
|
14
|
+
/** Matrix */
|
|
15
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Matrix"] = 16] = "Matrix";
|
|
16
|
+
/** Particle */
|
|
17
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Particle"] = 32] = "Particle";
|
|
18
|
+
/** Texture */
|
|
19
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Texture"] = 64] = "Texture";
|
|
20
|
+
/** Color4 */
|
|
21
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Color4"] = 128] = "Color4";
|
|
22
|
+
/** FloatGradient */
|
|
23
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["FloatGradient"] = 256] = "FloatGradient";
|
|
24
|
+
/** Vector2Gradient */
|
|
25
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Vector2Gradient"] = 512] = "Vector2Gradient";
|
|
26
|
+
/** Vector3Gradient */
|
|
27
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Vector3Gradient"] = 1024] = "Vector3Gradient";
|
|
28
|
+
/** Color4Gradient */
|
|
29
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Color4Gradient"] = 2048] = "Color4Gradient";
|
|
30
|
+
/** System */
|
|
31
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["System"] = 4096] = "System";
|
|
32
|
+
/** Detect type based on connection */
|
|
33
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["AutoDetect"] = 8192] = "AutoDetect";
|
|
34
|
+
/** Output type that will be defined by input type */
|
|
35
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["BasedOnInput"] = 16384] = "BasedOnInput";
|
|
36
|
+
/** Undefined */
|
|
37
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["Undefined"] = 32768] = "Undefined";
|
|
38
|
+
/** Bitmask of all types */
|
|
39
|
+
NodeParticleBlockConnectionPointTypes[NodeParticleBlockConnectionPointTypes["All"] = 65535] = "All";
|
|
40
|
+
})(NodeParticleBlockConnectionPointTypes || (NodeParticleBlockConnectionPointTypes = {}));
|
|
41
|
+
//# sourceMappingURL=nodeParticleBlockConnectionPointTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodeParticleBlockConnectionPointTypes.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,qCAmCX;AAnCD,WAAY,qCAAqC;IAC7C,UAAU;IACV,+FAAY,CAAA;IACZ,YAAY;IACZ,mGAAc,CAAA;IACd,cAAc;IACd,uGAAgB,CAAA;IAChB,cAAc;IACd,uGAAgB,CAAA;IAChB,aAAa;IACb,sGAAe,CAAA;IACf,eAAe;IACf,0GAAiB,CAAA;IACjB,cAAc;IACd,wGAAgB,CAAA;IAChB,aAAa;IACb,uGAAe,CAAA;IACf,oBAAoB;IACpB,qHAAsB,CAAA;IACtB,sBAAsB;IACtB,yHAAwB,CAAA;IACxB,sBAAsB;IACtB,0HAAwB,CAAA;IACxB,qBAAqB;IACrB,wHAAuB,CAAA;IACvB,aAAa;IACb,wGAAe,CAAA;IACf,sCAAsC;IACtC,gHAAmB,CAAA;IACnB,qDAAqD;IACrD,qHAAqB,CAAA;IACrB,gBAAgB;IAChB,+GAAkB,CAAA;IAClB,2BAA2B;IAC3B,mGAAY,CAAA;AAChB,CAAC,EAnCW,qCAAqC,KAArC,qCAAqC,QAmChD","sourcesContent":["/**\r\n * Defines the kind of connection point for node geometry\r\n */\r\nexport enum NodeParticleBlockConnectionPointTypes {\r\n /** Int */\r\n Int = 0x0001,\r\n /** Float */\r\n Float = 0x0002,\r\n /** Vector2 */\r\n Vector2 = 0x0004,\r\n /** Vector3 */\r\n Vector3 = 0x0008,\r\n /** Matrix */\r\n Matrix = 0x0010,\r\n /** Particle */\r\n Particle = 0x0020,\r\n /** Texture */\r\n Texture = 0x0040,\r\n /** Color4 */\r\n Color4 = 0x0080,\r\n /** FloatGradient */\r\n FloatGradient = 0x0100,\r\n /** Vector2Gradient */\r\n Vector2Gradient = 0x0200,\r\n /** Vector3Gradient */\r\n Vector3Gradient = 0x0400,\r\n /** Color4Gradient */\r\n Color4Gradient = 0x0800,\r\n /** System */\r\n System = 0x1000,\r\n /** Detect type based on connection */\r\n AutoDetect = 0x2000,\r\n /** Output type that will be defined by input type */\r\n BasedOnInput = 0x4000,\r\n /** Undefined */\r\n Undefined = 0x8000,\r\n /** Bitmask of all types */\r\n All = 0xffff,\r\n}\r\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the kind of contextual sources for node particles
|
|
3
|
+
*/
|
|
4
|
+
export declare enum NodeParticleContextualSources {
|
|
5
|
+
/** None */
|
|
6
|
+
None = 0,
|
|
7
|
+
/** Position */
|
|
8
|
+
Position = 1,
|
|
9
|
+
/** Direction */
|
|
10
|
+
Direction = 2,
|
|
11
|
+
/** Age */
|
|
12
|
+
Age = 3,
|
|
13
|
+
/** Lifetime */
|
|
14
|
+
Lifetime = 4,
|
|
15
|
+
/** Color */
|
|
16
|
+
Color = 5,
|
|
17
|
+
/** ScaledDirection */
|
|
18
|
+
ScaledDirection = 6,
|
|
19
|
+
/** Scale */
|
|
20
|
+
Scale = 7,
|
|
21
|
+
/** AgeGradient */
|
|
22
|
+
AgeGradient = 8,
|
|
23
|
+
/** Angle */
|
|
24
|
+
Angle = 9,
|
|
25
|
+
/** SpriteCellIndex */
|
|
26
|
+
SpriteCellIndex = 16,
|
|
27
|
+
/** SpriteCellStart */
|
|
28
|
+
SpriteCellStart = 17,
|
|
29
|
+
/** SpriteCellEnd */
|
|
30
|
+
SpriteCellEnd = 18
|
|
31
|
+
}
|