@babylonjs/core 8.10.1 → 8.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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.d.ts +13 -3
- package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.js +64 -9
- 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.d.ts +4 -0
- package/Materials/Node/Blocks/Fragment/screenSizeBlock.js +8 -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 +7 -2
- package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildStateSharedData.d.ts +14 -3
- package/Materials/Node/nodeMaterialBuildStateSharedData.js +24 -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/Materials/uniformBuffer.js +2 -1
- package/Materials/uniformBuffer.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.d.ts +4 -0
- package/Misc/environmentTextureTools.js +1 -0
- 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/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 +4 -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 +120 -0
- package/Particles/Node/nodeParticleSystemSet.js +382 -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 +2 -1
- package/Particles/baseParticleSystem.js +1 -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 @@
|
|
|
1
|
+
{"version":3,"file":"updateAngleBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Particles/Node/Blocks/Update/updateAngleBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAK5D,OAAO,EAAE,gBAAgB,EAAE,yCAA4C;AAEvE;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,iBAAiB;IACnD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,qCAAqC,CAAC,QAAQ,CAAC,CAAC;QAC/E,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,KAAK,CAAC,CAAC;QACzE,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,QAAQ,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,kBAAkB,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACa,MAAM,CAAC,KAA6B;QAChD,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAuB,CAAC;QAE5E,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC;QAElC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;YAC1B,OAAO;QACX,CAAC;QAED,MAAM,YAAY,GAAG,CAAC,QAAkB,EAAE,EAAE;YACxC,KAAK,CAAC,eAAe,GAAG,QAAQ,CAAC;YACjC,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC;YAC7B,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;QACzD,CAAC,CAAC;QAEF,MAAM,eAAe,GAAG;YACpB,OAAO,EAAE,YAAY;YACrB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;SACjB,CAAC;QAEF,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC3B,gBAAgB,CAAC,eAAe,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAChE,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,iBAAiB,GAAG,eAAe,CAAC;QAC/C,CAAC;IACL,CAAC;CACJ;AAED,aAAa,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,CAAC","sourcesContent":["import { 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 type { ThinParticleSystem } from \"core/Particles/thinParticleSystem\";\r\nimport type { Particle } from \"core/Particles/particle\";\r\nimport { _ConnectAtTheEnd } from \"core/Particles/Queue/executionQueue\";\r\n\r\n/**\r\n * Block used to update the angle of a particle\r\n */\r\nexport class UpdateAngleBlock extends NodeParticleBlock {\r\n /**\r\n * Create a new UpdateAngleBlock\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(\"particle\", NodeParticleBlockConnectionPointTypes.Particle);\r\n this.registerInput(\"angle\", NodeParticleBlockConnectionPointTypes.Float);\r\n this.registerOutput(\"output\", NodeParticleBlockConnectionPointTypes.Particle);\r\n }\r\n\r\n /**\r\n * Gets the particle 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 angle input component\r\n */\r\n public get angle(): 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 \"UpdateAngleBlock\";\r\n }\r\n\r\n /**\r\n * Builds the block\r\n * @param state defines the current build state\r\n */\r\n public override _build(state: NodeParticleBuildState) {\r\n const system = this.particle.getConnectedValue(state) as ThinParticleSystem;\r\n\r\n this.output._storedValue = system;\r\n\r\n if (!this.angle.isConnected) {\r\n return;\r\n }\r\n\r\n const processAngle = (particle: Particle) => {\r\n state.particleContext = particle;\r\n state.systemContext = system;\r\n particle.angle = this.angle.getConnectedValue(state);\r\n };\r\n\r\n const angleProcessing = {\r\n process: processAngle,\r\n previousItem: null,\r\n nextItem: null,\r\n };\r\n\r\n if (system._updateQueueStart) {\r\n _ConnectAtTheEnd(angleProcessing, system._updateQueueStart);\r\n } else {\r\n system._updateQueueStart = angleProcessing;\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.UpdateAngleBlock\", UpdateAngleBlock);\r\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { NodeParticleBlock } from "../../nodeParticleBlock.js";
|
|
2
|
+
import type { NodeParticleConnectionPoint } from "../../nodeParticleBlockConnectionPoint.js";
|
|
3
|
+
import type { NodeParticleBuildState } from "../../nodeParticleBuildState.js";
|
|
4
|
+
/**
|
|
5
|
+
* Block used to update the color of a particle
|
|
6
|
+
*/
|
|
7
|
+
export declare class UpdateColorBlock extends NodeParticleBlock {
|
|
8
|
+
/**
|
|
9
|
+
* Create a new UpdateColorBlock
|
|
10
|
+
* @param name defines the block name
|
|
11
|
+
*/
|
|
12
|
+
constructor(name: string);
|
|
13
|
+
/**
|
|
14
|
+
* Gets the particle component
|
|
15
|
+
*/
|
|
16
|
+
get particle(): NodeParticleConnectionPoint;
|
|
17
|
+
/**
|
|
18
|
+
* Gets the color input component
|
|
19
|
+
*/
|
|
20
|
+
get color(): NodeParticleConnectionPoint;
|
|
21
|
+
/**
|
|
22
|
+
* Gets the output component
|
|
23
|
+
*/
|
|
24
|
+
get output(): NodeParticleConnectionPoint;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the current class name
|
|
27
|
+
* @returns the class name
|
|
28
|
+
*/
|
|
29
|
+
getClassName(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Builds the block
|
|
32
|
+
* @param state defines the current build state
|
|
33
|
+
*/
|
|
34
|
+
_build(state: NodeParticleBuildState): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
2
|
+
import { NodeParticleBlockConnectionPointTypes } from "../../Enums/nodeParticleBlockConnectionPointTypes.js";
|
|
3
|
+
import { NodeParticleBlock } from "../../nodeParticleBlock.js";
|
|
4
|
+
import { _ConnectAtTheEnd } from "../../../Queue/executionQueue.js";
|
|
5
|
+
/**
|
|
6
|
+
* Block used to update the color of a particle
|
|
7
|
+
*/
|
|
8
|
+
export class UpdateColorBlock extends NodeParticleBlock {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new UpdateColorBlock
|
|
11
|
+
* @param name defines the block name
|
|
12
|
+
*/
|
|
13
|
+
constructor(name) {
|
|
14
|
+
super(name);
|
|
15
|
+
this.registerInput("particle", NodeParticleBlockConnectionPointTypes.Particle);
|
|
16
|
+
this.registerInput("color", NodeParticleBlockConnectionPointTypes.Color4);
|
|
17
|
+
this.registerOutput("output", NodeParticleBlockConnectionPointTypes.Particle);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Gets the particle component
|
|
21
|
+
*/
|
|
22
|
+
get particle() {
|
|
23
|
+
return this._inputs[0];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Gets the color input component
|
|
27
|
+
*/
|
|
28
|
+
get color() {
|
|
29
|
+
return this._inputs[1];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Gets the output component
|
|
33
|
+
*/
|
|
34
|
+
get output() {
|
|
35
|
+
return this._outputs[0];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Gets the current class name
|
|
39
|
+
* @returns the class name
|
|
40
|
+
*/
|
|
41
|
+
getClassName() {
|
|
42
|
+
return "UpdateColorBlock";
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Builds the block
|
|
46
|
+
* @param state defines the current build state
|
|
47
|
+
*/
|
|
48
|
+
_build(state) {
|
|
49
|
+
const system = this.particle.getConnectedValue(state);
|
|
50
|
+
this.output._storedValue = system;
|
|
51
|
+
if (!this.color.isConnected) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const processColor = (particle) => {
|
|
55
|
+
state.particleContext = particle;
|
|
56
|
+
state.systemContext = system;
|
|
57
|
+
particle.color.copyFrom(this.color.getConnectedValue(state));
|
|
58
|
+
};
|
|
59
|
+
const colorProcessing = {
|
|
60
|
+
process: processColor,
|
|
61
|
+
previousItem: null,
|
|
62
|
+
nextItem: null,
|
|
63
|
+
};
|
|
64
|
+
if (system._updateQueueStart) {
|
|
65
|
+
_ConnectAtTheEnd(colorProcessing, system._updateQueueStart);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
system._updateQueueStart = colorProcessing;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
RegisterClass("BABYLON.UpdateColorBlock", UpdateColorBlock);
|
|
73
|
+
//# sourceMappingURL=updateColorBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateColorBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Particles/Node/Blocks/Update/updateColorBlock.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAI5D,OAAO,EAAE,gBAAgB,EAAE,yCAA4C;AAGvE;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,iBAAiB;IACnD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,qCAAqC,CAAC,QAAQ,CAAC,CAAC;QAC/E,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,MAAM,CAAC,CAAC;QAC1E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,QAAQ,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,kBAAkB,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACa,MAAM,CAAC,KAA6B;QAChD,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAuB,CAAC;QAE5E,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC;QAElC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;YAC1B,OAAO;QACX,CAAC;QAED,MAAM,YAAY,GAAG,CAAC,QAAkB,EAAE,EAAE;YACxC,KAAK,CAAC,eAAe,GAAG,QAAQ,CAAC;YACjC,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC;YAC7B,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAW,CAAC,CAAC;QAC3E,CAAC,CAAC;QAEF,MAAM,eAAe,GAAG;YACpB,OAAO,EAAE,YAAY;YACrB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;SACjB,CAAC;QAEF,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC3B,gBAAgB,CAAC,eAAe,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAChE,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,iBAAiB,GAAG,eAAe,CAAC;QAC/C,CAAC;IACL,CAAC;CACJ;AAED,aAAa,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,CAAC","sourcesContent":["import type { ThinParticleSystem } from \"core/Particles/thinParticleSystem\";\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 type { Particle } from \"core/Particles/particle\";\r\nimport { _ConnectAtTheEnd } from \"core/Particles/Queue/executionQueue\";\r\nimport type { Color4 } from \"core/Maths\";\r\n\r\n/**\r\n * Block used to update the color of a particle\r\n */\r\nexport class UpdateColorBlock extends NodeParticleBlock {\r\n /**\r\n * Create a new UpdateColorBlock\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(\"particle\", NodeParticleBlockConnectionPointTypes.Particle);\r\n this.registerInput(\"color\", NodeParticleBlockConnectionPointTypes.Color4);\r\n this.registerOutput(\"output\", NodeParticleBlockConnectionPointTypes.Particle);\r\n }\r\n\r\n /**\r\n * Gets the particle 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 color input component\r\n */\r\n public get color(): 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 \"UpdateColorBlock\";\r\n }\r\n\r\n /**\r\n * Builds the block\r\n * @param state defines the current build state\r\n */\r\n public override _build(state: NodeParticleBuildState) {\r\n const system = this.particle.getConnectedValue(state) as ThinParticleSystem;\r\n\r\n this.output._storedValue = system;\r\n\r\n if (!this.color.isConnected) {\r\n return;\r\n }\r\n\r\n const processColor = (particle: Particle) => {\r\n state.particleContext = particle;\r\n state.systemContext = system;\r\n particle.color.copyFrom(this.color.getConnectedValue(state) as Color4);\r\n };\r\n\r\n const colorProcessing = {\r\n process: processColor,\r\n previousItem: null,\r\n nextItem: null,\r\n };\r\n\r\n if (system._updateQueueStart) {\r\n _ConnectAtTheEnd(colorProcessing, system._updateQueueStart);\r\n } else {\r\n system._updateQueueStart = colorProcessing;\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.UpdateColorBlock\", UpdateColorBlock);\r\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { NodeParticleBlock } from "../../nodeParticleBlock.js";
|
|
2
|
+
import type { NodeParticleConnectionPoint } from "../../nodeParticleBlockConnectionPoint.js";
|
|
3
|
+
import type { NodeParticleBuildState } from "../../nodeParticleBuildState.js";
|
|
4
|
+
/**
|
|
5
|
+
* Block used to update the direction of a particle
|
|
6
|
+
*/
|
|
7
|
+
export declare class UpdateDirectionBlock extends NodeParticleBlock {
|
|
8
|
+
/**
|
|
9
|
+
* Create a new UpdateDirectionBlock
|
|
10
|
+
* @param name defines the block name
|
|
11
|
+
*/
|
|
12
|
+
constructor(name: string);
|
|
13
|
+
/**
|
|
14
|
+
* Gets the particle component
|
|
15
|
+
*/
|
|
16
|
+
get particle(): NodeParticleConnectionPoint;
|
|
17
|
+
/**
|
|
18
|
+
* Gets the direction input component
|
|
19
|
+
*/
|
|
20
|
+
get direction(): NodeParticleConnectionPoint;
|
|
21
|
+
/**
|
|
22
|
+
* Gets the output component
|
|
23
|
+
*/
|
|
24
|
+
get output(): NodeParticleConnectionPoint;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the current class name
|
|
27
|
+
* @returns the class name
|
|
28
|
+
*/
|
|
29
|
+
getClassName(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Builds the block
|
|
32
|
+
* @param state defines the current build state
|
|
33
|
+
*/
|
|
34
|
+
_build(state: NodeParticleBuildState): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
2
|
+
import { NodeParticleBlockConnectionPointTypes } from "../../Enums/nodeParticleBlockConnectionPointTypes.js";
|
|
3
|
+
import { NodeParticleBlock } from "../../nodeParticleBlock.js";
|
|
4
|
+
import { _ConnectAtTheEnd } from "../../../Queue/executionQueue.js";
|
|
5
|
+
/**
|
|
6
|
+
* Block used to update the direction of a particle
|
|
7
|
+
*/
|
|
8
|
+
export class UpdateDirectionBlock extends NodeParticleBlock {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new UpdateDirectionBlock
|
|
11
|
+
* @param name defines the block name
|
|
12
|
+
*/
|
|
13
|
+
constructor(name) {
|
|
14
|
+
super(name);
|
|
15
|
+
this.registerInput("particle", NodeParticleBlockConnectionPointTypes.Particle);
|
|
16
|
+
this.registerInput("direction", NodeParticleBlockConnectionPointTypes.Vector3);
|
|
17
|
+
this.registerOutput("output", NodeParticleBlockConnectionPointTypes.Particle);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Gets the particle component
|
|
21
|
+
*/
|
|
22
|
+
get particle() {
|
|
23
|
+
return this._inputs[0];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Gets the direction input component
|
|
27
|
+
*/
|
|
28
|
+
get direction() {
|
|
29
|
+
return this._inputs[1];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Gets the output component
|
|
33
|
+
*/
|
|
34
|
+
get output() {
|
|
35
|
+
return this._outputs[0];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Gets the current class name
|
|
39
|
+
* @returns the class name
|
|
40
|
+
*/
|
|
41
|
+
getClassName() {
|
|
42
|
+
return "UpdateDirectionBlock";
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Builds the block
|
|
46
|
+
* @param state defines the current build state
|
|
47
|
+
*/
|
|
48
|
+
_build(state) {
|
|
49
|
+
const system = this.particle.getConnectedValue(state);
|
|
50
|
+
this.output._storedValue = system;
|
|
51
|
+
if (!this.direction.isConnected) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const processDirection = (particle) => {
|
|
55
|
+
state.particleContext = particle;
|
|
56
|
+
state.systemContext = system;
|
|
57
|
+
particle.direction.copyFrom(this.direction.getConnectedValue(state));
|
|
58
|
+
};
|
|
59
|
+
const directionProcessing = {
|
|
60
|
+
process: processDirection,
|
|
61
|
+
previousItem: null,
|
|
62
|
+
nextItem: null,
|
|
63
|
+
};
|
|
64
|
+
if (system._updateQueueStart) {
|
|
65
|
+
_ConnectAtTheEnd(directionProcessing, system._updateQueueStart);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
system._updateQueueStart = directionProcessing;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
RegisterClass("BABYLON.UpdateDirectionBlock", UpdateDirectionBlock);
|
|
73
|
+
//# sourceMappingURL=updateDirectionBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateDirectionBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Particles/Node/Blocks/Update/updateDirectionBlock.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAK5D,OAAO,EAAE,gBAAgB,EAAE,yCAA4C;AAEvE;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,iBAAiB;IACvD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,qCAAqC,CAAC,QAAQ,CAAC,CAAC;QAC/E,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,qCAAqC,CAAC,OAAO,CAAC,CAAC;QAC/E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,QAAQ,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,sBAAsB,CAAC;IAClC,CAAC;IAED;;;OAGG;IACa,MAAM,CAAC,KAA6B;QAChD,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAuB,CAAC;QAE5E,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC;QAElC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;YAC9B,OAAO;QACX,CAAC;QAED,MAAM,gBAAgB,GAAG,CAAC,QAAkB,EAAE,EAAE;YAC5C,KAAK,CAAC,eAAe,GAAG,QAAQ,CAAC;YACjC,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC;YAC7B,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,KAAK,CAAY,CAAC,CAAC;QACpF,CAAC,CAAC;QAEF,MAAM,mBAAmB,GAAG;YACxB,OAAO,EAAE,gBAAgB;YACzB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;SACjB,CAAC;QAEF,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC3B,gBAAgB,CAAC,mBAAmB,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC;QACpE,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,iBAAiB,GAAG,mBAAmB,CAAC;QACnD,CAAC;IACL,CAAC;CACJ;AAED,aAAa,CAAC,8BAA8B,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import type { ThinParticleSystem } from \"core/Particles/thinParticleSystem\";\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 type { Particle } from \"core/Particles/particle\";\r\nimport type { Vector3 } from \"core/Maths/math.vector\";\r\nimport { _ConnectAtTheEnd } from \"core/Particles/Queue/executionQueue\";\r\n\r\n/**\r\n * Block used to update the direction of a particle\r\n */\r\nexport class UpdateDirectionBlock extends NodeParticleBlock {\r\n /**\r\n * Create a new UpdateDirectionBlock\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(\"particle\", NodeParticleBlockConnectionPointTypes.Particle);\r\n this.registerInput(\"direction\", NodeParticleBlockConnectionPointTypes.Vector3);\r\n this.registerOutput(\"output\", NodeParticleBlockConnectionPointTypes.Particle);\r\n }\r\n\r\n /**\r\n * Gets the particle 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 direction input component\r\n */\r\n public get direction(): 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 \"UpdateDirectionBlock\";\r\n }\r\n\r\n /**\r\n * Builds the block\r\n * @param state defines the current build state\r\n */\r\n public override _build(state: NodeParticleBuildState) {\r\n const system = this.particle.getConnectedValue(state) as ThinParticleSystem;\r\n\r\n this.output._storedValue = system;\r\n\r\n if (!this.direction.isConnected) {\r\n return;\r\n }\r\n\r\n const processDirection = (particle: Particle) => {\r\n state.particleContext = particle;\r\n state.systemContext = system;\r\n particle.direction.copyFrom(this.direction.getConnectedValue(state) as Vector3);\r\n };\r\n\r\n const directionProcessing = {\r\n process: processDirection,\r\n previousItem: null,\r\n nextItem: null,\r\n };\r\n\r\n if (system._updateQueueStart) {\r\n _ConnectAtTheEnd(directionProcessing, system._updateQueueStart);\r\n } else {\r\n system._updateQueueStart = directionProcessing;\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.UpdateDirectionBlock\", UpdateDirectionBlock);\r\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { NodeParticleBlock } from "../../nodeParticleBlock.js";
|
|
2
|
+
import type { NodeParticleConnectionPoint } from "../../nodeParticleBlockConnectionPoint.js";
|
|
3
|
+
import type { NodeParticleBuildState } from "../../nodeParticleBuildState.js";
|
|
4
|
+
/**
|
|
5
|
+
* Block used to update particle position based on a flow map
|
|
6
|
+
*/
|
|
7
|
+
export declare class UpdateFlowMapBlock extends NodeParticleBlock {
|
|
8
|
+
/**
|
|
9
|
+
* Gets or sets the width of the sprite sheet
|
|
10
|
+
*/
|
|
11
|
+
strength: number;
|
|
12
|
+
/**
|
|
13
|
+
* Create a new UpdateFlowMapBlock
|
|
14
|
+
* @param name defines the block name
|
|
15
|
+
*/
|
|
16
|
+
constructor(name: string);
|
|
17
|
+
/**
|
|
18
|
+
* Gets the particle component
|
|
19
|
+
*/
|
|
20
|
+
get particle(): NodeParticleConnectionPoint;
|
|
21
|
+
/**
|
|
22
|
+
* Gets the flowMap input component
|
|
23
|
+
*/
|
|
24
|
+
get flowMap(): NodeParticleConnectionPoint;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the output component
|
|
27
|
+
*/
|
|
28
|
+
get output(): NodeParticleConnectionPoint;
|
|
29
|
+
/**
|
|
30
|
+
* Gets the current class name
|
|
31
|
+
* @returns the class name
|
|
32
|
+
*/
|
|
33
|
+
getClassName(): string;
|
|
34
|
+
/**
|
|
35
|
+
* Builds the block
|
|
36
|
+
* @param state defines the current build state
|
|
37
|
+
*/
|
|
38
|
+
_build(state: NodeParticleBuildState): void;
|
|
39
|
+
serialize(): any;
|
|
40
|
+
_deserialize(serializationObject: any): void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
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 { _ConnectAtTheEnd } from "../../../Queue/executionQueue.js";
|
|
6
|
+
import { FlowMap } from "../../../flowMap.js";
|
|
7
|
+
import { editableInPropertyPage } from "../../../../Decorators/nodeDecorator.js";
|
|
8
|
+
/**
|
|
9
|
+
* Block used to update particle position based on a flow map
|
|
10
|
+
*/
|
|
11
|
+
export class UpdateFlowMapBlock extends NodeParticleBlock {
|
|
12
|
+
/**
|
|
13
|
+
* Create a new UpdateFlowMapBlock
|
|
14
|
+
* @param name defines the block name
|
|
15
|
+
*/
|
|
16
|
+
constructor(name) {
|
|
17
|
+
super(name);
|
|
18
|
+
/**
|
|
19
|
+
* Gets or sets the width of the sprite sheet
|
|
20
|
+
*/
|
|
21
|
+
this.strength = 1;
|
|
22
|
+
this.registerInput("particle", NodeParticleBlockConnectionPointTypes.Particle);
|
|
23
|
+
this.registerInput("flowMap", NodeParticleBlockConnectionPointTypes.Texture);
|
|
24
|
+
this.registerOutput("output", NodeParticleBlockConnectionPointTypes.Particle);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Gets the particle component
|
|
28
|
+
*/
|
|
29
|
+
get particle() {
|
|
30
|
+
return this._inputs[0];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Gets the flowMap input component
|
|
34
|
+
*/
|
|
35
|
+
get flowMap() {
|
|
36
|
+
return this._inputs[1];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Gets the output component
|
|
40
|
+
*/
|
|
41
|
+
get output() {
|
|
42
|
+
return this._outputs[0];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Gets the current class name
|
|
46
|
+
* @returns the class name
|
|
47
|
+
*/
|
|
48
|
+
getClassName() {
|
|
49
|
+
return "UpdateFlowMapBlock";
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Builds the block
|
|
53
|
+
* @param state defines the current build state
|
|
54
|
+
*/
|
|
55
|
+
_build(state) {
|
|
56
|
+
const system = this.particle.getConnectedValue(state);
|
|
57
|
+
const scene = state.scene;
|
|
58
|
+
const flowMapTexture = this.flowMap.connectedPoint?.ownerBlock;
|
|
59
|
+
let flowMap;
|
|
60
|
+
// eslint-disable-next-line github/no-then
|
|
61
|
+
void flowMapTexture.extractTextureContentAsync().then((textureContent) => {
|
|
62
|
+
if (!textureContent) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
flowMap = new FlowMap(textureContent.width, textureContent.height, textureContent.data);
|
|
66
|
+
});
|
|
67
|
+
const processFlowMap = (particle) => {
|
|
68
|
+
const matrix = scene.getTransformMatrix();
|
|
69
|
+
if (!flowMap) {
|
|
70
|
+
// If the flow map is not ready, we skip processing
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
flowMap._processParticle(particle, this.strength * system._tempScaledUpdateSpeed, matrix);
|
|
74
|
+
};
|
|
75
|
+
const flowMapProcessing = {
|
|
76
|
+
process: processFlowMap,
|
|
77
|
+
previousItem: null,
|
|
78
|
+
nextItem: null,
|
|
79
|
+
};
|
|
80
|
+
if (system._updateQueueStart) {
|
|
81
|
+
_ConnectAtTheEnd(flowMapProcessing, system._updateQueueStart);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
system._updateQueueStart = flowMapProcessing;
|
|
85
|
+
}
|
|
86
|
+
this.output._storedValue = system;
|
|
87
|
+
}
|
|
88
|
+
serialize() {
|
|
89
|
+
const serializationObject = super.serialize();
|
|
90
|
+
serializationObject.strength = this.strength;
|
|
91
|
+
return serializationObject;
|
|
92
|
+
}
|
|
93
|
+
_deserialize(serializationObject) {
|
|
94
|
+
super._deserialize(serializationObject);
|
|
95
|
+
this.strength = serializationObject.strength;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
__decorate([
|
|
99
|
+
editableInPropertyPage("strength", 1 /* PropertyTypeForEdition.Float */, "ADVANCED", { embedded: true, notifiers: { rebuild: true }, min: 0 })
|
|
100
|
+
], UpdateFlowMapBlock.prototype, "strength", void 0);
|
|
101
|
+
RegisterClass("BABYLON.UpdateFlowMapBlock", UpdateFlowMapBlock);
|
|
102
|
+
//# sourceMappingURL=updateFlowMapBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateFlowMapBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Particles/Node/Blocks/Update/updateFlowMapBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAI5D,OAAO,EAAE,gBAAgB,EAAE,yCAA4C;AACvE,OAAO,EAAE,OAAO,EAAE,4BAA+B;AACjD,OAAO,EAAE,sBAAsB,EAA0B,gDAAsC;AAG/F;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,iBAAiB;IAMrD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAVhB;;WAEG;QAEI,aAAQ,GAAG,CAAC,CAAC;QAQhB,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,qCAAqC,CAAC,QAAQ,CAAC,CAAC;QAC/E,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,qCAAqC,CAAC,OAAO,CAAC,CAAC;QAC7E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,QAAQ,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,oBAAoB,CAAC;IAChC,CAAC;IAED;;;OAGG;IACa,MAAM,CAAC,KAA6B;QAChD,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAuB,CAAC;QAC5E,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAE1B,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,UAAwC,CAAC;QAC7F,IAAI,OAAgB,CAAC;QAErB,0CAA0C;QAC1C,KAAK,cAAc,CAAC,0BAA0B,EAAE,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,EAAE;YACrE,IAAI,CAAC,cAAc,EAAE,CAAC;gBAClB,OAAO;YACX,CAAC;YACD,OAAO,GAAG,IAAI,OAAO,CAAC,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,IAAyB,CAAC,CAAC;QACjH,CAAC,CAAC,CAAC;QAEH,MAAM,cAAc,GAAG,CAAC,QAAkB,EAAE,EAAE;YAC1C,MAAM,MAAM,GAAG,KAAK,CAAC,kBAAkB,EAAE,CAAC;YAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;gBACX,mDAAmD;gBACnD,OAAO;YACX,CAAC;YAED,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;QAC9F,CAAC,CAAC;QAEF,MAAM,iBAAiB,GAAG;YACtB,OAAO,EAAE,cAAc;YACvB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;SACjB,CAAC;QAEF,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC3B,gBAAgB,CAAC,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAClE,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QACjD,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC;IACtC,CAAC;IAEe,SAAS;QACrB,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAE9C,mBAAmB,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAE7C,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QAExC,IAAI,CAAC,QAAQ,GAAG,mBAAmB,CAAC,QAAQ,CAAC;IACjD,CAAC;CACJ;AAnGU;IADN,sBAAsB,CAAC,UAAU,wCAAgC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;oDACnH;AAqGxB,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import type { ThinParticleSystem } from \"core/Particles/thinParticleSystem\";\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 type { Particle } from \"core/Particles/particle\";\r\nimport { _ConnectAtTheEnd } from \"core/Particles/Queue/executionQueue\";\r\nimport { FlowMap } from \"core/Particles/flowMap\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"core/Decorators/nodeDecorator\";\r\nimport type { ParticleTextureSourceBlock } from \"../particleSourceTextureBlock\";\r\n\r\n/**\r\n * Block used to update particle position based on a flow map\r\n */\r\nexport class UpdateFlowMapBlock extends NodeParticleBlock {\r\n /**\r\n * Gets or sets the width of the sprite sheet\r\n */\r\n @editableInPropertyPage(\"strength\", PropertyTypeForEdition.Float, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0 })\r\n public strength = 1;\r\n /**\r\n * Create a new UpdateFlowMapBlock\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(\"particle\", NodeParticleBlockConnectionPointTypes.Particle);\r\n this.registerInput(\"flowMap\", NodeParticleBlockConnectionPointTypes.Texture);\r\n this.registerOutput(\"output\", NodeParticleBlockConnectionPointTypes.Particle);\r\n }\r\n\r\n /**\r\n * Gets the particle 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 flowMap input component\r\n */\r\n public get flowMap(): 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 \"UpdateFlowMapBlock\";\r\n }\r\n\r\n /**\r\n * Builds the block\r\n * @param state defines the current build state\r\n */\r\n public override _build(state: NodeParticleBuildState) {\r\n const system = this.particle.getConnectedValue(state) as ThinParticleSystem;\r\n const scene = state.scene;\r\n\r\n const flowMapTexture = this.flowMap.connectedPoint?.ownerBlock as ParticleTextureSourceBlock;\r\n let flowMap: FlowMap;\r\n\r\n // eslint-disable-next-line github/no-then\r\n void flowMapTexture.extractTextureContentAsync().then((textureContent) => {\r\n if (!textureContent) {\r\n return;\r\n }\r\n flowMap = new FlowMap(textureContent.width, textureContent.height, textureContent.data as Uint8ClampedArray);\r\n });\r\n\r\n const processFlowMap = (particle: Particle) => {\r\n const matrix = scene.getTransformMatrix();\r\n if (!flowMap) {\r\n // If the flow map is not ready, we skip processing\r\n return;\r\n }\r\n\r\n flowMap._processParticle(particle, this.strength * system._tempScaledUpdateSpeed, matrix);\r\n };\r\n\r\n const flowMapProcessing = {\r\n process: processFlowMap,\r\n previousItem: null,\r\n nextItem: null,\r\n };\r\n\r\n if (system._updateQueueStart) {\r\n _ConnectAtTheEnd(flowMapProcessing, system._updateQueueStart);\r\n } else {\r\n system._updateQueueStart = flowMapProcessing;\r\n }\r\n\r\n this.output._storedValue = system;\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.strength = this.strength;\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.strength = serializationObject.strength;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.UpdateFlowMapBlock\", UpdateFlowMapBlock);\r\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { NodeParticleBlock } from "../../nodeParticleBlock.js";
|
|
2
|
+
import type { NodeParticleConnectionPoint } from "../../nodeParticleBlockConnectionPoint.js";
|
|
3
|
+
import type { NodeParticleBuildState } from "../../nodeParticleBuildState.js";
|
|
4
|
+
/**
|
|
5
|
+
* Block used to update the position of a particle
|
|
6
|
+
*/
|
|
7
|
+
export declare class UpdatePositionBlock extends NodeParticleBlock {
|
|
8
|
+
/**
|
|
9
|
+
* Create a new UpdateDirectionBlock
|
|
10
|
+
* @param name defines the block name
|
|
11
|
+
*/
|
|
12
|
+
constructor(name: string);
|
|
13
|
+
/**
|
|
14
|
+
* Gets the particle component
|
|
15
|
+
*/
|
|
16
|
+
get particle(): NodeParticleConnectionPoint;
|
|
17
|
+
/**
|
|
18
|
+
* Gets the position input component
|
|
19
|
+
*/
|
|
20
|
+
get position(): NodeParticleConnectionPoint;
|
|
21
|
+
/**
|
|
22
|
+
* Gets the output component
|
|
23
|
+
*/
|
|
24
|
+
get output(): NodeParticleConnectionPoint;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the current class name
|
|
27
|
+
* @returns the class name
|
|
28
|
+
*/
|
|
29
|
+
getClassName(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Builds the block
|
|
32
|
+
* @param state defines the current build state
|
|
33
|
+
*/
|
|
34
|
+
_build(state: NodeParticleBuildState): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
2
|
+
import { NodeParticleBlockConnectionPointTypes } from "../../Enums/nodeParticleBlockConnectionPointTypes.js";
|
|
3
|
+
import { NodeParticleBlock } from "../../nodeParticleBlock.js";
|
|
4
|
+
import { _ConnectAtTheEnd } from "../../../Queue/executionQueue.js";
|
|
5
|
+
/**
|
|
6
|
+
* Block used to update the position of a particle
|
|
7
|
+
*/
|
|
8
|
+
export class UpdatePositionBlock extends NodeParticleBlock {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new UpdateDirectionBlock
|
|
11
|
+
* @param name defines the block name
|
|
12
|
+
*/
|
|
13
|
+
constructor(name) {
|
|
14
|
+
super(name);
|
|
15
|
+
this.registerInput("particle", NodeParticleBlockConnectionPointTypes.Particle);
|
|
16
|
+
this.registerInput("position", NodeParticleBlockConnectionPointTypes.Vector3);
|
|
17
|
+
this.registerOutput("output", NodeParticleBlockConnectionPointTypes.Particle);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Gets the particle component
|
|
21
|
+
*/
|
|
22
|
+
get particle() {
|
|
23
|
+
return this._inputs[0];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Gets the position input component
|
|
27
|
+
*/
|
|
28
|
+
get position() {
|
|
29
|
+
return this._inputs[1];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Gets the output component
|
|
33
|
+
*/
|
|
34
|
+
get output() {
|
|
35
|
+
return this._outputs[0];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Gets the current class name
|
|
39
|
+
* @returns the class name
|
|
40
|
+
*/
|
|
41
|
+
getClassName() {
|
|
42
|
+
return "UpdatePositionBlock";
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Builds the block
|
|
46
|
+
* @param state defines the current build state
|
|
47
|
+
*/
|
|
48
|
+
_build(state) {
|
|
49
|
+
const system = this.particle.getConnectedValue(state);
|
|
50
|
+
this.output._storedValue = system;
|
|
51
|
+
if (!this.position.isConnected) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const processPosition = (particle) => {
|
|
55
|
+
state.particleContext = particle;
|
|
56
|
+
state.systemContext = system;
|
|
57
|
+
particle.position.copyFrom(this.position.getConnectedValue(state));
|
|
58
|
+
};
|
|
59
|
+
const positionProcessing = {
|
|
60
|
+
process: processPosition,
|
|
61
|
+
previousItem: null,
|
|
62
|
+
nextItem: null,
|
|
63
|
+
};
|
|
64
|
+
if (system._updateQueueStart) {
|
|
65
|
+
_ConnectAtTheEnd(positionProcessing, system._updateQueueStart);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
system._updateQueueStart = positionProcessing;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
RegisterClass("BABYLON.UpdatePositionBlock", UpdatePositionBlock);
|
|
73
|
+
//# sourceMappingURL=updatePositionBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updatePositionBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Particles/Node/Blocks/Update/updatePositionBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAK5D,OAAO,EAAE,gBAAgB,EAAE,yCAA4C;AAGvE;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,iBAAiB;IACtD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,qCAAqC,CAAC,QAAQ,CAAC,CAAC;QAC/E,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,qCAAqC,CAAC,OAAO,CAAC,CAAC;QAC9E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,QAAQ,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,qBAAqB,CAAC;IACjC,CAAC;IAED;;;OAGG;IACa,MAAM,CAAC,KAA6B;QAChD,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAuB,CAAC;QAC5E,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC;QAElC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;YAC7B,OAAO;QACX,CAAC;QAED,MAAM,eAAe,GAAG,CAAC,QAAkB,EAAE,EAAE;YAC3C,KAAK,CAAC,eAAe,GAAG,QAAQ,CAAC;YACjC,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC;YAC7B,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAY,CAAC,CAAC;QAClF,CAAC,CAAC;QAEF,MAAM,kBAAkB,GAAG;YACvB,OAAO,EAAE,eAAe;YACxB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;SACjB,CAAC;QAEF,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC3B,gBAAgB,CAAC,kBAAkB,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC;QACnE,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,iBAAiB,GAAG,kBAAkB,CAAC;QAClD,CAAC;IACL,CAAC;CACJ;AAED,aAAa,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import { 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 type { ThinParticleSystem } from \"core/Particles/thinParticleSystem\";\r\nimport type { Particle } from \"core/Particles/particle\";\r\nimport { _ConnectAtTheEnd } from \"core/Particles/Queue/executionQueue\";\r\nimport type { Vector3 } from \"core/Maths/math.vector\";\r\n\r\n/**\r\n * Block used to update the position of a particle\r\n */\r\nexport class UpdatePositionBlock extends NodeParticleBlock {\r\n /**\r\n * Create a new UpdateDirectionBlock\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(\"particle\", NodeParticleBlockConnectionPointTypes.Particle);\r\n this.registerInput(\"position\", NodeParticleBlockConnectionPointTypes.Vector3);\r\n this.registerOutput(\"output\", NodeParticleBlockConnectionPointTypes.Particle);\r\n }\r\n\r\n /**\r\n * Gets the particle 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 position input component\r\n */\r\n public get position(): 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 \"UpdatePositionBlock\";\r\n }\r\n\r\n /**\r\n * Builds the block\r\n * @param state defines the current build state\r\n */\r\n public override _build(state: NodeParticleBuildState) {\r\n const system = this.particle.getConnectedValue(state) as ThinParticleSystem;\r\n this.output._storedValue = system;\r\n\r\n if (!this.position.isConnected) {\r\n return;\r\n }\r\n\r\n const processPosition = (particle: Particle) => {\r\n state.particleContext = particle;\r\n state.systemContext = system;\r\n particle.position.copyFrom(this.position.getConnectedValue(state) as Vector3);\r\n };\r\n\r\n const positionProcessing = {\r\n process: processPosition,\r\n previousItem: null,\r\n nextItem: null,\r\n };\r\n\r\n if (system._updateQueueStart) {\r\n _ConnectAtTheEnd(positionProcessing, system._updateQueueStart);\r\n } else {\r\n system._updateQueueStart = positionProcessing;\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.UpdatePositionBlock\", UpdatePositionBlock);\r\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { NodeParticleBlock } from "../../nodeParticleBlock.js";
|
|
2
|
+
import type { NodeParticleConnectionPoint } from "../../nodeParticleBlockConnectionPoint.js";
|
|
3
|
+
import type { NodeParticleBuildState } from "../../nodeParticleBuildState.js";
|
|
4
|
+
/**
|
|
5
|
+
* Block used to update the scale of a particle
|
|
6
|
+
*/
|
|
7
|
+
export declare class UpdateScaleBlock extends NodeParticleBlock {
|
|
8
|
+
/**
|
|
9
|
+
* Create a new UpdateScaleBlock
|
|
10
|
+
* @param name defines the block name
|
|
11
|
+
*/
|
|
12
|
+
constructor(name: string);
|
|
13
|
+
/**
|
|
14
|
+
* Gets the particle component
|
|
15
|
+
*/
|
|
16
|
+
get particle(): NodeParticleConnectionPoint;
|
|
17
|
+
/**
|
|
18
|
+
* Gets the scale input component
|
|
19
|
+
*/
|
|
20
|
+
get scale(): NodeParticleConnectionPoint;
|
|
21
|
+
/**
|
|
22
|
+
* Gets the output component
|
|
23
|
+
*/
|
|
24
|
+
get output(): NodeParticleConnectionPoint;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the current class name
|
|
27
|
+
* @returns the class name
|
|
28
|
+
*/
|
|
29
|
+
getClassName(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Builds the block
|
|
32
|
+
* @param state defines the current build state
|
|
33
|
+
*/
|
|
34
|
+
_build(state: NodeParticleBuildState): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
2
|
+
import { NodeParticleBlockConnectionPointTypes } from "../../Enums/nodeParticleBlockConnectionPointTypes.js";
|
|
3
|
+
import { NodeParticleBlock } from "../../nodeParticleBlock.js";
|
|
4
|
+
import { _ConnectAtTheEnd } from "../../../Queue/executionQueue.js";
|
|
5
|
+
/**
|
|
6
|
+
* Block used to update the scale of a particle
|
|
7
|
+
*/
|
|
8
|
+
export class UpdateScaleBlock extends NodeParticleBlock {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new UpdateScaleBlock
|
|
11
|
+
* @param name defines the block name
|
|
12
|
+
*/
|
|
13
|
+
constructor(name) {
|
|
14
|
+
super(name);
|
|
15
|
+
this.registerInput("particle", NodeParticleBlockConnectionPointTypes.Particle);
|
|
16
|
+
this.registerInput("scale", NodeParticleBlockConnectionPointTypes.Vector2);
|
|
17
|
+
this.registerOutput("output", NodeParticleBlockConnectionPointTypes.Particle);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Gets the particle component
|
|
21
|
+
*/
|
|
22
|
+
get particle() {
|
|
23
|
+
return this._inputs[0];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Gets the scale input component
|
|
27
|
+
*/
|
|
28
|
+
get scale() {
|
|
29
|
+
return this._inputs[1];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Gets the output component
|
|
33
|
+
*/
|
|
34
|
+
get output() {
|
|
35
|
+
return this._outputs[0];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Gets the current class name
|
|
39
|
+
* @returns the class name
|
|
40
|
+
*/
|
|
41
|
+
getClassName() {
|
|
42
|
+
return "UpdateScaleBlock";
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Builds the block
|
|
46
|
+
* @param state defines the current build state
|
|
47
|
+
*/
|
|
48
|
+
_build(state) {
|
|
49
|
+
const system = this.particle.getConnectedValue(state);
|
|
50
|
+
this.output._storedValue = system;
|
|
51
|
+
if (!this.scale.isConnected) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const processScale = (particle) => {
|
|
55
|
+
state.particleContext = particle;
|
|
56
|
+
state.systemContext = system;
|
|
57
|
+
particle.scale.copyFrom(this.scale.getConnectedValue(state));
|
|
58
|
+
};
|
|
59
|
+
const scaleProcessing = {
|
|
60
|
+
process: processScale,
|
|
61
|
+
previousItem: null,
|
|
62
|
+
nextItem: null,
|
|
63
|
+
};
|
|
64
|
+
if (system._updateQueueStart) {
|
|
65
|
+
_ConnectAtTheEnd(scaleProcessing, system._updateQueueStart);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
system._updateQueueStart = scaleProcessing;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
RegisterClass("BABYLON.UpdateScaleBlock", UpdateScaleBlock);
|
|
73
|
+
//# sourceMappingURL=updateScaleBlock.js.map
|