Options
All
  • Public
  • Public/Protected
  • All
Menu

Particle emitter emitting particles from the inside of a box. It emits the particles randomly between 2 given directions.

Hierarchy

  • MeshParticleEmitter

Implements

Index

Constructors

  • Creates a new instance MeshParticleEmitter

    Parameters

    Returns MeshParticleEmitter

Properties

direction1: Vector3

Random direction of each particle after it has been emitted, between direction1 and direction2 vectors.

direction2: Vector3

Random direction of each particle after it has been emitted, between direction1 and direction2 vectors.

useMeshNormalsForDirection: boolean

Gets or sets a boolean indicating that particle directions must be built from mesh face normals

Accessors

  • Defines the mesh to use as source

    Returns Nullable<AbstractMesh>

  • Defines the mesh to use as source

    Parameters

    Returns void

Methods

  • applyToShader(uboOrEffect: UniformBufferEffectCommonAccessor): void
  • Called by the GPUParticleSystem to setup the update shader

    Parameters

    • uboOrEffect: UniformBufferEffectCommonAccessor

      defines the update shader

    Returns void

  • getClassName(): string
  • Returns the string "BoxParticleEmitter"

    Returns string

    a string containing the class name

  • getEffectDefines(): string
  • Returns a string to use to update the GPU particles update shader

    Returns string

    a string containing the defines string

  • Parse properties from a JSON object

    Parameters

    • serializationObject: any

      defines the JSON object

    • scene: Nullable<Scene>

      defines the hosting scene

    Returns void

  • serialize(): any
  • Serializes the particle system to a JSON object.

    Returns any

    the JSON object

  • startDirectionFunction(worldMatrix: Matrix, directionToUpdate: Vector3, particle: Particle, isLocal: boolean): void
  • 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

    Returns void

  • startPositionFunction(worldMatrix: Matrix, positionToUpdate: Vector3, particle: Particle, isLocal: boolean): 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

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Property
  • Method
  • Inherited constructor
  • Static method

Settings

Theme