Main module

MainModule

2024.3.22

yisky

Hierarchy (view full)

Constructors

Properties

_enable: boolean = false
duration: number = 5.0

The duration of the particle emitter in secodns.

MainModule

flipRotation: number = 0.0

Makes some particles spin in the opposite direction.

MainModule

gravityModifier: MinMaxCurve = ...

A scale that this Particle System applies to gravity.

MainModule

looping: boolean = true

Specifies whether the particle emitter loop.

MainModule

prewarm: boolean = false

When looping is enabled, this controls whether this particle system will look like it has already simulated for one loop when first becoming visible.

MainModule

simulationSpace: ParticleSystemSimulationSpace = ParticleSystemSimulationSpace.Local

This selects the space in which to simulate particles. It can be either world or local space.

MainModule

simulationSpeed: number = 1.0

Override the default playback speed of the Particle System.

MainModule

startColor: MinMaxGradient = ...

The initial color of particles when the Particle System first spawns them.

MainModule

startDelay: MinMaxCurve = ...

Start delay in seconds.

MainModule

startLifetime: MinMaxCurve = ...

The total lifetime in seconds that each new particle has.

MainModule

startRotation3D: boolean = false

A flag to enable 3D particle rotation.

MainModule

startRotationX: MinMaxCurve = ...

The initial rotation of particles around the x-axis when emitted.

MainModule

startRotationY: MinMaxCurve = ...

The initial rotation of particles around the y-axis when emitted.

MainModule

startRotationZ: MinMaxCurve = ...

The initial rotation of particles around the z-axis when emitted.

MainModule

startSize3D: boolean = false

A flag to enable specifying particle size individually for each axis.

MainModule

startSizeX: MinMaxCurve = ...

The initial size of particles along the x-axis when the Particle System first spawns them.

MainModule

startSizeY: MinMaxCurve = ...

The initial size of particles along the y-axis when the Particle System first spawns them.

MainModule

startSizeZ: MinMaxCurve = ...

The initial size of particles along the z-axis when the Particle System first spawns them.

MainModule

startSpeed: MinMaxCurve = ...

The initial speed of particles when the Particle System first spawns them.

MainModule

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 gravityModifierMultiplier(): number
  • Change the gravity multiplier.

    Returns number

    MainModule

  • set gravityModifierMultiplier(value): void
  • Change the gravity multiplier.

    Parameters

    • value: number

    Returns void

    MainModule

  • get maxParticles(): number
  • Get the maximum number of particles to emit.

    Returns number

    MainModule

  • set maxParticles(value): void
  • Set the maximum number of particles to emit.

    Parameters

    • value: number

    Returns void

    MainModule

  • get scalingMode(): ParticleSystemScalingMode
  • Control how the Particle System applies its Transform component to the particles it emits.

    Returns ParticleSystemScalingMode

    MainModule

  • set scalingMode(value): void
  • Control how the Particle System applies its Transform component to the particles it emits.

    Parameters

    Returns void

    MainModule

  • get startDelayMultiplier(): number
  • A multiplier for ParticleSystem.MainModule.startDelay in seconds.

    Returns number

    MainModule

  • set startDelayMultiplier(value): void
  • A multiplier for ParticleSystem.MainModule.startDelay in seconds.

    Parameters

    • value: number

    Returns void

    MainModule

  • get startLifetimeMultiplier(): number
  • A multiplier for ParticleSystem.MainModule.startLifetime.

    Returns number

    MainModule

  • set startLifetimeMultiplier(value): void
  • A multiplier for ParticleSystem.MainModule.startLifetime.

    Parameters

    • value: number

    Returns void

    MainModule

  • get startRotation(): MinMaxCurve
  • The initial rotation of particles when the Particle System first spawns them.

    Returns MinMaxCurve

    MainModule

  • get startRotationMultiplier(): number
  • A multiplier for ParticleSystem.MainModule.startRotation.

    Returns number

    MainModule

  • set startRotationMultiplier(value): void
  • A multiplier for ParticleSystem.MainModule.startRotation.

    Parameters

    • value: number

    Returns void

    MainModule

  • get startRotationXMultiplier(): number
  • The initial rotation multiplier of particles around the x-axis when the Particle System first spawns them.

    Returns number

    MainModule

  • set startRotationXMultiplier(value): void
  • The initial rotation multiplier of particles around the x-axis when the Particle System first spawns them.

    Parameters

    • value: number

    Returns void

    MainModule

  • get startRotationYMultiplier(): number
  • The initial rotation multiplier of particles around the y-axis when the Particle System first spawns them.

    Returns number

    MainModule

  • set startRotationYMultiplier(value): void
  • The initial rotation multiplier of particles around the y-axis when the Particle System first spawns them.

    Parameters

    • value: number

    Returns void

    MainModule

  • get startRotationZMultiplier(): number
  • The initial rotation multiplier of particles around the z-axis when the Particle System first spawns them.

    Returns number

    MainModule

  • set startRotationZMultiplier(value): void
  • The initial rotation multiplier of particles around the z-axis when the Particle System first spawns them.

    Parameters

    • value: number

    Returns void

    MainModule

  • get startSize(): MinMaxCurve
  • The initial size of particles when the Particle System first spawns them.

    Returns MinMaxCurve

    MainModule

  • get startSizeMultiplier(): number
  • A multiplier for the initial size of particles when the Particle System first spawns them.

    Returns number

    MainModule

  • set startSizeMultiplier(value): void
  • A multiplier for the initial size of particles when the Particle System first spawns them.

    Parameters

    • value: number

    Returns void

    MainModule

  • get startSizeXMultiplier(): number
  • A multiplier for ParticleSystem.MainModule.startSizeX.

    Returns number

    MainModule

  • set startSizeXMultiplier(value): void
  • A multiplier for ParticleSystem.MainModule.startSizeX.

    Parameters

    • value: number

    Returns void

    MainModule

  • get startSizeYMultiplier(): number
  • A multiplier for ParticleSystem.MainModule.startSizeY.

    Returns number

    MainModule

  • set startSizeYMultiplier(value): void
  • A multiplier for ParticleSystem.MainModule.startSizeY.

    Parameters

    • value: number

    Returns void

    MainModule

  • get startSizeZMultiplier(): number
  • A multiplier for ParticleSystem.MainModule.startSizeZ.

    Returns number

    MainModule

  • set startSizeZMultiplier(value): void
  • A multiplier for ParticleSystem.MainModule.startSizeZ.

    Parameters

    • value: number

    Returns void

    MainModule

  • get startSpeedMultiplier(): number
  • A multiplier for ParticleSystem.MainModule.startSpeed.

    Returns number

    MainModule

  • set startSpeedMultiplier(value): void
  • A multiplier for ParticleSystem.MainModule.startSpeed.

    Parameters

    • value: number

    Returns void

    MainModule

Methods

  • Protected

    Enable callback

    Returns void

    ParticleModule

  • Protected

    Serialize

    Parameters

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

    Returns void

    MainModule

  • Emit event

    Parameters

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

    Returns void

    EventDispatcher

  • 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