API

Interface IParticleEmitterType

Particle emitter represents a volume emitting particles. This is the responsibility of the implementation to define the volume shape like cone/sphere/box.

interface IParticleEmitterType {
    applyToShader(uboOrEffect: UniformBufferEffectCommonAccessor): void;
    buildUniformLayout(ubo: UniformBuffer): void;
    clone(): IParticleEmitterType;
    getClassName(): string;
    getEffectDefines(): string;
    parse(serializationObject: any, scene: Nullable<Scene>): void;
    serialize(): any;
    startDirectionFunction(
        worldMatrix: Matrix,
        directionToUpdate: Vector3,
        particle: Particle,
        isLocal: boolean,
        inverseWorldMatrix: Matrix,
    ): void;
    startPositionFunction(
        worldMatrix: Matrix,
        positionToUpdate: Vector3,
        particle: Particle,
        isLocal: boolean,
    ): void;
}

Implemented by

Index
  • Called 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

  • 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

    • isLocal: boolean

      defines if the position should be set in local space

    Returns void