Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConeParticleEmitter

Particle emitter emitting particles from the inside of a cone. It emits the particles alongside the cone volume from the base to the particle. The emission direction might be randomized.

Hierarchy

  • ConeParticleEmitter

Implements

Index

Constructors

constructor

  • new ConeParticleEmitter(radius?: number, angle?: number, directionRandomizer?: number): ConeParticleEmitter
  • Creates a new instance ConeParticleEmitter

    Parameters

    • Optional radius: number

      the radius of the emission cone (1 by default)

    • Optional angle: number

      the cone base angle (PI by default)

    • Optional directionRandomizer: number

      defines how much to randomize the particle direction [0-1] (default is 0)

    Returns ConeParticleEmitter

Properties

directionRandomizerSearch playground for directionRandomizer

directionRandomizer: number

defines how much to randomize the particle direction [0-1] (default is 0)

emitFromSpawnPointOnlySearch playground for emitFromSpawnPointOnly

emitFromSpawnPointOnly: boolean

Gets or sets a value indicating if all the particles should be emitted from the spawn point only (the base of the cone)

heightRangeSearch playground for heightRange

heightRange: number

Gets or sets a value indicating where on the height the start position should be picked (1 = everywhere, 0 = only surface)

radiusRangeSearch playground for radiusRange

radiusRange: number

Gets or sets a value indicating where on the radius the start position should be picked (1 = everywhere, 0 = only surface)

Accessors

angle

  • get angle(): number
  • set angle(value: number): any
  • Gets or sets the angle of the emission cone

    Returns number

  • Gets or sets the angle of the emission cone

    Parameters

    • value: number

    Returns any

radius

  • get radius(): number
  • set radius(value: number): any
  • Gets or sets the radius of the emission cone

    Returns number

  • Gets or sets the radius of the emission cone

    Parameters

    • value: number

    Returns any

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

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