Lights module

LightsModule

2024.7.2

yisky

Hierarchy (view full)

Constructors

Properties

_enable: boolean = false
alphaAffectsIntensity: boolean = false

Toggle whether the system multiplies the particle alpha by the light intensity when it computes the final light intensity.

LightsModule

intensity: MinMaxCurve = ...

Define a curve to apply custom intensity scaling to particle Lights.

LightsModule

range: MinMaxCurve = ...

Define a curve to apply custom range scaling to particle Lights.

LightsModule

sizeAffectsRange: boolean = false

Toggle whether the system multiplies the particle size by the light range to determine the final light range.

LightsModule

useParticleColor: boolean = false

Toggle whether the particle lights multiply their color by the particle color.

LightsModule

useRandomDistribution: boolean = false

Randomly assign Lights to new particles based on ratio.

LightsModule

Accessors

  • get enable(): boolean
  • Specifies whether enable the module.

    Returns boolean

    ParticleModule

  • set enable(value): void
  • Specifies whether enable the module.

    Parameters

    • value: boolean

    Returns void

    ParticleModule

  • get intensityMultiplier(): number
  • Intensity multiplier

    Returns number

    LightsModule

  • set intensityMultiplier(value): void
  • Intensity multiplier

    Parameters

    • value: number

    Returns void

    LightsModule

  • set light(value): void
  • Particle light

    Parameters

    Returns void

    LightsModule

  • get maxLights(): number
  • The limit on how many Lights this Module can create.

    Returns number

    LightsModule

  • set maxLights(value): void
  • The limit on how many Lights this Module can create.

    Parameters

    • value: number

    Returns void

    LightsModule

  • get rangeMultiplier(): number
  • Range multiplier

    Returns number

    LightsModule

  • set rangeMultiplier(value): void
  • Range multiplier

    Parameters

    • value: number

    Returns void

    LightsModule

  • get ratio(): number
  • A value between 0 and 1 describing the proportion of particles that will receive a light.

    Returns number

    LightsModule

  • set ratio(value): void
  • A value between 0 and 1 describing the proportion of particles that will receive a light.

    Parameters

    • value: number

    Returns void

    LightsModule

Methods

  • Protected

    Serialize

    Parameters

    • meta: {
          [key: string]: any;
      }
      • [key: string]: any

    Returns void

    LightsModule

  • Emit event

    Parameters

    • event: {
          type: string;
          [key: string]: any;
      }
      • [key: string]: any
      • type: string

    Returns void

    EventDispatcher

  • Parameters

    • json: {
          [key: string]: any;
      }
      • [key: string]: any

    Returns void

    LightsModule

  • Unsubscribe a event, if the callback param is not defined, all subscribers of this type will be removed.

    Parameters

    • type: string
    • Optionalcallback: SubscriberCallbackFn

      subscriber callback

    Returns void

    EventDispatcher

  • Subscribe a event

    Parameters

    • type: string

      event type

    • callback: SubscriberCallbackFn

      callback functions

    • Optionaloptions: {
          priority?: Priority;
          target?: any;
      }

      options

      • Optionalpriority?: Priority
      • Optionaltarget?: any

    Returns void

    EventDispatcher

  • Subscribe a event, just emit once

    Parameters

    • type: string
    • callback: SubscriberCallbackFn

      subscriber callback

    • Optionaloptions: {
          priority?: Priority;
          target?: any;
      }
      • Optionalpriority?: Priority
      • Optionaltarget?: any

    Returns void

    EventDispatcher

  • Serialize

    Returns {
        [key: string]: any;
    }

    • [key: string]: any

    ParticleModule