@babylonjs/core 8.45.3 → 8.45.5

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.
Files changed (106) hide show
  1. package/AudioV2/webAudio/components/webAudioParameterComponent.js +5 -1
  2. package/AudioV2/webAudio/components/webAudioParameterComponent.js.map +1 -1
  3. package/Cameras/touchCamera.js +1 -1
  4. package/Cameras/touchCamera.js.map +1 -1
  5. package/Engines/AbstractEngine/abstractEngine.loadFile.d.ts +11 -0
  6. package/Engines/AbstractEngine/abstractEngine.loadFile.js +12 -0
  7. package/Engines/AbstractEngine/abstractEngine.loadFile.js.map +1 -0
  8. package/Engines/AbstractEngine/abstractEngine.textureLoaders.d.ts +1 -0
  9. package/Engines/AbstractEngine/abstractEngine.textureLoaders.js +4 -0
  10. package/Engines/AbstractEngine/abstractEngine.textureLoaders.js.map +1 -0
  11. package/Engines/AbstractEngine/index.d.ts +2 -0
  12. package/Engines/AbstractEngine/index.js +2 -0
  13. package/Engines/AbstractEngine/index.js.map +1 -1
  14. package/Engines/Native/Extensions/index.d.ts +1 -0
  15. package/Engines/Native/Extensions/index.js +2 -0
  16. package/Engines/Native/Extensions/index.js.map +1 -0
  17. package/Engines/Native/Extensions/nativeEngine.cubeTexture.d.ts +27 -0
  18. package/Engines/Native/Extensions/nativeEngine.cubeTexture.js +96 -0
  19. package/Engines/Native/Extensions/nativeEngine.cubeTexture.js.map +1 -0
  20. package/Engines/Native/nativeHelpers.js +7 -0
  21. package/Engines/Native/nativeHelpers.js.map +1 -1
  22. package/Engines/Native/nativeInterfaces.d.ts +2 -0
  23. package/Engines/Native/nativeInterfaces.js.map +1 -1
  24. package/Engines/Native/nativePipelineContext.d.ts +2 -2
  25. package/Engines/Native/nativePipelineContext.js.map +1 -1
  26. package/Engines/Native/nativeRenderTargetWrapper.d.ts +3 -3
  27. package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
  28. package/Engines/Native/validatedNativeDataStream.js +2 -2
  29. package/Engines/Native/validatedNativeDataStream.js.map +1 -1
  30. package/Engines/abstractEngine.d.ts +9 -0
  31. package/Engines/abstractEngine.js +13 -4
  32. package/Engines/abstractEngine.js.map +1 -1
  33. package/Engines/engine.d.ts +2 -6
  34. package/Engines/engine.js +2 -13
  35. package/Engines/engine.js.map +1 -1
  36. package/Engines/index.d.ts +1 -0
  37. package/Engines/index.js +1 -0
  38. package/Engines/index.js.map +1 -1
  39. package/Engines/nativeEngine.d.ts +19 -536
  40. package/Engines/nativeEngine.js +27 -2127
  41. package/Engines/nativeEngine.js.map +1 -1
  42. package/Engines/nullEngine.d.ts +2 -0
  43. package/Engines/nullEngine.js +2 -0
  44. package/Engines/nullEngine.js.map +1 -1
  45. package/Engines/thinNativeEngine.d.ts +537 -0
  46. package/Engines/thinNativeEngine.js +2033 -0
  47. package/Engines/thinNativeEngine.js.map +1 -0
  48. package/Engines/webgpuEngine.d.ts +2 -0
  49. package/Engines/webgpuEngine.js +2 -0
  50. package/Engines/webgpuEngine.js.map +1 -1
  51. package/FrameGraph/Node/nodeRenderGraph.d.ts +0 -5
  52. package/FrameGraph/Node/nodeRenderGraph.js +0 -7
  53. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  54. package/FrameGraph/frameGraph.d.ts +0 -6
  55. package/FrameGraph/frameGraph.js +0 -23
  56. package/FrameGraph/frameGraph.js.map +1 -1
  57. package/FrameGraph/frameGraphObjectList.d.ts +0 -1
  58. package/FrameGraph/frameGraphObjectList.js +0 -1
  59. package/FrameGraph/frameGraphObjectList.js.map +1 -1
  60. package/FrameGraph/frameGraphRenderContext.d.ts +0 -1
  61. package/FrameGraph/frameGraphRenderContext.js +0 -1
  62. package/FrameGraph/frameGraphRenderContext.js.map +1 -1
  63. package/FrameGraph/frameGraphRenderTarget.d.ts +0 -1
  64. package/FrameGraph/frameGraphRenderTarget.js +0 -1
  65. package/FrameGraph/frameGraphRenderTarget.js.map +1 -1
  66. package/FrameGraph/frameGraphTask.d.ts +0 -1
  67. package/FrameGraph/frameGraphTask.js +0 -1
  68. package/FrameGraph/frameGraphTask.js.map +1 -1
  69. package/FrameGraph/frameGraphTextureManager.d.ts +0 -1
  70. package/FrameGraph/frameGraphTextureManager.js +0 -1
  71. package/FrameGraph/frameGraphTextureManager.js.map +1 -1
  72. package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +6 -0
  73. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +100 -41
  74. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  75. package/Misc/tools.d.ts +3 -1
  76. package/Misc/tools.js +76 -59
  77. package/Misc/tools.js.map +1 -1
  78. package/Particles/Node/Blocks/Update/updateFlowMapBlock.d.ts +4 -14
  79. package/Particles/Node/Blocks/Update/updateFlowMapBlock.js +9 -27
  80. package/Particles/Node/Blocks/Update/updateFlowMapBlock.js.map +1 -1
  81. package/Particles/Node/Blocks/index.d.ts +2 -0
  82. package/Particles/Node/Blocks/index.js +2 -0
  83. package/Particles/Node/Blocks/index.js.map +1 -1
  84. package/Particles/Node/Blocks/particleClampBlock.d.ts +42 -0
  85. package/Particles/Node/Blocks/particleClampBlock.js +114 -0
  86. package/Particles/Node/Blocks/particleClampBlock.js.map +1 -0
  87. package/Particles/Node/Blocks/particleVectorMathBlock.d.ts +3 -7
  88. package/Particles/Node/Blocks/particleVectorMathBlock.js +15 -32
  89. package/Particles/Node/Blocks/particleVectorMathBlock.js.map +1 -1
  90. package/Particles/Node/Blocks/systemBlock.d.ts +4 -0
  91. package/Particles/Node/Blocks/systemBlock.js +9 -1
  92. package/Particles/Node/Blocks/systemBlock.js.map +1 -1
  93. package/Particles/Node/nodeParticleSystemSet.helper.js +62 -4
  94. package/Particles/Node/nodeParticleSystemSet.helper.js.map +1 -1
  95. package/Particles/baseParticleSystem.d.ts +7 -0
  96. package/Particles/baseParticleSystem.js +7 -0
  97. package/Particles/baseParticleSystem.js.map +1 -1
  98. package/Particles/particleSystem.d.ts +12 -0
  99. package/Particles/particleSystem.js +12 -0
  100. package/Particles/particleSystem.js.map +1 -1
  101. package/Particles/thinParticleSystem.d.ts +10 -0
  102. package/Particles/thinParticleSystem.js +10 -1
  103. package/Particles/thinParticleSystem.js.map +1 -1
  104. package/XR/native/nativeXRFrame.js +1 -1
  105. package/XR/native/nativeXRFrame.js.map +1 -1
  106. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"systemBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Particles/Node/Blocks/systemBlock.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAA0B,6CAAsC;AAC/F,OAAO,EAAE,aAAa,EAAE,mCAA4B;AACpD,OAAO,EAAE,OAAO,EAAE,sCAA+B;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,qCAA8B;AACvD,OAAO,EAAE,kBAAkB,EAAE,oCAA0C;AACvE,OAAO,EAAE,iBAAiB,EAAE,gCAA8C;AAC1E,OAAO,EAAE,kBAAkB,EAAE,mCAAyD;AACtF,OAAO,EAAE,qCAAqC,EAAE,0DAAwE;AACxH,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,iBAAiB;IAiG9C;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAnGhB;;WAEG;QAYI,cAAS,GAAG,kBAAkB,CAAC,gBAAgB,CAAC;QAEvD;;WAEG;QAEI,aAAQ,GAAG,IAAI,CAAC;QAEvB;;WAEG;QAEI,oBAAe,GAAG,CAAC,CAAC,CAAC;QAE5B;;WAEG;QAEI,eAAU,GAAG,CAAC,CAAC;QAEtB;;WAEG;QAEI,gBAAW,GAAG,MAAM,CAAC;QAE5B;;WAEG;QAEI,kBAAa,GAAG,CAAC,CAAC;QAEzB;;WAEG;QAEI,sBAAiB,GAAG,CAA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AsB,CAAC,iBAAiB,0CAAkC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;kDAC3G;AAMtB;IADN,sBAAsB,CAAC,aAAa,0CAAkC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;8CAC3G;AAqQ7B,aAAa,CAAC,qBAAqB,EAAE,WAAW,CAAC,CAAC","sourcesContent":["import type { ParticleSystem } from \"core/Particles/particleSystem\";\r\nimport type { NodeParticleConnectionPoint } from \"core/Particles/Node/nodeParticleBlockConnectionPoint\";\r\nimport type { NodeParticleBuildState } from \"core/Particles/Node/nodeParticleBuildState\";\r\nimport type { ParticleGradientValueBlock } from \"./particleGradientValueBlock\";\r\n\r\nimport { Constants } from \"../../../Engines/constants\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"core/Decorators/nodeDecorator\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport { Vector2 } from \"core/Maths/math.vector\";\r\nimport { Color3, Color4 } from \"core/Maths/math.color\";\r\nimport { BaseParticleSystem } from \"core/Particles/baseParticleSystem\";\r\nimport { NodeParticleBlock } from \"core/Particles/Node/nodeParticleBlock\";\r\nimport { _TriggerSubEmitter } from \"core/Particles/Node/Blocks/Triggers/triggerTools\";\r\nimport { NodeParticleBlockConnectionPointTypes } from \"core/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes\";\r\nimport { ParticleGradientBlock } from \"./particleGradientBlock\";\r\n\r\n/**\r\n * Block used to get a system of particles\r\n */\r\nexport class SystemBlock extends NodeParticleBlock {\r\n private static _IdCounter = 0;\r\n\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: \"Blend Mode OneOne\", value: BaseParticleSystem.BLENDMODE_ONEONE },\r\n { label: \"Blend Mode Standard\", value: BaseParticleSystem.BLENDMODE_STANDARD },\r\n { label: \"Blend Mode Add\", value: BaseParticleSystem.BLENDMODE_ADD },\r\n { label: \"Blend Mode Multiply\", value: BaseParticleSystem.BLENDMODE_MULTIPLY },\r\n { label: \"Blend Mode 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 manual emit count\r\n */\r\n @editableInPropertyPage(\"Manual emit count\", PropertyTypeForEdition.Int, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: -1 })\r\n public manualEmitCount = -1;\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 the target stop duration for the particle system\r\n */\r\n @editableInPropertyPage(\"updateSpeed\", PropertyTypeForEdition.Float, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0, max: 0.1 })\r\n public updateSpeed = 0.0167;\r\n\r\n /**\r\n * Gets or sets the number of pre-warm cycles before rendering the particle system\r\n */\r\n @editableInPropertyPage(\"Pre-warm cycles\", PropertyTypeForEdition.Float, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0 })\r\n public preWarmCycles = 0;\r\n\r\n /**\r\n * Gets or sets the time step multiplier used for pre-warm\r\n */\r\n @editableInPropertyPage(\"Pre-warm step multiplier\", PropertyTypeForEdition.Float, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0 })\r\n public preWarmStepOffset = 0;\r\n\r\n /**\r\n * Gets or sets a boolean indicating if the system is billboard based\r\n */\r\n @editableInPropertyPage(\"Is billboard based\", PropertyTypeForEdition.Boolean, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true } })\r\n public isBillboardBased = true;\r\n\r\n /**\r\n * Gets or sets the billboard mode for the particle system\r\n */\r\n @editableInPropertyPage(\"Billboard mode\", PropertyTypeForEdition.List, \"ADVANCED\", {\r\n notifiers: { rebuild: true },\r\n embedded: true,\r\n options: [\r\n { label: \"Billboard Mode All\", value: Constants.PARTICLES_BILLBOARDMODE_ALL },\r\n { label: \"Billboard Mode Y\", value: Constants.PARTICLES_BILLBOARDMODE_Y },\r\n { label: \"Billboard Mode Stretched\", value: Constants.PARTICLES_BILLBOARDMODE_STRETCHED },\r\n { label: \"Billboard Mode Stretched Local\", value: Constants.PARTICLES_BILLBOARDMODE_STRETCHED_LOCAL },\r\n ],\r\n })\r\n public billBoardMode = Constants.PARTICLES_BILLBOARDMODE_ALL;\r\n\r\n /**\r\n * Gets or sets a boolean indicating if the system coordinate space is local or global\r\n */\r\n @editableInPropertyPage(\"Is local\", PropertyTypeForEdition.Boolean, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true } })\r\n public isLocal = false;\r\n\r\n /**\r\n * Gets or sets a boolean indicating if the system should be disposed when stopped\r\n */\r\n @editableInPropertyPage(\"Dispose on stop\", PropertyTypeForEdition.Boolean, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true } })\r\n public disposeOnStop = false;\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 /** @internal */\r\n public _internalId = SystemBlock._IdCounter++;\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(\"emitRate\", NodeParticleBlockConnectionPointTypes.Int, true, 10, 0);\r\n this.registerInput(\"texture\", NodeParticleBlockConnectionPointTypes.Texture);\r\n this.registerInput(\"translationPivot\", NodeParticleBlockConnectionPointTypes.Vector2, true);\r\n this.registerInput(\"textureMask\", NodeParticleBlockConnectionPointTypes.Color4, true);\r\n this.registerInput(\"targetStopDuration\", NodeParticleBlockConnectionPointTypes.Float, true, 0, 0);\r\n this.registerInput(\"onStart\", NodeParticleBlockConnectionPointTypes.System, true);\r\n this.registerInput(\"onEnd\", NodeParticleBlockConnectionPointTypes.System, true);\r\n this.registerInput(\"rampGradient\", NodeParticleBlockConnectionPointTypes.Color4, 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 emitRate input component\r\n */\r\n public get emitRate(): NodeParticleConnectionPoint {\r\n return this._inputs[1];\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[2];\r\n }\r\n\r\n /**\r\n * Gets the translationPivot input component\r\n */\r\n public get translationPivot(): NodeParticleConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the textureMask input component\r\n */\r\n public get textureMask(): NodeParticleConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n /**\r\n * Gets the targetStopDuration input component\r\n */\r\n public get targetStopDuration(): NodeParticleConnectionPoint {\r\n return this._inputs[5];\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[6];\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[7];\r\n }\r\n\r\n /**\r\n * Gets the rampGradient input component\r\n */\r\n public get rampGradient(): NodeParticleConnectionPoint {\r\n return this._inputs[8];\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.getConnectedValue(state) as number;\r\n particleSystem.manualEmitCount = this.manualEmitCount;\r\n particleSystem.updateSpeed = this.updateSpeed;\r\n particleSystem.preWarmCycles = this.preWarmCycles;\r\n particleSystem.preWarmStepOffset = this.preWarmStepOffset;\r\n particleSystem.blendMode = this.blendMode;\r\n particleSystem.name = this.name;\r\n particleSystem._targetStopDuration = (this.targetStopDuration.getConnectedValue(state) as number) ?? 0;\r\n particleSystem.startDelay = this.startDelay;\r\n particleSystem.isBillboardBased = this.isBillboardBased;\r\n particleSystem.billboardMode = this.billBoardMode;\r\n particleSystem.translationPivot = (this.translationPivot.getConnectedValue(state) as Vector2) || Vector2.Zero();\r\n particleSystem.textureMask = this.textureMask.getConnectedValue(state) ?? new Color4(1, 1, 1, 1);\r\n particleSystem.isLocal = this.isLocal;\r\n particleSystem.disposeOnStop = this.disposeOnStop;\r\n\r\n // The emit rate can vary if it is connected to another block like a gradient\r\n particleSystem._calculateEmitRate = () => {\r\n state.systemContext = particleSystem;\r\n return this.emitRate.getConnectedValue(state) as number;\r\n };\r\n\r\n // Get the ramp gradients\r\n particleSystem.useRampGradients = false;\r\n if (this.rampGradient.isConnected) {\r\n if (this.rampGradient.connectedPoint?.ownerBlock instanceof ParticleGradientBlock) {\r\n // We have a possible gradient, loop through its entries\r\n const gradientInputs = this.rampGradient.connectedPoint?.ownerBlock.inputs;\r\n\r\n // Skip the first input which is the gradient selector, and we only care about the gradient values\r\n for (let i = 1; i < gradientInputs.length; i++) {\r\n if (gradientInputs[i].isConnected) {\r\n const rampEntry = gradientInputs[i].connectedPoint?.ownerBlock as ParticleGradientValueBlock;\r\n const color = rampEntry._inputs[0].getConnectedValue(state) as Color4;\r\n particleSystem.addRampGradient(rampEntry.reference, new Color3(color.r, color.g, color.b));\r\n particleSystem.useRampGradients = true;\r\n }\r\n }\r\n } else {\r\n // We have a single value, add it as ramp gradient\r\n const color = this.rampGradient.getConnectedValue(state) as Color4;\r\n particleSystem.addRampGradient(0, new Color3(color.r, color.g, color.b));\r\n particleSystem.useRampGradients = true;\r\n }\r\n }\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 /**\r\n * Serializes the system block\r\n * @returns The serialized object\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.manualEmitCount = this.manualEmitCount;\r\n serializationObject.blendMode = this.blendMode;\r\n serializationObject.updateSpeed = this.updateSpeed;\r\n serializationObject.preWarmCycles = this.preWarmCycles;\r\n serializationObject.preWarmStepOffset = this.preWarmStepOffset;\r\n serializationObject.isBillboardBased = this.isBillboardBased;\r\n serializationObject.billBoardMode = this.billBoardMode;\r\n serializationObject.isLocal = this.isLocal;\r\n serializationObject.disposeOnStop = this.disposeOnStop;\r\n serializationObject.doNoStart = this.doNoStart;\r\n serializationObject.startDelay = this.startDelay;\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Deserializes the system block\r\n * @param serializationObject The serialized system\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.manualEmitCount = serializationObject.manualEmitCount ?? -1;\r\n this.updateSpeed = serializationObject.updateSpeed ?? 0.0167;\r\n this.preWarmCycles = serializationObject.preWarmCycles ?? 0;\r\n this.preWarmStepOffset = serializationObject.preWarmStepOffset ?? 0;\r\n this.isBillboardBased = serializationObject.isBillboardBased ?? true;\r\n this.billBoardMode = serializationObject.billBoardMode ?? Constants.PARTICLES_BILLBOARDMODE_ALL;\r\n this.isLocal = serializationObject.isLocal ?? false;\r\n this.disposeOnStop = serializationObject.disposeOnStop ?? false;\r\n this.doNoStart = !!serializationObject.doNoStart;\r\n\r\n if (serializationObject.emitRate !== undefined) {\r\n this.emitRate.value = serializationObject.emitRate;\r\n }\r\n\r\n if (serializationObject.blendMode !== undefined) {\r\n this.blendMode = serializationObject.blendMode;\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"]}
1
+ {"version":3,"file":"systemBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Particles/Node/Blocks/systemBlock.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAA0B,6CAAsC;AAC/F,OAAO,EAAE,aAAa,EAAE,mCAA4B;AACpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,sCAA+B;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,qCAA8B;AACvD,OAAO,EAAE,kBAAkB,EAAE,oCAA0C;AACvE,OAAO,EAAE,iBAAiB,EAAE,gCAA8C;AAC1E,OAAO,EAAE,kBAAkB,EAAE,mCAAyD;AACtF,OAAO,EAAE,qCAAqC,EAAE,0DAAwE;AACxH,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,iBAAiB;IAiG9C;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAnGhB;;WAEG;QAYI,cAAS,GAAG,kBAAkB,CAAC,gBAAgB,CAAC;QAEvD;;WAEG;QAEI,aAAQ,GAAG,IAAI,CAAC;QAEvB;;WAEG;QAEI,oBAAe,GAAG,CAAC,CAAC,CAAC;QAE5B;;WAEG;QAEI,eAAU,GAAG,CAAC,CAAC;QAEtB;;WAEG;QAEI,gBAAW,GAAG,MAAM,CAAC;QAE5B;;WAEG;QAEI,kBAAa,GAAG,CAAC,CAAC;QAEzB;;WAEG;QAEI,sBAAiB,GAAG,CAAC,CAAC;QAE7B;;WAEG;QAEI,qBAAgB,GAAG,IAAI,CAAC;QAE/B;;WAEG;QAWI,kBAAa,GAAG,SAAS,CAAC,2B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E,KAAK,EAAE,SAAS,CAAC,uCAAuC,EAAE;SACxG;KACJ,CAAC;kDAC2D;AAMtD;IADN,sBAAsB,CAAC,UAAU,0CAAkC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;4CAC1G;AAMhB;IADN,sBAAsB,CAAC,iBAAiB,0CAAkC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;kDAC3G;AAMtB;IADN,sBAAsB,CAAC,aAAa,0CAAkC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;8CAC3G;AA8Q7B,aAAa,CAAC,qBAAqB,EAAE,WAAW,CAAC,CAAC","sourcesContent":["import type { ParticleSystem } from \"core/Particles/particleSystem\";\r\nimport type { NodeParticleConnectionPoint } from \"core/Particles/Node/nodeParticleBlockConnectionPoint\";\r\nimport type { NodeParticleBuildState } from \"core/Particles/Node/nodeParticleBuildState\";\r\nimport type { ParticleGradientValueBlock } from \"./particleGradientValueBlock\";\r\n\r\nimport { Constants } from \"../../../Engines/constants\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"core/Decorators/nodeDecorator\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport { Vector2, Vector3 } from \"core/Maths/math.vector\";\r\nimport { Color3, Color4 } from \"core/Maths/math.color\";\r\nimport { BaseParticleSystem } from \"core/Particles/baseParticleSystem\";\r\nimport { NodeParticleBlock } from \"core/Particles/Node/nodeParticleBlock\";\r\nimport { _TriggerSubEmitter } from \"core/Particles/Node/Blocks/Triggers/triggerTools\";\r\nimport { NodeParticleBlockConnectionPointTypes } from \"core/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes\";\r\nimport { ParticleGradientBlock } from \"./particleGradientBlock\";\r\n\r\n/**\r\n * Block used to get a system of particles\r\n */\r\nexport class SystemBlock extends NodeParticleBlock {\r\n private static _IdCounter = 0;\r\n\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: \"Blend Mode OneOne\", value: BaseParticleSystem.BLENDMODE_ONEONE },\r\n { label: \"Blend Mode Standard\", value: BaseParticleSystem.BLENDMODE_STANDARD },\r\n { label: \"Blend Mode Add\", value: BaseParticleSystem.BLENDMODE_ADD },\r\n { label: \"Blend Mode Multiply\", value: BaseParticleSystem.BLENDMODE_MULTIPLY },\r\n { label: \"Blend Mode 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 manual emit count\r\n */\r\n @editableInPropertyPage(\"Manual emit count\", PropertyTypeForEdition.Int, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: -1 })\r\n public manualEmitCount = -1;\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 the target stop duration for the particle system\r\n */\r\n @editableInPropertyPage(\"updateSpeed\", PropertyTypeForEdition.Float, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0, max: 0.1 })\r\n public updateSpeed = 0.0167;\r\n\r\n /**\r\n * Gets or sets the number of pre-warm cycles before rendering the particle system\r\n */\r\n @editableInPropertyPage(\"Pre-warm cycles\", PropertyTypeForEdition.Float, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0 })\r\n public preWarmCycles = 0;\r\n\r\n /**\r\n * Gets or sets the time step multiplier used for pre-warm\r\n */\r\n @editableInPropertyPage(\"Pre-warm step multiplier\", PropertyTypeForEdition.Float, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true }, min: 0 })\r\n public preWarmStepOffset = 0;\r\n\r\n /**\r\n * Gets or sets a boolean indicating if the system is billboard based\r\n */\r\n @editableInPropertyPage(\"Is billboard based\", PropertyTypeForEdition.Boolean, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true } })\r\n public isBillboardBased = true;\r\n\r\n /**\r\n * Gets or sets the billboard mode for the particle system\r\n */\r\n @editableInPropertyPage(\"Billboard mode\", PropertyTypeForEdition.List, \"ADVANCED\", {\r\n notifiers: { rebuild: true },\r\n embedded: true,\r\n options: [\r\n { label: \"Billboard Mode All\", value: Constants.PARTICLES_BILLBOARDMODE_ALL },\r\n { label: \"Billboard Mode Y\", value: Constants.PARTICLES_BILLBOARDMODE_Y },\r\n { label: \"Billboard Mode Stretched\", value: Constants.PARTICLES_BILLBOARDMODE_STRETCHED },\r\n { label: \"Billboard Mode Stretched Local\", value: Constants.PARTICLES_BILLBOARDMODE_STRETCHED_LOCAL },\r\n ],\r\n })\r\n public billBoardMode = Constants.PARTICLES_BILLBOARDMODE_ALL;\r\n\r\n /**\r\n * Gets or sets a boolean indicating if the system coordinate space is local or global\r\n */\r\n @editableInPropertyPage(\"Is local\", PropertyTypeForEdition.Boolean, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true } })\r\n public isLocal = false;\r\n\r\n /**\r\n * Gets or sets a boolean indicating if the system should be disposed when stopped\r\n */\r\n @editableInPropertyPage(\"Dispose on stop\", PropertyTypeForEdition.Boolean, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true } })\r\n public disposeOnStop = false;\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 /** @internal */\r\n public _internalId = SystemBlock._IdCounter++;\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(\"emitRate\", NodeParticleBlockConnectionPointTypes.Int, true, 10, 0);\r\n this.registerInput(\"texture\", NodeParticleBlockConnectionPointTypes.Texture);\r\n this.registerInput(\"translationPivot\", NodeParticleBlockConnectionPointTypes.Vector2, true);\r\n this.registerInput(\"textureMask\", NodeParticleBlockConnectionPointTypes.Color4, true);\r\n this.registerInput(\"targetStopDuration\", NodeParticleBlockConnectionPointTypes.Float, true, 0, 0);\r\n this.registerInput(\"onStart\", NodeParticleBlockConnectionPointTypes.System, true);\r\n this.registerInput(\"onEnd\", NodeParticleBlockConnectionPointTypes.System, true);\r\n this.registerInput(\"rampGradient\", NodeParticleBlockConnectionPointTypes.Color4, true);\r\n this.registerInput(\"emitterPosition\", NodeParticleBlockConnectionPointTypes.Vector3, true, Vector3.Zero());\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 emitRate input component\r\n */\r\n public get emitRate(): NodeParticleConnectionPoint {\r\n return this._inputs[1];\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[2];\r\n }\r\n\r\n /**\r\n * Gets the translationPivot input component\r\n */\r\n public get translationPivot(): NodeParticleConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the textureMask input component\r\n */\r\n public get textureMask(): NodeParticleConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n /**\r\n * Gets the targetStopDuration input component\r\n */\r\n public get targetStopDuration(): NodeParticleConnectionPoint {\r\n return this._inputs[5];\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[6];\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[7];\r\n }\r\n\r\n /**\r\n * Gets the rampGradient input component\r\n */\r\n public get rampGradient(): NodeParticleConnectionPoint {\r\n return this._inputs[8];\r\n }\r\n\r\n /**\r\n * Gets the emitterPosition input component\r\n */\r\n public get emitterPosition(): NodeParticleConnectionPoint {\r\n return this._inputs[9];\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.getConnectedValue(state) as number;\r\n particleSystem.manualEmitCount = this.manualEmitCount;\r\n particleSystem.updateSpeed = this.updateSpeed;\r\n particleSystem.preWarmCycles = this.preWarmCycles;\r\n particleSystem.preWarmStepOffset = this.preWarmStepOffset;\r\n particleSystem.blendMode = this.blendMode;\r\n particleSystem.name = this.name;\r\n particleSystem._targetStopDuration = (this.targetStopDuration.getConnectedValue(state) as number) ?? 0;\r\n particleSystem.startDelay = this.startDelay;\r\n particleSystem.isBillboardBased = this.isBillboardBased;\r\n particleSystem.billboardMode = this.billBoardMode;\r\n particleSystem.translationPivot = (this.translationPivot.getConnectedValue(state) as Vector2) || Vector2.Zero();\r\n particleSystem.textureMask = this.textureMask.getConnectedValue(state) ?? new Color4(1, 1, 1, 1);\r\n particleSystem.isLocal = this.isLocal;\r\n particleSystem.disposeOnStop = this.disposeOnStop;\r\n particleSystem.emitter = (this.emitterPosition.getConnectedValue(state) as Vector3) ?? Vector3.Zero();\r\n\r\n // The emit rate can vary if it is connected to another block like a gradient\r\n particleSystem._calculateEmitRate = () => {\r\n state.systemContext = particleSystem;\r\n return this.emitRate.getConnectedValue(state) as number;\r\n };\r\n\r\n // Get the ramp gradients\r\n particleSystem.useRampGradients = false;\r\n if (this.rampGradient.isConnected) {\r\n if (this.rampGradient.connectedPoint?.ownerBlock instanceof ParticleGradientBlock) {\r\n // We have a possible gradient, loop through its entries\r\n const gradientInputs = this.rampGradient.connectedPoint?.ownerBlock.inputs;\r\n\r\n // Skip the first input which is the gradient selector, and we only care about the gradient values\r\n for (let i = 1; i < gradientInputs.length; i++) {\r\n if (gradientInputs[i].isConnected) {\r\n const rampEntry = gradientInputs[i].connectedPoint?.ownerBlock as ParticleGradientValueBlock;\r\n const color = rampEntry._inputs[0].getConnectedValue(state) as Color4;\r\n particleSystem.addRampGradient(rampEntry.reference, new Color3(color.r, color.g, color.b));\r\n particleSystem.useRampGradients = true;\r\n }\r\n }\r\n } else {\r\n // We have a single value, add it as ramp gradient\r\n const color = this.rampGradient.getConnectedValue(state) as Color4;\r\n particleSystem.addRampGradient(0, new Color3(color.r, color.g, color.b));\r\n particleSystem.useRampGradients = true;\r\n }\r\n }\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 /**\r\n * Serializes the system block\r\n * @returns The serialized object\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.manualEmitCount = this.manualEmitCount;\r\n serializationObject.blendMode = this.blendMode;\r\n serializationObject.updateSpeed = this.updateSpeed;\r\n serializationObject.preWarmCycles = this.preWarmCycles;\r\n serializationObject.preWarmStepOffset = this.preWarmStepOffset;\r\n serializationObject.isBillboardBased = this.isBillboardBased;\r\n serializationObject.billBoardMode = this.billBoardMode;\r\n serializationObject.isLocal = this.isLocal;\r\n serializationObject.disposeOnStop = this.disposeOnStop;\r\n serializationObject.doNoStart = this.doNoStart;\r\n serializationObject.startDelay = this.startDelay;\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Deserializes the system block\r\n * @param serializationObject The serialized system\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.manualEmitCount = serializationObject.manualEmitCount ?? -1;\r\n this.updateSpeed = serializationObject.updateSpeed ?? 0.0167;\r\n this.preWarmCycles = serializationObject.preWarmCycles ?? 0;\r\n this.preWarmStepOffset = serializationObject.preWarmStepOffset ?? 0;\r\n this.isBillboardBased = serializationObject.isBillboardBased ?? true;\r\n this.billBoardMode = serializationObject.billBoardMode ?? Constants.PARTICLES_BILLBOARDMODE_ALL;\r\n this.isLocal = serializationObject.isLocal ?? false;\r\n this.disposeOnStop = serializationObject.disposeOnStop ?? false;\r\n this.doNoStart = !!serializationObject.doNoStart;\r\n\r\n if (serializationObject.emitRate !== undefined) {\r\n this.emitRate.value = serializationObject.emitRate;\r\n }\r\n\r\n if (serializationObject.blendMode !== undefined) {\r\n this.blendMode = serializationObject.blendMode;\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"]}
@@ -1,5 +1,6 @@
1
1
  import { Color4 } from "../../Maths/math.color.js";
2
2
  import { Vector2, Vector3 } from "../../Maths/math.vector.js";
3
+ import { AbstractMesh } from "../../Meshes/abstractMesh.js";
3
4
  import { FactorGradient } from "../../Misc/gradients.js";
4
5
  import { NodeParticleBlockConnectionPointTypes } from "./Enums/nodeParticleBlockConnectionPointTypes.js";
5
6
  import { NodeParticleSystemSet } from "./nodeParticleSystemSet.js";
@@ -27,12 +28,15 @@ import { SetupSpriteSheetBlock } from "./Blocks/Emitters/setupSpriteSheetBlock.j
27
28
  import { SphereShapeBlock } from "./Blocks/Emitters/sphereShapeBlock.js";
28
29
  import { UpdateAngleBlock } from "./Blocks/Update/updateAngleBlock.js";
29
30
  import { BasicSpriteUpdateBlock } from "./Blocks/Update/basicSpriteUpdateBlock.js";
31
+ import { UpdateAttractorBlock } from "./Blocks/Update/updateAttractorBlock.js";
30
32
  import { UpdateColorBlock } from "./Blocks/Update/updateColorBlock.js";
31
33
  import { UpdateDirectionBlock } from "./Blocks/Update/updateDirectionBlock.js";
34
+ import { UpdateFlowMapBlock } from "./Blocks/Update/updateFlowMapBlock.js";
32
35
  import { UpdateNoiseBlock } from "./Blocks/Update/updateNoiseBlock.js";
33
36
  import { UpdatePositionBlock } from "./Blocks/Update/updatePositionBlock.js";
34
37
  import { UpdateSizeBlock } from "./Blocks/Update/updateSizeBlock.js";
35
38
  import { UpdateRemapBlock } from "./Blocks/Update/updateRemapBlock.js";
39
+ import { GenerateBase64StringFromPixelData } from "../../Misc/copyTools.js";
36
40
  /**
37
41
  * Converts a ParticleSystem to a NodeParticleSystemSet.
38
42
  * @param name The name of the node particle system set.
@@ -368,6 +372,12 @@ function _UpdateParticleBlockGroup(inputParticle, oldSystem, context) {
368
372
  context.scaledDirection = _UpdateParticleDragGradientBlockGroup(oldSystem._dragGradients, context);
369
373
  }
370
374
  updatedParticle = _UpdateParticlePositionBlockGroup(updatedParticle, oldSystem.isLocal, context);
375
+ if (oldSystem.attractors && oldSystem.attractors.length > 0) {
376
+ updatedParticle = _UpdateParticleAttractorBlockGroup(updatedParticle, oldSystem.attractors);
377
+ }
378
+ if (oldSystem.flowMap) {
379
+ updatedParticle = _UpdateParticleFlowMapBlockGroup(updatedParticle, oldSystem.flowMap, oldSystem.flowMapStrength);
380
+ }
371
381
  if (oldSystem._limitVelocityGradients && oldSystem._limitVelocityGradients.length > 0 && oldSystem.limitVelocityDamping !== 0) {
372
382
  updatedParticle = _UpdateParticleVelocityLimitGradientBlockGroup(updatedParticle, oldSystem._limitVelocityGradients, oldSystem.limitVelocityDamping, context);
373
383
  }
@@ -582,6 +592,46 @@ function _UpdateParticlePositionBlockGroup(inputParticle, isLocal, context) {
582
592
  }
583
593
  return updatePosition.output;
584
594
  }
595
+ /**
596
+ * Creates the group of blocks that represent the particle attractor update
597
+ * @param inputParticle The input particle to update
598
+ * @param attractors The attractors (if any)
599
+ * @returns The output of the group of blocks that represent the particle attractor update
600
+ */
601
+ function _UpdateParticleAttractorBlockGroup(inputParticle, attractors) {
602
+ let outputParticle = inputParticle;
603
+ // Chain update attractor blocks for each attractor
604
+ for (let i = 0; i < attractors.length; i++) {
605
+ const attractor = attractors[i];
606
+ const attractorBlock = new UpdateAttractorBlock(`Attractor Block ${i}`);
607
+ outputParticle.connectTo(attractorBlock.particle);
608
+ _CreateAndConnectInput("Attractor Position", attractor.position.clone(), attractorBlock.attractor);
609
+ _CreateAndConnectInput("Attractor Strength", attractor.strength, attractorBlock.strength);
610
+ outputParticle = attractorBlock.output;
611
+ }
612
+ return outputParticle;
613
+ }
614
+ /**
615
+ * Creates the group of blocks that represent the particle flow map update
616
+ * @param inputParticle The input particle to update
617
+ * @param flowMap The flow map data
618
+ * @param flowMapStrength The strength of the flow map
619
+ * @returns The output of the group of blocks that represent the particle flow map update
620
+ */
621
+ function _UpdateParticleFlowMapBlockGroup(inputParticle, flowMap, flowMapStrength) {
622
+ // Create the flow map update block
623
+ const updateFlowMapBlock = new UpdateFlowMapBlock("Flow Map Update");
624
+ inputParticle.connectTo(updateFlowMapBlock.particle);
625
+ // Create a texture block from the flow map data
626
+ // The FlowMap only stores raw pixel data, so we need to convert it to a base64 data URL
627
+ // Y has to be flipped as the texture data is flipped between CPU (canvas, Y=0 at top) and GPU (texture, Y=0 at bottom)
628
+ const flowMapTextureBlock = new ParticleTextureSourceBlock("Flow Map Texture");
629
+ flowMapTextureBlock.serializedCachedData = true;
630
+ flowMapTextureBlock.textureDataUrl = GenerateBase64StringFromPixelData(flowMap.data, { width: flowMap.width, height: flowMap.height }, true) ?? "";
631
+ flowMapTextureBlock.texture.connectTo(updateFlowMapBlock.flowMap);
632
+ _CreateAndConnectInput("Flow Map Strength", flowMapStrength, updateFlowMapBlock.strength);
633
+ return updateFlowMapBlock.output;
634
+ }
585
635
  /**
586
636
  * Creates the group of blocks that represent the particle size update
587
637
  * @param inputParticle The input particle to update
@@ -751,19 +801,27 @@ function _SystemBlockGroup(updateParticleOutput, oldSystem, context) {
751
801
  newSystem.billBoardMode = oldSystem.billboardMode;
752
802
  newSystem.isLocal = oldSystem.isLocal;
753
803
  newSystem.disposeOnStop = oldSystem.disposeOnStop;
754
- _SystemEmitRateValue(oldSystem.getEmitRateGradients(), oldSystem.targetStopDuration, oldSystem.emitRate, newSystem, context);
755
- const texture = oldSystem.particleTexture;
756
- if (texture) {
757
- _CreateTextureBlock(texture).connectTo(newSystem.texture);
804
+ if (oldSystem.emitter) {
805
+ _SystemEmitterPosition(oldSystem.emitter, newSystem);
758
806
  }
807
+ _SystemEmitRateValue(oldSystem.getEmitRateGradients(), oldSystem.targetStopDuration, oldSystem.emitRate, newSystem, context);
759
808
  _SystemTargetStopDuration(oldSystem.targetStopDuration, newSystem, context);
760
809
  const rampGradients = oldSystem.getRampGradients();
761
810
  if (rampGradients && rampGradients.length > 0) {
762
811
  _SystemRampGradientsBlockGroup(rampGradients, newSystem);
763
812
  }
813
+ const texture = oldSystem.particleTexture;
814
+ if (texture) {
815
+ _CreateTextureBlock(texture).connectTo(newSystem.texture);
816
+ }
764
817
  updateParticleOutput.connectTo(newSystem.particle);
765
818
  return newSystem;
766
819
  }
820
+ function _SystemEmitterPosition(emitter, newSystem) {
821
+ if (emitter) {
822
+ _CreateAndConnectInput("Emitter Position", emitter instanceof AbstractMesh ? emitter.position.clone() : emitter.clone(), newSystem.emitterPosition, NodeParticleBlockConnectionPointTypes.Vector3);
823
+ }
824
+ }
767
825
  function _SystemEmitRateValue(emitGradients, targetStopDuration, emitRate, newSystem, context) {
768
826
  if (emitGradients && emitGradients.length > 0 && targetStopDuration > 0) {
769
827
  // Create the emit gradients