Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SpritePacker

Hierarchy

  • SpritePacker

Index

Constructors

Properties

Methods

Constructors

constructor

  • new SpritePacker(gl: WebGLRenderingContext, width: number, height: number, nullSprite: boolean, padding: number): SpritePacker
  • Parameters

    • gl: WebGLRenderingContext
    • width: number
    • height: number
    • nullSprite: boolean
    • padding: number

    Returns SpritePacker

Properties

height

height: number

inverseTextureSize

inverseTextureSize: Vec2

texture

texture: WebGLTexture

width

width: number

Methods

addSprite

  • addSprite(src: string, callback: function): void
  • Parameters

    • src: string
    • callback: function
        • (si: ISpriteInfo, imageElement?: HTMLImageElement): void
        • Parameters

          • si: ISpriteInfo
          • Optional imageElement: HTMLImageElement

          Returns void

    Returns void

load

  • load(callback: function): void
  • Parameters

    • callback: function
        • (): void
        • Returns void

    Returns void

Generated using TypeDoc