Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TextureAtlas

Hierarchy

  • TextureAtlas

Index

Constructors

Properties

#atlases: Atlas[] = []
#debugDomContainer: HTMLDivElement = ...
#textures: WebGLTexture[] = []

Accessors

  • set debugMode(newDebugMode: boolean): void
  • set gl(glContext: WebGL2RenderingContext): void
  • set textureFormat(newTextureFormat: number): void
  • set textureSize(newTexSize: vec2): void

Methods

  • getUv2(id: string): [null | Float32Array, WebGLTexture]
  • pack(id: string, drawable: HTMLCanvasElement | HTMLImageElement, downscaleFactor?: number): TextureAtlas
  • scaleDownDrawableByFactor(drawable: HTMLCanvasElement | HTMLImageElement, downscaleFactor: number): HTMLCanvasElement
  • Parameters

    • drawable: HTMLCanvasElement | HTMLImageElement
    • downscaleFactor: number

    Returns HTMLCanvasElement

Generated using TypeDoc