@babylonjs/core 8.45.3 → 8.45.4

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 (53) hide show
  1. package/Cameras/touchCamera.js +1 -1
  2. package/Cameras/touchCamera.js.map +1 -1
  3. package/Engines/Native/nativeHelpers.js +7 -0
  4. package/Engines/Native/nativeHelpers.js.map +1 -1
  5. package/Engines/Native/nativeInterfaces.d.ts +2 -0
  6. package/Engines/Native/nativeInterfaces.js.map +1 -1
  7. package/Engines/abstractEngine.js +2 -2
  8. package/Engines/abstractEngine.js.map +1 -1
  9. package/FrameGraph/Node/nodeRenderGraph.d.ts +0 -5
  10. package/FrameGraph/Node/nodeRenderGraph.js +0 -7
  11. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  12. package/FrameGraph/frameGraph.d.ts +0 -6
  13. package/FrameGraph/frameGraph.js +0 -23
  14. package/FrameGraph/frameGraph.js.map +1 -1
  15. package/FrameGraph/frameGraphObjectList.d.ts +0 -1
  16. package/FrameGraph/frameGraphObjectList.js +0 -1
  17. package/FrameGraph/frameGraphObjectList.js.map +1 -1
  18. package/FrameGraph/frameGraphRenderContext.d.ts +0 -1
  19. package/FrameGraph/frameGraphRenderContext.js +0 -1
  20. package/FrameGraph/frameGraphRenderContext.js.map +1 -1
  21. package/FrameGraph/frameGraphRenderTarget.d.ts +0 -1
  22. package/FrameGraph/frameGraphRenderTarget.js +0 -1
  23. package/FrameGraph/frameGraphRenderTarget.js.map +1 -1
  24. package/FrameGraph/frameGraphTask.d.ts +0 -1
  25. package/FrameGraph/frameGraphTask.js +0 -1
  26. package/FrameGraph/frameGraphTask.js.map +1 -1
  27. package/FrameGraph/frameGraphTextureManager.d.ts +0 -1
  28. package/FrameGraph/frameGraphTextureManager.js +0 -1
  29. package/FrameGraph/frameGraphTextureManager.js.map +1 -1
  30. package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +6 -0
  31. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +100 -41
  32. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  33. package/Particles/Node/Blocks/Update/updateFlowMapBlock.d.ts +4 -14
  34. package/Particles/Node/Blocks/Update/updateFlowMapBlock.js +9 -27
  35. package/Particles/Node/Blocks/Update/updateFlowMapBlock.js.map +1 -1
  36. package/Particles/Node/Blocks/particleVectorMathBlock.d.ts +3 -7
  37. package/Particles/Node/Blocks/particleVectorMathBlock.js +15 -32
  38. package/Particles/Node/Blocks/particleVectorMathBlock.js.map +1 -1
  39. package/Particles/Node/Blocks/systemBlock.d.ts +4 -0
  40. package/Particles/Node/Blocks/systemBlock.js +9 -1
  41. package/Particles/Node/Blocks/systemBlock.js.map +1 -1
  42. package/Particles/Node/nodeParticleSystemSet.helper.js +62 -4
  43. package/Particles/Node/nodeParticleSystemSet.helper.js.map +1 -1
  44. package/Particles/baseParticleSystem.d.ts +7 -0
  45. package/Particles/baseParticleSystem.js +7 -0
  46. package/Particles/baseParticleSystem.js.map +1 -1
  47. package/Particles/particleSystem.d.ts +12 -0
  48. package/Particles/particleSystem.js +12 -0
  49. package/Particles/particleSystem.js.map +1 -1
  50. package/Particles/thinParticleSystem.d.ts +10 -0
  51. package/Particles/thinParticleSystem.js +10 -1
  52. package/Particles/thinParticleSystem.js.map +1 -1
  53. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"baseParticleSystem.js","sourceRoot":"","sources":["../../../../dev/core/src/Particles/baseParticleSystem.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGxD,OAAO,EAAE,mCAAmC,EAAE,MAAM,mDAAmD,CAAC;AAGxG,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,OAAO,4CAA4C,CAAC;AAapD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAA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,GAAG,CAAC,AAAJ,CAAK;AACrC;;GAEG;AACW,wCAAqB,GAAG,CAAC,AAAJ,CAAK;AACxC;;;GAGG;AACW,qCAAkB,GAAG,CAAC,CAAC,AAAL,CAAM;AAi1B1C,sBAAsB;AACtB,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"../types\";\r\nimport { Vector2, Vector3 } from \"../Maths/math.vector\";\r\nimport type { AbstractMesh } from \"../Meshes/abstractMesh\";\r\nimport type { ImageProcessingConfiguration } from \"../Materials/imageProcessingConfiguration\";\r\nimport { ImageProcessingConfigurationDefines } from \"../Materials/imageProcessingConfiguration.defines\";\r\nimport type { ColorGradient, FactorGradient, Color3Gradient, IValueGradient } from \"../Misc/gradients\";\r\nimport type { BoxParticleEmitter } from \"../Particles/EmitterTypes/boxParticleEmitter\";\r\nimport { Constants } from \"../Engines/constants\";\r\nimport type { BaseTexture } from \"../Materials/Textures/baseTexture\";\r\nimport { Color4 } from \"../Maths/math.color\";\r\nimport type { AbstractEngine } from \"../Engines/abstractEngine\";\r\n\r\nimport \"../Engines/Extensions/engine.dynamicBuffer\";\r\nimport type { IClipPlanesHolder } from \"../Misc/interfaces/iClipPlanesHolder\";\r\nimport type { Plane } from \"../Maths/math.plane\";\r\nimport type { Animation } from \"../Animations/animation\";\r\nimport type { Scene } from \"../scene\";\r\nimport type { ProceduralTexture } from \"../Materials/Textures/Procedurals/proceduralTexture\";\r\nimport type { RawTexture } from \"../Materials/Textures/rawTexture\";\r\nimport type { IParticleEmitterType } from \"./EmitterTypes/IParticleEmitterType\";\r\nimport type { PointParticleEmitter } from \"./EmitterTypes/pointParticleEmitter\";\r\nimport type { HemisphericParticleEmitter } from \"./EmitterTypes/hemisphericParticleEmitter\";\r\nimport type { SphereDirectedParticleEmitter, SphereParticleEmitter } from \"./EmitterTypes/sphereParticleEmitter\";\r\nimport type { CylinderDirectedParticleEmitter, CylinderParticleEmitter } from \"./EmitterTypes/cylinderParticleEmitter\";\r\nimport type { ConeDirectedParticleEmitter, ConeParticleEmitter } from \"./EmitterTypes/coneParticleEmitter\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\n\r\n/**\r\n * This represents the base class for particle system in Babylon.\r\n * Particles are often small sprites used to simulate hard-to-reproduce phenomena like fire, smoke, water, or abstract visual effects like magic glitter and faery dust.\r\n * Particles can take different shapes while emitted like box, sphere, cone or you can write your custom function.\r\n * @example https://doc.babylonjs.com/features/featuresDeepDive/particles/particle_system/particle_system_intro\r\n */\r\nexport class BaseParticleSystem implements IClipPlanesHolder {\r\n /**\r\n * Source color is added to the destination color without alpha affecting the result. Great for additive glow effects (fire, magic, lasers)\r\n */\r\n public static BLENDMODE_ONEONE = 0;\r\n /**\r\n * Blend current color and particle color using particle’s alpha. Same as Constants.ALPHA_COMBINE, the go-to for transparency. 100% alpha means source, 0% alpha means background. Glass, UI fade, smoke\r\n */\r\n public static BLENDMODE_STANDARD = 1;\r\n /**\r\n * Add current color and particle color multiplied by particle’s alpha\r\n */\r\n public static BLENDMODE_ADD = 2;\r\n /**\r\n * Multiply current color with particle color\r\n */\r\n public static BLENDMODE_MULTIPLY = 3;\r\n /**\r\n * Multiply current color with particle color then add current color and particle color multiplied by particle’s alpha\r\n */\r\n public static BLENDMODE_MULTIPLYADD = 4;\r\n /**\r\n * Subtracts source (particle) from destination (current color), leading to darker results\r\n * - NOTE: Init as -1 so we can properly map all modes to Engine Const's (otherwise ALPHA_SUBTRACT will conflict with BLENDMODE_MULTIPLY since both use 3)\r\n */\r\n public static BLENDMODE_SUBTRACT = -1;\r\n\r\n /**\r\n * List of animations used by the particle system.\r\n */\r\n public animations: Animation[] = [];\r\n\r\n /**\r\n * Gets or sets the unique id of the particle system\r\n */\r\n public uniqueId: number;\r\n\r\n /**\r\n * The id of the Particle system.\r\n */\r\n public id: string;\r\n\r\n /**\r\n * The friendly name of the Particle system.\r\n */\r\n public name: string;\r\n\r\n /**\r\n * Snippet ID if the particle system was created from the snippet server\r\n */\r\n public snippetId: string;\r\n\r\n /**\r\n * The rendering group used by the Particle system to chose when to render.\r\n */\r\n public renderingGroupId = 0;\r\n\r\n /**\r\n * The emitter represents the Mesh or position we are attaching the particle system to.\r\n */\r\n public emitter: Nullable<AbstractMesh | Vector3> = Vector3.Zero();\r\n\r\n /**\r\n * The maximum number of particles to emit per frame\r\n */\r\n public emitRate = 10;\r\n\r\n /**\r\n * If you want to launch only a few particles at once, that can be done, as well.\r\n */\r\n public manualEmitCount = -1;\r\n\r\n /**\r\n * The overall motion speed (0.01 is default update speed, faster updates = faster animation)\r\n */\r\n public updateSpeed = 0.01;\r\n\r\n /** @internal */\r\n public _targetStopDuration = 0;\r\n /**\r\n * The amount of time the particle system is running (depends of the overall update speed).\r\n */\r\n public get targetStopDuration() {\r\n return this._targetStopDuration;\r\n }\r\n\r\n public set targetStopDuration(value: number) {\r\n if (this._targetStopDuration === value) {\r\n return;\r\n }\r\n\r\n this._targetStopDuration = value;\r\n }\r\n\r\n /**\r\n * Specifies whether the particle system will be disposed once it reaches the end of the animation.\r\n */\r\n public disposeOnStop = false;\r\n\r\n /**\r\n * Minimum power of emitting particles.\r\n */\r\n public minEmitPower = 1;\r\n /**\r\n * Maximum power of emitting particles.\r\n */\r\n public maxEmitPower = 1;\r\n\r\n /**\r\n * Minimum life time of emitting particles.\r\n */\r\n public minLifeTime = 1;\r\n /**\r\n * Maximum life time of emitting particles.\r\n */\r\n public maxLifeTime = 1;\r\n\r\n /**\r\n * Minimum Size of emitting particles.\r\n */\r\n public minSize = 1;\r\n /**\r\n * Maximum Size of emitting particles.\r\n */\r\n public maxSize = 1;\r\n\r\n /**\r\n * Minimum scale of emitting particles on X axis.\r\n */\r\n public minScaleX = 1;\r\n /**\r\n * Maximum scale of emitting particles on X axis.\r\n */\r\n public maxScaleX = 1;\r\n\r\n /**\r\n * Minimum scale of emitting particles on Y axis.\r\n */\r\n public minScaleY = 1;\r\n /**\r\n * Maximum scale of emitting particles on Y axis.\r\n */\r\n public maxScaleY = 1;\r\n\r\n /**\r\n * Gets or sets the minimal initial rotation in radians.\r\n */\r\n public minInitialRotation = 0;\r\n /**\r\n * Gets or sets the maximal initial rotation in radians.\r\n */\r\n public maxInitialRotation = 0;\r\n\r\n /**\r\n * Minimum angular speed of emitting particles (Z-axis rotation for each particle).\r\n */\r\n public minAngularSpeed = 0;\r\n /**\r\n * Maximum angular speed of emitting particles (Z-axis rotation for each particle).\r\n */\r\n public maxAngularSpeed = 0;\r\n\r\n /**\r\n * The texture used to render each particle. (this can be a spritesheet)\r\n */\r\n public particleTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * The layer mask we are rendering the particles through.\r\n */\r\n public layerMask: number = 0x0fffffff;\r\n\r\n /**\r\n * This can help using your own shader to render the particle system.\r\n * The according effect will be created\r\n */\r\n public customShader: any = null;\r\n\r\n /**\r\n * By default particle system starts as soon as they are created. This prevents the\r\n * automatic start to happen and let you decide when to start emitting particles.\r\n */\r\n public preventAutoStart: boolean = false;\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this particle system will allow fog to be rendered on it (false by default)\r\n */\r\n public applyFog = false;\r\n\r\n /** @internal */\r\n _wasDispatched = false;\r\n\r\n protected _rootUrl = \"\";\r\n protected _noiseTexture: Nullable<ProceduralTexture>;\r\n\r\n /**\r\n * Returns true if the particle system was generated by a node particle system set\r\n */\r\n public get isNodeGenerated(): boolean {\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets or sets a texture used to add random noise to particle positions\r\n */\r\n public get noiseTexture(): Nullable<ProceduralTexture> {\r\n return this._noiseTexture;\r\n }\r\n\r\n public set noiseTexture(value: Nullable<ProceduralTexture>) {\r\n if (this._noiseTexture === value) {\r\n return;\r\n }\r\n\r\n this._noiseTexture = value;\r\n this._reset();\r\n }\r\n\r\n /** Gets or sets the strength to apply to the noise value (default is (10, 10, 10)) */\r\n public noiseStrength = new Vector3(10, 10, 10);\r\n\r\n /**\r\n * Callback triggered when the particle animation is ending.\r\n */\r\n public onAnimationEnd: Nullable<() => void> = null;\r\n\r\n /**\r\n * Blend mode use to render the particle\r\n * For original blend modes which are exposed from ParticleSystem (OneOne, Standard, Add, Multiply, MultiplyAdd, and Subtract), use ParticleSystem.BLENDMODE_FOO\r\n * For all other blend modes, use Engine Constants.ALPHA_FOO blend modes\r\n */\r\n public blendMode = BaseParticleSystem.BLENDMODE_ONEONE;\r\n\r\n /**\r\n * Forces the particle to write their depth information to the depth buffer. This can help preventing other draw calls\r\n * to override the particles.\r\n */\r\n public forceDepthWrite = false;\r\n\r\n /** Gets or sets a value indicating how many cycles (or frames) must be executed before first rendering (this value has to be set before starting the system). Default is 0 */\r\n public preWarmCycles = 0;\r\n\r\n /** Gets or sets a value indicating the time step multiplier to use in pre-warm mode (default is 1) */\r\n public preWarmStepOffset = 1;\r\n\r\n /**\r\n * If using a spritesheet (isAnimationSheetEnabled) defines the speed of the sprite loop (default is 1 meaning the animation will play once during the entire particle lifetime)\r\n */\r\n public spriteCellChangeSpeed = 1;\r\n /**\r\n * If using a spritesheet (isAnimationSheetEnabled) defines the first sprite cell to display\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public startSpriteCellID = 0;\r\n /**\r\n * If using a spritesheet (isAnimationSheetEnabled) defines the last sprite cell to display\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public endSpriteCellID = 0;\r\n /**\r\n * If using a spritesheet (isAnimationSheetEnabled), defines the sprite cell width to use\r\n */\r\n public spriteCellWidth = 0;\r\n /**\r\n * If using a spritesheet (isAnimationSheetEnabled), defines the sprite cell height to use\r\n */\r\n public spriteCellHeight = 0;\r\n /**\r\n * If using a spritesheet (isAnimationSheetEnabled), defines wether the sprite animation is looping\r\n */\r\n public spriteCellLoop = true;\r\n /**\r\n * This allows the system to random pick the start cell ID between startSpriteCellID and endSpriteCellID\r\n */\r\n public spriteRandomStartCell = false;\r\n\r\n /** Gets or sets a Vector2 used to move the pivot (by default (0,0)) */\r\n public translationPivot = new Vector2(0, 0);\r\n\r\n protected _animationSheetEnabled = false;\r\n /** @internal */\r\n public get _isAnimationSheetEnabled() {\r\n return this._animationSheetEnabled;\r\n }\r\n\r\n public set _isAnimationSheetEnabled(value: boolean) {\r\n if (this._animationSheetEnabled === value) {\r\n return;\r\n }\r\n\r\n this._animationSheetEnabled = value;\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that hosted animations (in the system.animations array) must be started when system.start() is called\r\n */\r\n public beginAnimationOnStart = false;\r\n\r\n /**\r\n * Gets or sets the frame to start the animation from when beginAnimationOnStart is true\r\n */\r\n public beginAnimationFrom = 0;\r\n\r\n /**\r\n * Gets or sets the frame to end the animation on when beginAnimationOnStart is true\r\n */\r\n public beginAnimationTo = 60;\r\n\r\n /**\r\n * Gets or sets a boolean indicating if animations must loop when beginAnimationOnStart is true\r\n */\r\n public beginAnimationLoop = false;\r\n\r\n /**\r\n * Gets or sets a world offset applied to all particles\r\n */\r\n public worldOffset = new Vector3(0, 0, 0);\r\n\r\n /**\r\n * Gets or sets the active clipplane 1\r\n */\r\n public clipPlane: Nullable<Plane>;\r\n\r\n /**\r\n * Gets or sets the active clipplane 2\r\n */\r\n public clipPlane2: Nullable<Plane>;\r\n\r\n /**\r\n * Gets or sets the active clipplane 3\r\n */\r\n public clipPlane3: Nullable<Plane>;\r\n\r\n /**\r\n * Gets or sets the active clipplane 4\r\n */\r\n public clipPlane4: Nullable<Plane>;\r\n\r\n /**\r\n * Gets or sets the active clipplane 5\r\n */\r\n public clipPlane5: Nullable<Plane>;\r\n\r\n /**\r\n * Gets or sets the active clipplane 6\r\n */\r\n public clipPlane6: Nullable<Plane>;\r\n\r\n /**\r\n * Gets or sets whether an animation sprite sheet is enabled or not on the particle system\r\n */\r\n public get isAnimationSheetEnabled(): boolean {\r\n return this._isAnimationSheetEnabled;\r\n }\r\n\r\n public set isAnimationSheetEnabled(value: boolean) {\r\n if (this._isAnimationSheetEnabled == value) {\r\n return;\r\n }\r\n\r\n this._isAnimationSheetEnabled = value;\r\n\r\n this._reset();\r\n }\r\n\r\n private _useLogarithmicDepth: boolean = false;\r\n\r\n /**\r\n * Gets or sets a boolean enabling the use of logarithmic depth buffers, which is good for wide depth buffers.\r\n */\r\n public get useLogarithmicDepth(): boolean {\r\n return this._useLogarithmicDepth;\r\n }\r\n\r\n public set useLogarithmicDepth(value: boolean) {\r\n this._useLogarithmicDepth = value && this.getScene()!.getEngine().getCaps().fragmentDepthSupported;\r\n }\r\n\r\n /**\r\n * Get hosting scene\r\n * @returns the scene\r\n */\r\n public getScene(): Nullable<Scene> {\r\n return this._scene;\r\n }\r\n\r\n /**\r\n * You can use gravity if you want to give an orientation to your particles.\r\n */\r\n public gravity = Vector3.Zero();\r\n\r\n /** @internal */\r\n public _colorGradients: Nullable<Array<ColorGradient>> = null;\r\n /** @internal */\r\n public _sizeGradients: Nullable<Array<FactorGradient>> = null;\r\n /** @internal */\r\n public _lifeTimeGradients: Nullable<Array<FactorGradient>> = null;\r\n /** @internal */\r\n public _angularSpeedGradients: Nullable<Array<FactorGradient>> = null;\r\n /** @internal */\r\n public _velocityGradients: Nullable<Array<FactorGradient>> = null;\r\n /** @internal */\r\n public _limitVelocityGradients: Nullable<Array<FactorGradient>> = null;\r\n /** @internal */\r\n public _dragGradients: Nullable<Array<FactorGradient>> = null;\r\n protected _emitRateGradients: Nullable<Array<FactorGradient>> = null;\r\n /** @internal */\r\n public _startSizeGradients: Nullable<Array<FactorGradient>> = null;\r\n protected _rampGradients: Nullable<Array<Color3Gradient>> = null;\r\n /** @internal */\r\n public _colorRemapGradients: Nullable<Array<FactorGradient>> = null;\r\n /** @internal */\r\n public _alphaRemapGradients: Nullable<Array<FactorGradient>> = null;\r\n\r\n protected _hasTargetStopDurationDependantGradient() {\r\n return (\r\n (this._startSizeGradients && this._startSizeGradients.length > 0) ||\r\n (this._emitRateGradients && this._emitRateGradients.length > 0) ||\r\n (this._lifeTimeGradients && this._lifeTimeGradients.length > 0)\r\n );\r\n }\r\n\r\n protected _setEngineBasedOnBlendMode(blendMode: number): void {\r\n switch (blendMode) {\r\n case BaseParticleSystem.BLENDMODE_MULTIPLYADD:\r\n // Don't want to update engine since there is no equivalent engine alpha mode, instead it gets handled within particleSystem\r\n return;\r\n case BaseParticleSystem.BLENDMODE_ADD:\r\n blendMode = Constants.ALPHA_ADD;\r\n break;\r\n case BaseParticleSystem.BLENDMODE_ONEONE:\r\n blendMode = Constants.ALPHA_ONEONE;\r\n break;\r\n case BaseParticleSystem.BLENDMODE_STANDARD:\r\n blendMode = Constants.ALPHA_COMBINE;\r\n break;\r\n case BaseParticleSystem.BLENDMODE_MULTIPLY:\r\n blendMode = Constants.ALPHA_MULTIPLY;\r\n break;\r\n case BaseParticleSystem.BLENDMODE_SUBTRACT:\r\n blendMode = Constants.ALPHA_SUBTRACT;\r\n break;\r\n default:\r\n // For all other blend modes that were added after the initial particleSystem implementation,\r\n // the ParticleSystem.BLENDMODE_FOO are already mapped to the underlying Constants.ALPHA_FOO\r\n break;\r\n }\r\n this._engine.setAlphaMode(blendMode);\r\n }\r\n\r\n /**\r\n * Defines the delay in milliseconds before starting the system (0 by default)\r\n */\r\n public startDelay = 0;\r\n\r\n /**\r\n * Gets the current list of drag gradients.\r\n * You must use addDragGradient and removeDragGradient to update this list\r\n * @returns the list of drag gradients\r\n */\r\n public getDragGradients(): Nullable<Array<FactorGradient>> {\r\n return this._dragGradients;\r\n }\r\n\r\n /** Gets or sets a value indicating the damping to apply if the limit velocity factor is reached */\r\n public limitVelocityDamping = 0.4;\r\n\r\n /**\r\n * Gets the current list of limit velocity gradients.\r\n * You must use addLimitVelocityGradient and removeLimitVelocityGradient to update this list\r\n * @returns the list of limit velocity gradients\r\n */\r\n public getLimitVelocityGradients(): Nullable<Array<FactorGradient>> {\r\n return this._limitVelocityGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of color gradients.\r\n * You must use addColorGradient and removeColorGradient to update this list\r\n * @returns the list of color gradients\r\n */\r\n public getColorGradients(): Nullable<Array<ColorGradient>> {\r\n return this._colorGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of size gradients.\r\n * You must use addSizeGradient and removeSizeGradient to update this list\r\n * @returns the list of size gradients\r\n */\r\n public getSizeGradients(): Nullable<Array<FactorGradient>> {\r\n return this._sizeGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of color remap gradients.\r\n * You must use addColorRemapGradient and removeColorRemapGradient to update this list\r\n * @returns the list of color remap gradients\r\n */\r\n public getColorRemapGradients(): Nullable<Array<FactorGradient>> {\r\n return this._colorRemapGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of alpha remap gradients.\r\n * You must use addAlphaRemapGradient and removeAlphaRemapGradient to update this list\r\n * @returns the list of alpha remap gradients\r\n */\r\n public getAlphaRemapGradients(): Nullable<Array<FactorGradient>> {\r\n return this._alphaRemapGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of life time gradients.\r\n * You must use addLifeTimeGradient and removeLifeTimeGradient to update this list\r\n * @returns the list of life time gradients\r\n */\r\n public getLifeTimeGradients(): Nullable<Array<FactorGradient>> {\r\n return this._lifeTimeGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of angular speed gradients.\r\n * You must use addAngularSpeedGradient and removeAngularSpeedGradient to update this list\r\n * @returns the list of angular speed gradients\r\n */\r\n public getAngularSpeedGradients(): Nullable<Array<FactorGradient>> {\r\n return this._angularSpeedGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of velocity gradients.\r\n * You must use addVelocityGradient and removeVelocityGradient to update this list\r\n * @returns the list of velocity gradients\r\n */\r\n public getVelocityGradients(): Nullable<Array<FactorGradient>> {\r\n return this._velocityGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of start size gradients.\r\n * You must use addStartSizeGradient and removeStartSizeGradient to update this list\r\n * @returns the list of start size gradients\r\n */\r\n public getStartSizeGradients(): Nullable<Array<FactorGradient>> {\r\n return this._startSizeGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of emit rate gradients.\r\n * You must use addEmitRateGradient and removeEmitRateGradient to update this list\r\n * @returns the list of emit rate gradients\r\n */\r\n public getEmitRateGradients(): Nullable<Array<FactorGradient>> {\r\n return this._emitRateGradients;\r\n }\r\n\r\n /**\r\n * Random direction of each particle after it has been emitted, between direction1 and direction2 vectors.\r\n * This only works when particleEmitterTyps is a BoxParticleEmitter\r\n */\r\n public get direction1(): Vector3 {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).direction1) {\r\n return (<BoxParticleEmitter>this.particleEmitterType).direction1;\r\n }\r\n\r\n return Vector3.Zero();\r\n }\r\n\r\n public set direction1(value: Vector3) {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).direction1) {\r\n (<BoxParticleEmitter>this.particleEmitterType).direction1 = value;\r\n }\r\n }\r\n\r\n /**\r\n * Random direction of each particle after it has been emitted, between direction1 and direction2 vectors.\r\n * This only works when particleEmitterTyps is a BoxParticleEmitter\r\n */\r\n public get direction2(): Vector3 {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).direction2) {\r\n return (<BoxParticleEmitter>this.particleEmitterType).direction2;\r\n }\r\n\r\n return Vector3.Zero();\r\n }\r\n\r\n public set direction2(value: Vector3) {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).direction2) {\r\n (<BoxParticleEmitter>this.particleEmitterType).direction2 = value;\r\n }\r\n }\r\n\r\n /**\r\n * Minimum box point around our emitter. Our emitter is the center of particles source, but if you want your particles to emit from more than one point, then you can tell it to do so.\r\n * This only works when particleEmitterTyps is a BoxParticleEmitter\r\n */\r\n public get minEmitBox(): Vector3 {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).minEmitBox) {\r\n return (<BoxParticleEmitter>this.particleEmitterType).minEmitBox;\r\n }\r\n\r\n return Vector3.Zero();\r\n }\r\n\r\n public set minEmitBox(value: Vector3) {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).minEmitBox) {\r\n (<BoxParticleEmitter>this.particleEmitterType).minEmitBox = value;\r\n }\r\n }\r\n\r\n /**\r\n * Maximum box point around our emitter. Our emitter is the center of particles source, but if you want your particles to emit from more than one point, then you can tell it to do so.\r\n * This only works when particleEmitterTyps is a BoxParticleEmitter\r\n */\r\n public get maxEmitBox(): Vector3 {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).maxEmitBox) {\r\n return (<BoxParticleEmitter>this.particleEmitterType).maxEmitBox;\r\n }\r\n\r\n return Vector3.Zero();\r\n }\r\n\r\n public set maxEmitBox(value: Vector3) {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).maxEmitBox) {\r\n (<BoxParticleEmitter>this.particleEmitterType).maxEmitBox = value;\r\n }\r\n }\r\n\r\n /**\r\n * Random color of each particle after it has been emitted, between color1 and color2 vectors\r\n */\r\n public color1 = new Color4(1.0, 1.0, 1.0, 1.0);\r\n /**\r\n * Random color of each particle after it has been emitted, between color1 and color2 vectors\r\n */\r\n public color2 = new Color4(1.0, 1.0, 1.0, 1.0);\r\n /**\r\n * Color the particle will have at the end of its lifetime\r\n */\r\n public colorDead = new Color4(0, 0, 0, 1.0);\r\n\r\n /**\r\n * An optional mask to filter some colors out of the texture, or filter a part of the alpha channel\r\n */\r\n public textureMask = new Color4(1.0, 1.0, 1.0, 1.0);\r\n\r\n /**\r\n * The particle emitter type defines the emitter used by the particle system.\r\n * It can be for example box, sphere, or cone...\r\n */\r\n public particleEmitterType: IParticleEmitterType;\r\n\r\n /** @internal */\r\n public _isSubEmitter = false;\r\n\r\n /** @internal */\r\n public _billboardMode = Constants.PARTICLES_BILLBOARDMODE_ALL;\r\n /**\r\n * Gets or sets the billboard mode to use when isBillboardBased = true.\r\n * Value can be: ParticleSystem.BILLBOARDMODE_ALL, ParticleSystem.BILLBOARDMODE_Y, ParticleSystem.BILLBOARDMODE_STRETCHED, ParticleSystem.PARTICLES_BILLBOARDMODE_STRETCHED_LOCAL\r\n */\r\n public get billboardMode(): number {\r\n return this._billboardMode;\r\n }\r\n\r\n public set billboardMode(value: number) {\r\n if (this._billboardMode === value) {\r\n return;\r\n }\r\n\r\n this._billboardMode = value;\r\n this._reset();\r\n }\r\n\r\n /** @internal */\r\n public _isBillboardBased = true;\r\n /**\r\n * Gets or sets a boolean indicating if the particles must be rendered as billboard or aligned with the direction\r\n */\r\n public get isBillboardBased(): boolean {\r\n return this._isBillboardBased;\r\n }\r\n\r\n public set isBillboardBased(value: boolean) {\r\n if (this._isBillboardBased === value) {\r\n return;\r\n }\r\n\r\n this._isBillboardBased = value;\r\n this._reset();\r\n }\r\n\r\n /**\r\n * The scene the particle system belongs to.\r\n */\r\n protected _scene: Nullable<Scene>;\r\n\r\n /**\r\n * The engine the particle system belongs to.\r\n */\r\n protected _engine: AbstractEngine;\r\n\r\n /**\r\n * Local cache of defines for image processing.\r\n */\r\n protected _imageProcessingConfigurationDefines = new ImageProcessingConfigurationDefines();\r\n\r\n /**\r\n * Default configuration related to image processing available in the standard Material.\r\n */\r\n protected _imageProcessingConfiguration: Nullable<ImageProcessingConfiguration>;\r\n\r\n /**\r\n * Gets the image processing configuration used either in this material.\r\n */\r\n public get imageProcessingConfiguration(): Nullable<ImageProcessingConfiguration> {\r\n return this._imageProcessingConfiguration;\r\n }\r\n\r\n /**\r\n * Sets the Default image processing configuration used either in the this material.\r\n *\r\n * If sets to null, the scene one is in use.\r\n */\r\n public set imageProcessingConfiguration(value: Nullable<ImageProcessingConfiguration>) {\r\n this._attachImageProcessingConfiguration(value);\r\n }\r\n\r\n /**\r\n * Attaches a new image processing configuration to the Standard Material.\r\n * @param configuration\r\n */\r\n protected _attachImageProcessingConfiguration(configuration: Nullable<ImageProcessingConfiguration>): void {\r\n if (configuration === this._imageProcessingConfiguration) {\r\n return;\r\n }\r\n\r\n // Pick the scene configuration if needed.\r\n if (!configuration && this._scene) {\r\n this._imageProcessingConfiguration = this._scene.imageProcessingConfiguration;\r\n } else {\r\n this._imageProcessingConfiguration = configuration;\r\n }\r\n }\r\n\r\n /** @internal */\r\n protected _reset() {}\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _removeGradientAndTexture(gradient: number, gradients: Nullable<IValueGradient[]>, texture: Nullable<RawTexture>): BaseParticleSystem {\r\n if (!gradients) {\r\n return this;\r\n }\r\n\r\n let index = 0;\r\n for (const valueGradient of gradients) {\r\n if (valueGradient.gradient === gradient) {\r\n gradients.splice(index, 1);\r\n break;\r\n }\r\n index++;\r\n }\r\n\r\n if (texture) {\r\n texture.dispose();\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Instantiates a particle system.\r\n * Particles are often small sprites used to simulate hard-to-reproduce phenomena like fire, smoke, water, or abstract visual effects like magic glitter and faery dust.\r\n * @param name The name of the particle system\r\n */\r\n public constructor(name: string) {\r\n this.id = name;\r\n this.name = name;\r\n }\r\n\r\n /**\r\n * Creates a Point Emitter for the particle system (emits directly from the emitter position)\r\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the box\r\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the box\r\n */\r\n public createPointEmitter(direction1: Vector3, direction2: Vector3): PointParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a Hemisphere Emitter for the particle system (emits along the hemisphere radius)\r\n * @param radius The radius of the hemisphere to emit from\r\n * @param radiusRange The range of the hemisphere to emit from [0-1] 0 Surface Only, 1 Entire Radius\r\n */\r\n public createHemisphericEmitter(radius = 1, radiusRange = 1): HemisphericParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a Sphere Emitter for the particle system (emits along the sphere radius)\r\n * @param radius The radius of the sphere to emit from\r\n * @param radiusRange The range of the sphere to emit from [0-1] 0 Surface Only, 1 Entire Radius\r\n */\r\n public createSphereEmitter(radius = 1, radiusRange = 1): SphereParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a Directed Sphere Emitter for the particle system (emits between direction1 and direction2)\r\n * @param radius The radius of the sphere to emit from\r\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the sphere\r\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the sphere\r\n */\r\n public createDirectedSphereEmitter(radius = 1, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)): SphereDirectedParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a Cylinder Emitter for the particle system (emits from the cylinder to the particle position)\r\n * @param radius The radius of the emission cylinder\r\n * @param height The height of the emission cylinder\r\n * @param radiusRange The range of emission [0-1] 0 Surface only, 1 Entire Radius\r\n * @param directionRandomizer How much to randomize the particle direction [0-1]\r\n */\r\n public createCylinderEmitter(radius = 1, height = 1, radiusRange = 1, directionRandomizer = 0): CylinderParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a Directed Cylinder Emitter for the particle system (emits between direction1 and direction2)\r\n * @param radius The radius of the cylinder to emit from\r\n * @param height The height of the emission cylinder\r\n * @param radiusRange the range of the emission cylinder [0-1] 0 Surface only, 1 Entire Radius (1 by default)\r\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the cylinder\r\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the cylinder\r\n */\r\n public createDirectedCylinderEmitter(\r\n radius = 1,\r\n height = 1,\r\n radiusRange = 1,\r\n direction1 = new Vector3(0, 1.0, 0),\r\n direction2 = new Vector3(0, 1.0, 0)\r\n ): CylinderDirectedParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a Cone Emitter for the particle system (emits from the cone to the particle position)\r\n * @param radius The radius of the cone to emit from\r\n * @param angle The base angle of the cone\r\n */\r\n public createConeEmitter(radius = 1, angle = Math.PI / 4): ConeParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n public createDirectedConeEmitter(radius = 1, angle = Math.PI / 4, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)): ConeDirectedParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a Box Emitter for the particle system. (emits between direction1 and direction2 from withing the box defined by minEmitBox and maxEmitBox)\r\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the box\r\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the box\r\n * @param minEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox\r\n * @param maxEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox\r\n */\r\n public createBoxEmitter(direction1: Vector3, direction2: Vector3, minEmitBox: Vector3, maxEmitBox: Vector3): BoxParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n}\r\n\r\n// Register Class Name\r\nRegisterClass(\"BABYLON.BaseParticleSystem\", BaseParticleSystem);\r\n"]}
1
+ {"version":3,"file":"baseParticleSystem.js","sourceRoot":"","sources":["../../../../dev/core/src/Particles/baseParticleSystem.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGxD,OAAO,EAAE,mCAAmC,EAAE,MAAM,mDAAmD,CAAC;AAGxG,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,OAAO,4CAA4C,CAAC;AAapD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,OAAO,kBAAkB;IA+E3B;;OAEG;IACH,IAAW,kBAAkB;QACzB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IACpC,CAAC;IAED,IAAW,kBAAkB,CAAC,KAAa;QACvC,IAAI,IAAI,CAAC,mBAAmB,KAAK,KAAK,EAAE,CAAC;YACrC,OAAO;QACX,CAAC;QAED,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;IACrC,CAAC;IAuGD;;OAEG;IACH,IAAW,eAAe;QACtB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;OA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QAEnC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAED;;;;OAIG;IACI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC;QACpD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;;OAMG;IACI,yBAAyB,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,UAAU,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QACtI,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;;OAMG;IACI,gBAAgB,CAAC,UAAmB,EAAE,UAAmB,EAAE,UAAmB,EAAE,UAAmB;QACtG,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;;AA72BD;;GAEG;AACW,mCAAgB,GAAG,CAAC,AAAJ,CAAK;AACnC;;GAEG;AACW,qCAAkB,GAAG,CAAC,AAAJ,CAAK;AACrC;;GAEG;AACW,gCAAa,GAAG,CAAC,AAAJ,CAAK;AAChC;;GAEG;AACW,qCAAkB,GAAG,CAAC,AAAJ,CAAK;AACrC;;GAEG;AACW,wCAAqB,GAAG,CAAC,AAAJ,CAAK;AACxC;;;GAGG;AACW,qCAAkB,GAAG,CAAC,CAAC,AAAL,CAAM;AAw1B1C,sBAAsB;AACtB,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"../types\";\r\nimport { Vector2, Vector3 } from \"../Maths/math.vector\";\r\nimport type { AbstractMesh } from \"../Meshes/abstractMesh\";\r\nimport type { ImageProcessingConfiguration } from \"../Materials/imageProcessingConfiguration\";\r\nimport { ImageProcessingConfigurationDefines } from \"../Materials/imageProcessingConfiguration.defines\";\r\nimport type { ColorGradient, FactorGradient, Color3Gradient, IValueGradient } from \"../Misc/gradients\";\r\nimport type { BoxParticleEmitter } from \"../Particles/EmitterTypes/boxParticleEmitter\";\r\nimport { Constants } from \"../Engines/constants\";\r\nimport type { BaseTexture } from \"../Materials/Textures/baseTexture\";\r\nimport { Color4 } from \"../Maths/math.color\";\r\nimport type { AbstractEngine } from \"../Engines/abstractEngine\";\r\n\r\nimport \"../Engines/Extensions/engine.dynamicBuffer\";\r\nimport type { IClipPlanesHolder } from \"../Misc/interfaces/iClipPlanesHolder\";\r\nimport type { Plane } from \"../Maths/math.plane\";\r\nimport type { Animation } from \"../Animations/animation\";\r\nimport type { Scene } from \"../scene\";\r\nimport type { ProceduralTexture } from \"../Materials/Textures/Procedurals/proceduralTexture\";\r\nimport type { RawTexture } from \"../Materials/Textures/rawTexture\";\r\nimport type { IParticleEmitterType } from \"./EmitterTypes/IParticleEmitterType\";\r\nimport type { PointParticleEmitter } from \"./EmitterTypes/pointParticleEmitter\";\r\nimport type { HemisphericParticleEmitter } from \"./EmitterTypes/hemisphericParticleEmitter\";\r\nimport type { SphereDirectedParticleEmitter, SphereParticleEmitter } from \"./EmitterTypes/sphereParticleEmitter\";\r\nimport type { CylinderDirectedParticleEmitter, CylinderParticleEmitter } from \"./EmitterTypes/cylinderParticleEmitter\";\r\nimport type { ConeDirectedParticleEmitter, ConeParticleEmitter } from \"./EmitterTypes/coneParticleEmitter\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\n\r\n/**\r\n * This represents the base class for particle system in Babylon.\r\n * Particles are often small sprites used to simulate hard-to-reproduce phenomena like fire, smoke, water, or abstract visual effects like magic glitter and faery dust.\r\n * Particles can take different shapes while emitted like box, sphere, cone or you can write your custom function.\r\n * @example https://doc.babylonjs.com/features/featuresDeepDive/particles/particle_system/particle_system_intro\r\n */\r\nexport class BaseParticleSystem implements IClipPlanesHolder {\r\n /**\r\n * Source color is added to the destination color without alpha affecting the result. Great for additive glow effects (fire, magic, lasers)\r\n */\r\n public static BLENDMODE_ONEONE = 0;\r\n /**\r\n * Blend current color and particle color using particle’s alpha. Same as Constants.ALPHA_COMBINE, the go-to for transparency. 100% alpha means source, 0% alpha means background. Glass, UI fade, smoke\r\n */\r\n public static BLENDMODE_STANDARD = 1;\r\n /**\r\n * Add current color and particle color multiplied by particle’s alpha\r\n */\r\n public static BLENDMODE_ADD = 2;\r\n /**\r\n * Multiply current color with particle color\r\n */\r\n public static BLENDMODE_MULTIPLY = 3;\r\n /**\r\n * Multiply current color with particle color then add current color and particle color multiplied by particle’s alpha\r\n */\r\n public static BLENDMODE_MULTIPLYADD = 4;\r\n /**\r\n * Subtracts source (particle) from destination (current color), leading to darker results\r\n * - NOTE: Init as -1 so we can properly map all modes to Engine Const's (otherwise ALPHA_SUBTRACT will conflict with BLENDMODE_MULTIPLY since both use 3)\r\n */\r\n public static BLENDMODE_SUBTRACT = -1;\r\n\r\n /**\r\n * List of animations used by the particle system.\r\n */\r\n public animations: Animation[] = [];\r\n\r\n /**\r\n * Gets or sets the unique id of the particle system\r\n */\r\n public uniqueId: number;\r\n\r\n /**\r\n * The id of the Particle system.\r\n */\r\n public id: string;\r\n\r\n /**\r\n * The friendly name of the Particle system.\r\n */\r\n public name: string;\r\n\r\n /**\r\n * Snippet ID if the particle system was created from the snippet server\r\n */\r\n public snippetId: string;\r\n\r\n /**\r\n * The rendering group used by the Particle system to chose when to render.\r\n */\r\n public renderingGroupId = 0;\r\n\r\n /**\r\n * The emitter represents the Mesh or position we are attaching the particle system to.\r\n */\r\n public emitter: Nullable<AbstractMesh | Vector3> = Vector3.Zero();\r\n\r\n /**\r\n * The maximum number of particles to emit per frame\r\n */\r\n public emitRate = 10;\r\n\r\n /**\r\n * If you want to launch only a few particles at once, that can be done, as well.\r\n */\r\n public manualEmitCount = -1;\r\n\r\n /**\r\n * The overall motion speed (0.01 is default update speed, faster updates = faster animation)\r\n */\r\n public updateSpeed = 0.01;\r\n\r\n /** @internal */\r\n public _targetStopDuration = 0;\r\n /**\r\n * The amount of time the particle system is running (depends of the overall update speed).\r\n */\r\n public get targetStopDuration() {\r\n return this._targetStopDuration;\r\n }\r\n\r\n public set targetStopDuration(value: number) {\r\n if (this._targetStopDuration === value) {\r\n return;\r\n }\r\n\r\n this._targetStopDuration = value;\r\n }\r\n\r\n /**\r\n * Specifies whether the particle system will be disposed once it reaches the end of the animation.\r\n */\r\n public disposeOnStop = false;\r\n\r\n /**\r\n * Minimum power of emitting particles.\r\n */\r\n public minEmitPower = 1;\r\n /**\r\n * Maximum power of emitting particles.\r\n */\r\n public maxEmitPower = 1;\r\n\r\n /**\r\n * Minimum life time of emitting particles.\r\n */\r\n public minLifeTime = 1;\r\n /**\r\n * Maximum life time of emitting particles.\r\n */\r\n public maxLifeTime = 1;\r\n\r\n /**\r\n * Minimum Size of emitting particles.\r\n */\r\n public minSize = 1;\r\n /**\r\n * Maximum Size of emitting particles.\r\n */\r\n public maxSize = 1;\r\n\r\n /**\r\n * Minimum scale of emitting particles on X axis.\r\n */\r\n public minScaleX = 1;\r\n /**\r\n * Maximum scale of emitting particles on X axis.\r\n */\r\n public maxScaleX = 1;\r\n\r\n /**\r\n * Minimum scale of emitting particles on Y axis.\r\n */\r\n public minScaleY = 1;\r\n /**\r\n * Maximum scale of emitting particles on Y axis.\r\n */\r\n public maxScaleY = 1;\r\n\r\n /**\r\n * Gets or sets the minimal initial rotation in radians.\r\n */\r\n public minInitialRotation = 0;\r\n /**\r\n * Gets or sets the maximal initial rotation in radians.\r\n */\r\n public maxInitialRotation = 0;\r\n\r\n /**\r\n * Minimum angular speed of emitting particles (Z-axis rotation for each particle).\r\n */\r\n public minAngularSpeed = 0;\r\n /**\r\n * Maximum angular speed of emitting particles (Z-axis rotation for each particle).\r\n */\r\n public maxAngularSpeed = 0;\r\n\r\n /**\r\n * The texture used to render each particle. (this can be a spritesheet)\r\n */\r\n public particleTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * The layer mask we are rendering the particles through.\r\n */\r\n public layerMask: number = 0x0fffffff;\r\n\r\n /**\r\n * This can help using your own shader to render the particle system.\r\n * The according effect will be created\r\n */\r\n public customShader: any = null;\r\n\r\n /**\r\n * By default particle system starts as soon as they are created. This prevents the\r\n * automatic start to happen and let you decide when to start emitting particles.\r\n */\r\n public preventAutoStart: boolean = false;\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this particle system will allow fog to be rendered on it (false by default)\r\n */\r\n public applyFog = false;\r\n\r\n /** @internal */\r\n _wasDispatched = false;\r\n\r\n protected _rootUrl = \"\";\r\n protected _noiseTexture: Nullable<ProceduralTexture>;\r\n\r\n /**\r\n * Returns true if the particle system was generated by a node particle system set\r\n */\r\n public get isNodeGenerated(): boolean {\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets or sets a texture used to add random noise to particle positions\r\n */\r\n public get noiseTexture(): Nullable<ProceduralTexture> {\r\n return this._noiseTexture;\r\n }\r\n\r\n public set noiseTexture(value: Nullable<ProceduralTexture>) {\r\n if (this._noiseTexture === value) {\r\n return;\r\n }\r\n\r\n this._noiseTexture = value;\r\n this._reset();\r\n }\r\n\r\n /** Gets or sets the strength to apply to the noise value (default is (10, 10, 10)) */\r\n public noiseStrength = new Vector3(10, 10, 10);\r\n\r\n /**\r\n * Callback triggered when the particle animation is ending.\r\n */\r\n public onAnimationEnd: Nullable<() => void> = null;\r\n\r\n /**\r\n * Blend mode use to render the particle\r\n * For original blend modes which are exposed from ParticleSystem (OneOne, Standard, Add, Multiply, MultiplyAdd, and Subtract), use ParticleSystem.BLENDMODE_FOO\r\n * For all other blend modes, use Engine Constants.ALPHA_FOO blend modes\r\n */\r\n public blendMode = BaseParticleSystem.BLENDMODE_ONEONE;\r\n\r\n /**\r\n * Forces the particle to write their depth information to the depth buffer. This can help preventing other draw calls\r\n * to override the particles.\r\n */\r\n public forceDepthWrite = false;\r\n\r\n /** Gets or sets a value indicating how many cycles (or frames) must be executed before first rendering (this value has to be set before starting the system). Default is 0 */\r\n public preWarmCycles = 0;\r\n\r\n /** Gets or sets a value indicating the time step multiplier to use in pre-warm mode (default is 1) */\r\n public preWarmStepOffset = 1;\r\n\r\n /**\r\n * If using a spritesheet (isAnimationSheetEnabled) defines the speed of the sprite loop (default is 1 meaning the animation will play once during the entire particle lifetime)\r\n */\r\n public spriteCellChangeSpeed = 1;\r\n /**\r\n * If using a spritesheet (isAnimationSheetEnabled) defines the first sprite cell to display\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public startSpriteCellID = 0;\r\n /**\r\n * If using a spritesheet (isAnimationSheetEnabled) defines the last sprite cell to display\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public endSpriteCellID = 0;\r\n /**\r\n * If using a spritesheet (isAnimationSheetEnabled), defines the sprite cell width to use\r\n */\r\n public spriteCellWidth = 0;\r\n /**\r\n * If using a spritesheet (isAnimationSheetEnabled), defines the sprite cell height to use\r\n */\r\n public spriteCellHeight = 0;\r\n /**\r\n * If using a spritesheet (isAnimationSheetEnabled), defines wether the sprite animation is looping\r\n */\r\n public spriteCellLoop = true;\r\n /**\r\n * This allows the system to random pick the start cell ID between startSpriteCellID and endSpriteCellID\r\n */\r\n public spriteRandomStartCell = false;\r\n\r\n /** Gets or sets a Vector2 used to move the pivot (by default (0,0)) */\r\n public translationPivot = new Vector2(0, 0);\r\n\r\n protected _animationSheetEnabled = false;\r\n /** @internal */\r\n public get _isAnimationSheetEnabled() {\r\n return this._animationSheetEnabled;\r\n }\r\n\r\n public set _isAnimationSheetEnabled(value: boolean) {\r\n if (this._animationSheetEnabled === value) {\r\n return;\r\n }\r\n\r\n this._animationSheetEnabled = value;\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that hosted animations (in the system.animations array) must be started when system.start() is called\r\n */\r\n public beginAnimationOnStart = false;\r\n\r\n /**\r\n * Gets or sets the frame to start the animation from when beginAnimationOnStart is true\r\n */\r\n public beginAnimationFrom = 0;\r\n\r\n /**\r\n * Gets or sets the frame to end the animation on when beginAnimationOnStart is true\r\n */\r\n public beginAnimationTo = 60;\r\n\r\n /**\r\n * Gets or sets a boolean indicating if animations must loop when beginAnimationOnStart is true\r\n */\r\n public beginAnimationLoop = false;\r\n\r\n /**\r\n * Gets or sets a world offset applied to all particles\r\n */\r\n public worldOffset = new Vector3(0, 0, 0);\r\n\r\n /**\r\n * Gets or sets the active clipplane 1\r\n */\r\n public clipPlane: Nullable<Plane>;\r\n\r\n /**\r\n * Gets or sets the active clipplane 2\r\n */\r\n public clipPlane2: Nullable<Plane>;\r\n\r\n /**\r\n * Gets or sets the active clipplane 3\r\n */\r\n public clipPlane3: Nullable<Plane>;\r\n\r\n /**\r\n * Gets or sets the active clipplane 4\r\n */\r\n public clipPlane4: Nullable<Plane>;\r\n\r\n /**\r\n * Gets or sets the active clipplane 5\r\n */\r\n public clipPlane5: Nullable<Plane>;\r\n\r\n /**\r\n * Gets or sets the active clipplane 6\r\n */\r\n public clipPlane6: Nullable<Plane>;\r\n\r\n /**\r\n * Gets or sets whether an animation sprite sheet is enabled or not on the particle system\r\n */\r\n public get isAnimationSheetEnabled(): boolean {\r\n return this._isAnimationSheetEnabled;\r\n }\r\n\r\n public set isAnimationSheetEnabled(value: boolean) {\r\n if (this._isAnimationSheetEnabled == value) {\r\n return;\r\n }\r\n\r\n this._isAnimationSheetEnabled = value;\r\n\r\n this._reset();\r\n }\r\n\r\n private _useLogarithmicDepth: boolean = false;\r\n\r\n /**\r\n * Gets or sets a boolean enabling the use of logarithmic depth buffers, which is good for wide depth buffers.\r\n */\r\n public get useLogarithmicDepth(): boolean {\r\n return this._useLogarithmicDepth;\r\n }\r\n\r\n public set useLogarithmicDepth(value: boolean) {\r\n this._useLogarithmicDepth = value && this.getScene()!.getEngine().getCaps().fragmentDepthSupported;\r\n }\r\n\r\n /**\r\n * Get hosting scene\r\n * @returns the scene\r\n */\r\n public getScene(): Nullable<Scene> {\r\n return this._scene;\r\n }\r\n\r\n /**\r\n * You can use gravity if you want to give an orientation to your particles.\r\n */\r\n public gravity = Vector3.Zero();\r\n\r\n /** @internal */\r\n public _colorGradients: Nullable<Array<ColorGradient>> = null;\r\n /** @internal */\r\n public _sizeGradients: Nullable<Array<FactorGradient>> = null;\r\n /** @internal */\r\n public _lifeTimeGradients: Nullable<Array<FactorGradient>> = null;\r\n /** @internal */\r\n public _angularSpeedGradients: Nullable<Array<FactorGradient>> = null;\r\n /** @internal */\r\n public _velocityGradients: Nullable<Array<FactorGradient>> = null;\r\n /** @internal */\r\n public _limitVelocityGradients: Nullable<Array<FactorGradient>> = null;\r\n /** @internal */\r\n public _dragGradients: Nullable<Array<FactorGradient>> = null;\r\n protected _emitRateGradients: Nullable<Array<FactorGradient>> = null;\r\n /** @internal */\r\n public _startSizeGradients: Nullable<Array<FactorGradient>> = null;\r\n protected _rampGradients: Nullable<Array<Color3Gradient>> = null;\r\n /** @internal */\r\n public _colorRemapGradients: Nullable<Array<FactorGradient>> = null;\r\n /** @internal */\r\n public _alphaRemapGradients: Nullable<Array<FactorGradient>> = null;\r\n\r\n protected _hasTargetStopDurationDependantGradient() {\r\n return (\r\n (this._startSizeGradients && this._startSizeGradients.length > 0) ||\r\n (this._emitRateGradients && this._emitRateGradients.length > 0) ||\r\n (this._lifeTimeGradients && this._lifeTimeGradients.length > 0)\r\n );\r\n }\r\n\r\n protected _setEngineBasedOnBlendMode(blendMode: number): void {\r\n switch (blendMode) {\r\n case BaseParticleSystem.BLENDMODE_MULTIPLYADD:\r\n // Don't want to update engine since there is no equivalent engine alpha mode, instead it gets handled within particleSystem\r\n return;\r\n case BaseParticleSystem.BLENDMODE_ADD:\r\n blendMode = Constants.ALPHA_ADD;\r\n break;\r\n case BaseParticleSystem.BLENDMODE_ONEONE:\r\n blendMode = Constants.ALPHA_ONEONE;\r\n break;\r\n case BaseParticleSystem.BLENDMODE_STANDARD:\r\n blendMode = Constants.ALPHA_COMBINE;\r\n break;\r\n case BaseParticleSystem.BLENDMODE_MULTIPLY:\r\n blendMode = Constants.ALPHA_MULTIPLY;\r\n break;\r\n case BaseParticleSystem.BLENDMODE_SUBTRACT:\r\n blendMode = Constants.ALPHA_SUBTRACT;\r\n break;\r\n default:\r\n // For all other blend modes that were added after the initial particleSystem implementation,\r\n // the ParticleSystem.BLENDMODE_FOO are already mapped to the underlying Constants.ALPHA_FOO\r\n break;\r\n }\r\n this._engine.setAlphaMode(blendMode);\r\n }\r\n\r\n /**\r\n * Defines the delay in milliseconds before starting the system (0 by default)\r\n */\r\n public startDelay = 0;\r\n\r\n /**\r\n * Gets the current list of drag gradients.\r\n * You must use addDragGradient and removeDragGradient to update this list\r\n * @returns the list of drag gradients\r\n */\r\n public getDragGradients(): Nullable<Array<FactorGradient>> {\r\n return this._dragGradients;\r\n }\r\n\r\n /** Gets or sets a value indicating the damping to apply if the limit velocity factor is reached */\r\n public limitVelocityDamping = 0.4;\r\n\r\n /**\r\n * Gets the current list of limit velocity gradients.\r\n * You must use addLimitVelocityGradient and removeLimitVelocityGradient to update this list\r\n * @returns the list of limit velocity gradients\r\n */\r\n public getLimitVelocityGradients(): Nullable<Array<FactorGradient>> {\r\n return this._limitVelocityGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of color gradients.\r\n * You must use addColorGradient and removeColorGradient to update this list\r\n * @returns the list of color gradients\r\n */\r\n public getColorGradients(): Nullable<Array<ColorGradient>> {\r\n return this._colorGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of size gradients.\r\n * You must use addSizeGradient and removeSizeGradient to update this list\r\n * @returns the list of size gradients\r\n */\r\n public getSizeGradients(): Nullable<Array<FactorGradient>> {\r\n return this._sizeGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of color remap gradients.\r\n * You must use addColorRemapGradient and removeColorRemapGradient to update this list\r\n * @returns the list of color remap gradients\r\n */\r\n public getColorRemapGradients(): Nullable<Array<FactorGradient>> {\r\n return this._colorRemapGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of alpha remap gradients.\r\n * You must use addAlphaRemapGradient and removeAlphaRemapGradient to update this list\r\n * @returns the list of alpha remap gradients\r\n */\r\n public getAlphaRemapGradients(): Nullable<Array<FactorGradient>> {\r\n return this._alphaRemapGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of life time gradients.\r\n * You must use addLifeTimeGradient and removeLifeTimeGradient to update this list\r\n * @returns the list of life time gradients\r\n */\r\n public getLifeTimeGradients(): Nullable<Array<FactorGradient>> {\r\n return this._lifeTimeGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of angular speed gradients.\r\n * You must use addAngularSpeedGradient and removeAngularSpeedGradient to update this list\r\n * @returns the list of angular speed gradients\r\n */\r\n public getAngularSpeedGradients(): Nullable<Array<FactorGradient>> {\r\n return this._angularSpeedGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of velocity gradients.\r\n * You must use addVelocityGradient and removeVelocityGradient to update this list\r\n * @returns the list of velocity gradients\r\n */\r\n public getVelocityGradients(): Nullable<Array<FactorGradient>> {\r\n return this._velocityGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of start size gradients.\r\n * You must use addStartSizeGradient and removeStartSizeGradient to update this list\r\n * @returns the list of start size gradients\r\n */\r\n public getStartSizeGradients(): Nullable<Array<FactorGradient>> {\r\n return this._startSizeGradients;\r\n }\r\n\r\n /**\r\n * Gets the current list of emit rate gradients.\r\n * You must use addEmitRateGradient and removeEmitRateGradient to update this list\r\n * @returns the list of emit rate gradients\r\n */\r\n public getEmitRateGradients(): Nullable<Array<FactorGradient>> {\r\n return this._emitRateGradients;\r\n }\r\n\r\n /**\r\n * Random direction of each particle after it has been emitted, between direction1 and direction2 vectors.\r\n * This only works when particleEmitterTyps is a BoxParticleEmitter\r\n */\r\n public get direction1(): Vector3 {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).direction1) {\r\n return (<BoxParticleEmitter>this.particleEmitterType).direction1;\r\n }\r\n\r\n return Vector3.Zero();\r\n }\r\n\r\n public set direction1(value: Vector3) {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).direction1) {\r\n (<BoxParticleEmitter>this.particleEmitterType).direction1 = value;\r\n }\r\n }\r\n\r\n /**\r\n * Random direction of each particle after it has been emitted, between direction1 and direction2 vectors.\r\n * This only works when particleEmitterTyps is a BoxParticleEmitter\r\n */\r\n public get direction2(): Vector3 {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).direction2) {\r\n return (<BoxParticleEmitter>this.particleEmitterType).direction2;\r\n }\r\n\r\n return Vector3.Zero();\r\n }\r\n\r\n public set direction2(value: Vector3) {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).direction2) {\r\n (<BoxParticleEmitter>this.particleEmitterType).direction2 = value;\r\n }\r\n }\r\n\r\n /**\r\n * Minimum box point around our emitter. Our emitter is the center of particles source, but if you want your particles to emit from more than one point, then you can tell it to do so.\r\n * This only works when particleEmitterTyps is a BoxParticleEmitter\r\n */\r\n public get minEmitBox(): Vector3 {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).minEmitBox) {\r\n return (<BoxParticleEmitter>this.particleEmitterType).minEmitBox;\r\n }\r\n\r\n return Vector3.Zero();\r\n }\r\n\r\n public set minEmitBox(value: Vector3) {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).minEmitBox) {\r\n (<BoxParticleEmitter>this.particleEmitterType).minEmitBox = value;\r\n }\r\n }\r\n\r\n /**\r\n * Maximum box point around our emitter. Our emitter is the center of particles source, but if you want your particles to emit from more than one point, then you can tell it to do so.\r\n * This only works when particleEmitterTyps is a BoxParticleEmitter\r\n */\r\n public get maxEmitBox(): Vector3 {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).maxEmitBox) {\r\n return (<BoxParticleEmitter>this.particleEmitterType).maxEmitBox;\r\n }\r\n\r\n return Vector3.Zero();\r\n }\r\n\r\n public set maxEmitBox(value: Vector3) {\r\n if ((<BoxParticleEmitter>this.particleEmitterType).maxEmitBox) {\r\n (<BoxParticleEmitter>this.particleEmitterType).maxEmitBox = value;\r\n }\r\n }\r\n\r\n /**\r\n * Random color of each particle after it has been emitted, between color1 and color2 vectors\r\n */\r\n public color1 = new Color4(1.0, 1.0, 1.0, 1.0);\r\n /**\r\n * Random color of each particle after it has been emitted, between color1 and color2 vectors\r\n */\r\n public color2 = new Color4(1.0, 1.0, 1.0, 1.0);\r\n /**\r\n * Color the particle will have at the end of its lifetime\r\n */\r\n public colorDead = new Color4(0, 0, 0, 1.0);\r\n\r\n /**\r\n * An optional mask to filter some colors out of the texture, or filter a part of the alpha channel\r\n */\r\n public textureMask = new Color4(1.0, 1.0, 1.0, 1.0);\r\n\r\n /**\r\n * The particle emitter type defines the emitter used by the particle system.\r\n * It can be for example box, sphere, or cone...\r\n */\r\n public particleEmitterType: IParticleEmitterType;\r\n\r\n /** @internal */\r\n public _isSubEmitter = false;\r\n\r\n /** @internal */\r\n public _billboardMode = Constants.PARTICLES_BILLBOARDMODE_ALL;\r\n /**\r\n * Gets or sets the billboard mode to use when isBillboardBased = true.\r\n * Value can be: ParticleSystem.BILLBOARDMODE_ALL, ParticleSystem.BILLBOARDMODE_Y, ParticleSystem.BILLBOARDMODE_STRETCHED, ParticleSystem.PARTICLES_BILLBOARDMODE_STRETCHED_LOCAL\r\n */\r\n public get billboardMode(): number {\r\n return this._billboardMode;\r\n }\r\n\r\n public set billboardMode(value: number) {\r\n if (this._billboardMode === value) {\r\n return;\r\n }\r\n\r\n this._billboardMode = value;\r\n this._reset();\r\n }\r\n\r\n /** @internal */\r\n public _isBillboardBased = true;\r\n /**\r\n * Gets or sets a boolean indicating if the particles must be rendered as billboard or aligned with the direction\r\n */\r\n public get isBillboardBased(): boolean {\r\n return this._isBillboardBased;\r\n }\r\n\r\n public set isBillboardBased(value: boolean) {\r\n if (this._isBillboardBased === value) {\r\n return;\r\n }\r\n\r\n this._isBillboardBased = value;\r\n this._reset();\r\n }\r\n\r\n /**\r\n * The scene the particle system belongs to.\r\n */\r\n protected _scene: Nullable<Scene>;\r\n\r\n /**\r\n * The engine the particle system belongs to.\r\n */\r\n protected _engine: AbstractEngine;\r\n\r\n /**\r\n * Local cache of defines for image processing.\r\n */\r\n protected _imageProcessingConfigurationDefines = new ImageProcessingConfigurationDefines();\r\n\r\n /**\r\n * Default configuration related to image processing available in the standard Material.\r\n */\r\n protected _imageProcessingConfiguration: Nullable<ImageProcessingConfiguration>;\r\n\r\n /**\r\n * Gets the image processing configuration used either in this material.\r\n */\r\n public get imageProcessingConfiguration(): Nullable<ImageProcessingConfiguration> {\r\n return this._imageProcessingConfiguration;\r\n }\r\n\r\n /**\r\n * Sets the Default image processing configuration used either in the this material.\r\n *\r\n * If sets to null, the scene one is in use.\r\n */\r\n public set imageProcessingConfiguration(value: Nullable<ImageProcessingConfiguration>) {\r\n this._attachImageProcessingConfiguration(value);\r\n }\r\n\r\n /**\r\n * Attaches a new image processing configuration to the Standard Material.\r\n * @param configuration\r\n */\r\n protected _attachImageProcessingConfiguration(configuration: Nullable<ImageProcessingConfiguration>): void {\r\n if (configuration === this._imageProcessingConfiguration) {\r\n return;\r\n }\r\n\r\n // Pick the scene configuration if needed.\r\n if (!configuration && this._scene) {\r\n this._imageProcessingConfiguration = this._scene.imageProcessingConfiguration;\r\n } else {\r\n this._imageProcessingConfiguration = configuration;\r\n }\r\n }\r\n\r\n /** @internal */\r\n protected _reset() {}\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _removeGradientAndTexture(gradient: number, gradients: Nullable<IValueGradient[]>, texture: Nullable<RawTexture>): BaseParticleSystem {\r\n if (!gradients) {\r\n return this;\r\n }\r\n\r\n let index = 0;\r\n for (const valueGradient of gradients) {\r\n if (valueGradient.gradient === gradient) {\r\n gradients.splice(index, 1);\r\n break;\r\n }\r\n index++;\r\n }\r\n\r\n if (texture) {\r\n texture.dispose();\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Instantiates a particle system.\r\n * Particles are often small sprites used to simulate hard-to-reproduce phenomena like fire, smoke, water, or abstract visual effects like magic glitter and faery dust.\r\n * @param name The name of the particle system\r\n */\r\n public constructor(name: string) {\r\n this.id = name;\r\n this.name = name;\r\n }\r\n\r\n /**\r\n * Creates a Point Emitter for the particle system (emits directly from the emitter position)\r\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the box\r\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the box\r\n */\r\n public createPointEmitter(direction1: Vector3, direction2: Vector3): PointParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a Hemisphere Emitter for the particle system (emits along the hemisphere radius)\r\n * @param radius The radius of the hemisphere to emit from\r\n * @param radiusRange The range of the hemisphere to emit from [0-1] 0 Surface Only, 1 Entire Radius\r\n */\r\n public createHemisphericEmitter(radius = 1, radiusRange = 1): HemisphericParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a Sphere Emitter for the particle system (emits along the sphere radius)\r\n * @param radius The radius of the sphere to emit from\r\n * @param radiusRange The range of the sphere to emit from [0-1] 0 Surface Only, 1 Entire Radius\r\n */\r\n public createSphereEmitter(radius = 1, radiusRange = 1): SphereParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a Directed Sphere Emitter for the particle system (emits between direction1 and direction2)\r\n * @param radius The radius of the sphere to emit from\r\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the sphere\r\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the sphere\r\n */\r\n public createDirectedSphereEmitter(radius = 1, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)): SphereDirectedParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a Cylinder Emitter for the particle system (emits from the cylinder to the particle position)\r\n * @param radius The radius of the emission cylinder\r\n * @param height The height of the emission cylinder\r\n * @param radiusRange The range of emission [0-1] 0 Surface only, 1 Entire Radius\r\n * @param directionRandomizer How much to randomize the particle direction [0-1]\r\n */\r\n public createCylinderEmitter(radius = 1, height = 1, radiusRange = 1, directionRandomizer = 0): CylinderParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a Directed Cylinder Emitter for the particle system (emits between direction1 and direction2)\r\n * @param radius The radius of the cylinder to emit from\r\n * @param height The height of the emission cylinder\r\n * @param radiusRange the range of the emission cylinder [0-1] 0 Surface only, 1 Entire Radius (1 by default)\r\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the cylinder\r\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the cylinder\r\n */\r\n public createDirectedCylinderEmitter(\r\n radius = 1,\r\n height = 1,\r\n radiusRange = 1,\r\n direction1 = new Vector3(0, 1.0, 0),\r\n direction2 = new Vector3(0, 1.0, 0)\r\n ): CylinderDirectedParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a Cone Emitter for the particle system (emits from the cone to the particle position)\r\n * @param radius The radius of the cone to emit from\r\n * @param angle The base angle of the cone\r\n */\r\n public createConeEmitter(radius = 1, angle = Math.PI / 4): ConeParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a Cone Emitter for the particle system (emits from the cone to the particle position)\r\n * @param radius The radius of the cone to emit from\r\n * @param angle The base angle of the cone\r\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the cone\r\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the cone\r\n */\r\n public createDirectedConeEmitter(radius = 1, angle = Math.PI / 4, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)): ConeDirectedParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a Box Emitter for the particle system. (emits between direction1 and direction2 from withing the box defined by minEmitBox and maxEmitBox)\r\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the box\r\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the box\r\n * @param minEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox\r\n * @param maxEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox\r\n */\r\n public createBoxEmitter(direction1: Vector3, direction2: Vector3, minEmitBox: Vector3, maxEmitBox: Vector3): BoxParticleEmitter {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n}\r\n\r\n// Register Class Name\r\nRegisterClass(\"BABYLON.BaseParticleSystem\", BaseParticleSystem);\r\n"]}
@@ -114,6 +114,10 @@ export declare class ParticleSystem extends ThinParticleSystem {
114
114
  * @param attractor The attractor to remove from the particle system
115
115
  */
116
116
  removeAttractor(attractor: Attractor): void;
117
+ /**
118
+ * Starts the particle system and begins to emit
119
+ * @param delay defines the delay in milliseconds before starting the system (this.startDelay by default)
120
+ */
117
121
  start(delay?: number): void;
118
122
  /**
119
123
  * Creates a Hemisphere Emitter for the particle system (emits along the hemisphere radius)
@@ -163,6 +167,14 @@ export declare class ParticleSystem extends ThinParticleSystem {
163
167
  * @returns the emitter
164
168
  */
165
169
  createConeEmitter(radius?: number, angle?: number): ConeParticleEmitter;
170
+ /**
171
+ * Creates a Cone Emitter for the particle system (emits from the cone to the particle position)
172
+ * @param radius The radius of the cone to emit from
173
+ * @param angle The base angle of the cone
174
+ * @param direction1 Particles are emitted between the direction1 and direction2 from within the cone
175
+ * @param direction2 Particles are emitted between the direction1 and direction2 from within the cone
176
+ * @returns the emitter
177
+ */
166
178
  createDirectedConeEmitter(radius?: number, angle?: number, direction1?: Vector3, direction2?: Vector3): ConeDirectedParticleEmitter;
167
179
  /**
168
180
  * Creates a Box Emitter for the particle system. (emits between direction1 and direction2 from withing the box defined by minEmitBox and maxEmitBox)
@@ -164,6 +164,10 @@ export class ParticleSystem extends ThinParticleSystem {
164
164
  _RemoveFromQueue(this._attractorUpdate);
165
165
  }
166
166
  }
167
+ /**
168
+ * Starts the particle system and begins to emit
169
+ * @param delay defines the delay in milliseconds before starting the system (this.startDelay by default)
170
+ */
167
171
  start(delay = this.startDelay) {
168
172
  if (!this.canStart()) {
169
173
  return;
@@ -242,6 +246,14 @@ export class ParticleSystem extends ThinParticleSystem {
242
246
  this.particleEmitterType = particleEmitter;
243
247
  return particleEmitter;
244
248
  }
249
+ /**
250
+ * Creates a Cone Emitter for the particle system (emits from the cone to the particle position)
251
+ * @param radius The radius of the cone to emit from
252
+ * @param angle The base angle of the cone
253
+ * @param direction1 Particles are emitted between the direction1 and direction2 from within the cone
254
+ * @param direction2 Particles are emitted between the direction1 and direction2 from within the cone
255
+ * @returns the emitter
256
+ */
245
257
  createDirectedConeEmitter(radius = 1, angle = Math.PI / 4, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {
246
258
  const particleEmitter = CreateDirectedConeEmitter(radius, angle, direction1, direction2);
247
259
  this.particleEmitterType = particleEmitter;