Class SphereParticleEmitter
Hierarchy (View Summary)
- SphereParticleEmitter
Implements
Constructors
constructor
-
new SphereParticleEmitter(
radius?: number,
radiusRange?: number,
directionRandomizer?: number,
): SphereParticleEmitterCreates a new instance SphereParticleEmitter
Parameters
- radius: number = 1
the radius of the emission sphere (1 by default)
- radiusRange: number = 1
the range of the emission sphere [0-1] 0 Surface only, 1 Entire Radius (1 by default)
- directionRandomizer: number = 0
defines how much to randomize the particle direction [0-1]
Returns SphereParticleEmitter
- radius: number = 1
Properties
direction Randomizer
[0] How much to randomize the particle direction [0-1].
radius
[1] The radius of the emission sphere.
radius Range
[1] The range of emission [0-1] 0 Surface only, 1 Entire Radius.
Methods
apply To Shader
-
Called by the GPUParticleSystem to setup the update shader
Parameters
- uboOrEffect: UniformBufferEffectCommonAccessor
defines the update shader
Returns void
- uboOrEffect: UniformBufferEffectCommonAccessor
build Uniform Layout
-
Creates the structure of the ubo for this particle emitter
Parameters
- ubo: UniformBuffer
ubo to create the structure for
Returns void
- ubo: UniformBuffer
clone
get Class Name
-
Returns the string "SphereParticleEmitter"
Returns string
a string containing the class name
get Effect Defines
-
Returns a string to use to update the GPU particles update shader
Returns string
a string containing the defines string
parse
-
Parse properties from a JSON object
Parameters
- serializationObject: any
defines the JSON object
Returns void
- serializationObject: any
serialize
-
Serializes the particle system to a JSON object.
Returns any
the JSON object
Particle emitter emitting particles from the inside of a sphere. It emits the particles alongside the sphere radius. The emission direction might be randomized.