SphereParticleEmitter

Particle emitter emitting particles from the inside of a sphere. It emits the particles alongside the sphere radius. The emission direction might be randomized.

Hierarchy

Implements

Index

Constructors

constructor

  • Creates a new instance SphereParticleEmitter

    Parameters

    • Optional radius: number

      the radius of the emission sphere (1 by default)

    • Optional directionRandomizer: number

      defines how much to randomize the particle direction [0-1]

    Returns SphereParticleEmitter

Properties

directionRandomizer

directionRandomizer: number

How much to randomize the particle direction [0-1].

radius

radius: number

The radius of the emission sphere.

Methods

applyToShader

  • applyToShader(effect: Effect): void

clone

getClassName

  • getClassName(): string

getEffectDefines

  • getEffectDefines(): string

parse

  • parse(serializationObject: any): void
  • Parse properties from a JSON object

    Parameters

    • serializationObject: any

      defines the JSON object

    Returns void

serialize

  • serialize(): any

startDirectionFunction

  • startDirectionFunction(emitPower: number, worldMatrix: Matrix, directionToUpdate: Vector3, particle: Particle): void
  • Called by the particle System when the direction is computed for the created particle.

    Parameters

    • emitPower: number

      is the power of the particle (speed)

    • 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

    Returns void

startPositionFunction

  • Called by the particle System when the position is computed for the created particle.

    Parameters

    • worldMatrix: Matrix

      is the world matrix of the particle system

    • positionToUpdate: Vector3

      is the position vector to update with the result

    • particle: Particle

      is the particle we are computed the position for

    Returns void

Generated using TypeDoc