Options
All
  • Public
  • Public/Protected
  • All
Menu

Class representing texture that can be animated

deprecated

no longer supported and should not be used in new code

Hierarchy

  • Texture

Index

Constructors

Methods

  • getResolution(): { h: number; w: number }
  • Returns { h: number; w: number }

    texture resolution after recalculating it with pixel scale

    • h: number
    • w: number
  • getTexture(token: number): string
  • resetAnimation(token: number): Texture
  • setAnimation(animation: string[], delay: number): Texture
  • Makes texture animated

    Parameters

    • animation: string[]

      array of paths to the animation frames. Each frame should be stored in a separate file

    • delay: number

      specifies each frame delay in ticks

    Returns Texture

    reference to itself to be used in sequential calls

  • setPixelScale(scale: number): Texture
  • setResolution(w: number, h: number): Texture
  • Specifies texture resolution. If not equal to file dimensions, the image will be stretched to fit the resolution

    Parameters

    • w: number
    • h: number

    Returns Texture

    reference to itself to be used in sequential calls

  • Sets texture file path

    Parameters

    • path: string

    Returns Texture

    reference to itself to be used in sequential calls

Generated using TypeDoc