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

Find examples in Playground
  • new SphereParticleEmitter(radius?: number, radiusRange?: number, directionRandomizer?: number): SphereParticleEmitter
  • Creates a new instance SphereParticleEmitter

    Parameters

    • Optional radius: number

      the radius of the emission sphere (1 by default)

    • Optional radiusRange: number

      the range of the emission sphere [0-1] 0 Surface only, 1 Entire Radius (1 by default)

    • Optional directionRandomizer: number

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

    Returns SphereParticleEmitter

Properties

directionRandomizer

Find examples in Playground
directionRandomizer: number

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

radius

Find examples in Playground
radius: number

The radius of the emission sphere.

radiusRange

Find examples in Playground
radiusRange: number

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

Methods

applyToShader

Find examples in Playground
  • applyToShader(effect: Effect): void

clone

Find examples in Playground

getClassName

Find examples in Playground
  • getClassName(): string

getEffectDefines

Find examples in Playground
  • getEffectDefines(): string

parse

Find examples in Playground
  • parse(serializationObject: any): void
  • Parse properties from a JSON object

    Parameters

    • serializationObject: any

      defines the JSON object

    Returns void

serialize

Find examples in Playground
  • serialize(): any

startDirectionFunction

Find examples in Playground
  • 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

    Returns void

startPositionFunction

Find examples in Playground
  • 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