Options
All
  • Public
  • Public/Protected
  • All
Menu

Particle emitter emitting particles from the inside of a sphere. It emits the particles randomly between two vectors.

Hierarchy

Index

Constructors

  • Creates a new instance SphereDirectedParticleEmitter

    Parameters

    • Optional radius: number

      the radius of the emission sphere (1 by default)

    • Optional direction1: Vector3

      the min limit of the emission direction (up vector by default)

    • Optional direction2: Vector3

      the max limit of the emission direction (up vector by default)

    Returns SphereDirectedParticleEmitter

Properties

direction1: Vector3

The min limit of the emission direction.

direction2: Vector3

The max limit of the emission direction.

directionRandomizer: number

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

radius: number

The radius of the emission sphere.

radiusRange: number

The range of emission [0-1] 0 Surface only, 1 Entire Radius.

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 "SphereDirectedParticleEmitter"

    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(serializationObject: any): void
  • Parse properties from a JSON object

    Parameters

    • serializationObject: any

      defines the JSON object

    Returns void

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

    Returns any

    the JSON object

  • startDirectionFunction(worldMatrix: Matrix, directionToUpdate: Vector3): 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

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

Settings

Theme