Files
dusk/types/display/texture.d.ts
T
2026-06-02 09:32:07 -05:00

29 lines
711 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
/**
* A loaded texture asset. Holds a lock on the underlying asset entry —
* the lock is released automatically when the object is garbage collected.
*/
interface Texture {
/** Pixel width of the texture. */
readonly width: number;
/** Pixel height of the texture. */
readonly height: number;
toString(): string;
}
interface TextureConstructor {
/** RGBA 32-bit format (4 channels × 8 bits). */
readonly FORMAT_RGBA: number;
/** Paletted format. */
readonly FORMAT_PALETTE: number;
new(): never;
}
declare var Texture: TextureConstructor;