API Referenceatlasatlas/graphics
Texture
GPU texture loaded from a resource or created procedurally.
Module: atlas/graphics
GPU texture loaded from a resource or created procedurally.
Declaration
export class Texture { ... }Properties
type
type: TextureType;resource
resource: Resource;width
width: number;height
height: number;channels
channels: number;id
id: number;borderColor
borderColor: Color;Methods
fromResource
static fromResource(
resource: Resource | string,
type: TextureType,
): Texture;createEmpty
static createEmpty(
width: number,
height: number,
type: TextureType,
borderColor?: Color,
): Texture;createColor
static createColor(
color: Color,
type: TextureType,
width: number,
height: number,
): Texture;createCheckerboard
createCheckerboard(
width: number,
height: number,
checkSize: number,
color1: Color,
color2: Color,
): void;createDoubleCheckerboard
createDoubleCheckerboard(
width: number,
height: number,
checkSizeBig: number,
checkSizeSmall: number,
color1: Color,
color2: Color,
color3: Color,
): void;displayToWindow
displayToWindow(): void;