Class CylinderParticleEmitter
Hierarchy (View Summary)
- CylinderParticleEmitter
Implements
Constructors
constructor
-
new CylinderParticleEmitter(
radius?: number,
height?: number,
radiusRange?: number,
directionRandomizer?: number,
): CylinderParticleEmitterCreates a new instance CylinderParticleEmitter
Parameters
- radius: number = 1
the radius of the emission cylinder (1 by default)
- height: number = 1
the height of the emission cylinder (1 by default)
- radiusRange: number = 1
the range of the emission cylinder [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 CylinderParticleEmitter
- radius: number = 1
Properties
direction Randomizer
[0] How much to randomize the particle direction [0-1].
height
[1] The height of the emission cylinder.
radius
[1] The radius of the emission cylinder.
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 "CylinderParticleEmitter"
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
start Direction Function
-
startDirectionFunction(
worldMatrix: Matrix,
directionToUpdate: Vector3,
particle: Particle,
isLocal: boolean,
inverseWorldMatrix: Matrix,
): voidCalled by the particle System when the direction is computed for the created particle.
Parameters
- worldMatrix: Matrix
is the world matrix of the particle system
- directionToUpdate: Vector3
is the direction vector to update with the result
- particle: Particle
is the particle we are computed the direction for
- isLocal: boolean
defines if the direction should be set in local space
- inverseWorldMatrix: Matrix
defines the inverted world matrix to use if isLocal is false
Returns void
- worldMatrix: Matrix
Particle emitter emitting particles from the inside of a cylinder. It emits the particles alongside the cylinder radius. The emission direction might be randomized.