Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BoxParticleEmitter

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

Hierarchy

  • BoxParticleEmitter

Implements

Index

Constructors

constructor

  • Creates a new instance BoxParticleEmitter

    Returns BoxParticleEmitter

Properties

direction1Search playground for direction1

direction1: Vector3

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

direction2Search playground for direction2

direction2: Vector3

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

maxEmitBoxSearch playground for maxEmitBox

maxEmitBox: Vector3

Maximum box point around our emitter. Our emitter is the center of particles source, but if you want your particles to emit from more than one point, then you can tell it to do so.

minEmitBoxSearch playground for minEmitBox

minEmitBox: Vector3

Minimum box point around our emitter. Our emitter is the center of particles source, but if you want your particles to emit from more than one point, then you can tell it to do so.

Methods

applyToShaderSearch playground for applyToShader

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

    Parameters

    • uboOrEffect: UniformBufferEffectCommonAccessor

      defines the update shader

    Returns void

buildUniformLayoutSearch playground for buildUniformLayout

cloneSearch playground for clone

getClassNameSearch playground for getClassName

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

    Returns string

    a string containing the class name

getEffectDefinesSearch playground for getEffectDefines

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

    Returns string

    a string containing the defines string

parseSearch playground for parse

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

    Parameters

    • serializationObject: any

      defines the JSON object

    Returns void

serializeSearch playground for serialize

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

    Returns any

    the JSON object

startDirectionFunctionSearch playground for startDirectionFunction

  • 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

startPositionFunctionSearch playground for startPositionFunction

  • 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
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method