Texture sheet animation module

TextureSheetAnimationModule

2024.4.10

yisky

Hierarchy (view full)

Constructors

Properties

_enable: boolean = false
animation: ParticleSystemAnimationType = ParticleSystemAnimationType.WholeSheet

Specifies the animation type.

TextureSheetAnimationModule

frameOverTime: MinMaxCurve = ...

A curve to control which frame of the Texture sheet animation to play.

TextureSheetAnimationModule

rowMode: ParticleSystemAnimationRowMode = ParticleSystemAnimationRowMode.Random

Select how particles choose which row of a Texture Sheet Animation to use.

TextureSheetAnimationModule

speedRange: Vector2 = ...

Specify how particle speeds are mapped to the animation frames. If a particle is travelling slower than the minimum speed, it uses the first frame. If a particle is travelling faster than the maximum speed, then it uses the final frame. For all other speeds, the particle chooses a frame based on how far between the minimum and maximum value its speed is.

TextureSheetAnimationModule

startFrame: MinMaxCurve = ...

Define a random starting frame for the Texture sheet animation.

TextureSheetAnimationModule

timeMode: ParticleSystemAnimationTimeMode = ParticleSystemAnimationTimeMode.Lifetime

Select whether the system bases the playback on mapping a curve to the lifetime of each particle, by using the particle speeds, or if playback simply uses a constant frames per second.

TextureSheetAnimationModule

Accessors

  • get cycleCount(): number
  • Specifies how many times the animation loops during the lifetime of the particle.

    Returns number

    TextureSheetAnimationModule

  • set cycleCount(value): void
  • Specifies how many times the animation loops during the lifetime of the particle.

    Parameters

    • value: number

    Returns void

    TextureSheetAnimationModule

  • 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 frameOverTimeMultiplier(): number
  • The frame over time mutiplier.

    Returns number

    TextureSheetAnimationModule

  • set frameOverTimeMultiplier(value): void
  • The frame over time mutiplier.

    Parameters

    • value: number

    Returns void

    TextureSheetAnimationModule

  • get numTilesX(): number
  • Defines the tiling of the Texture in the x-axis.

    Returns number

    TextureSheetAnimationModule

  • set numTilesX(value): void
  • Defines the tiling of the Texture in the x-axis.

    Parameters

    • value: number

    Returns void

    TextureSheetAnimationModule

  • get numTilesY(): number
  • Defines the tiling of the Texture in the y-axis.

    Returns number

    TextureSheetAnimationModule

  • set numTilesY(value): void
  • Defines the tiling of the Texture in the y-axis.

    Parameters

    • value: number

    Returns void

    TextureSheetAnimationModule

  • get rowIndex(): number
  • Explicitly select which row of the Texture sheet to use.

    Returns number

    TextureSheetAnimationModule

  • set rowIndex(value): void
  • Explicitly select which row of the Texture sheet to use.

    Parameters

    • value: number

    Returns void

    TextureSheetAnimationModule

  • get startFrameMultiplier(): number
  • The starting frame multiplier.

    Returns number

    TextureSheetAnimationModule

  • set startFrameMultiplier(value): void
  • The starting frame multiplier.

    Parameters

    • value: number

    Returns void

    TextureSheetAnimationModule

Methods

  • Protected

    Enable callback

    Returns void

    ParticleModule

  • Protected

    Serialize

    Parameters

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

    Returns void

    TextureSheetAnimationModule

  • Emit event

    Parameters

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

    Returns void

    EventDispatcher

  • Deserialize

    Parameters

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

    Returns void

    TextureSheetAnimationModule

  • 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