import * as PIXI from 'pixi.js'; import { Color } from '../utils'; /** * A texture or its name. */ export declare type TextureOrName = string | PIXI.Texture; /** * A tuple containing the texture name and its path. */ export declare type TextureNameAndPath = [name: string, path: string]; /** * A record containing texture names as keys, and their paths as values. */ export declare type TexturesNameAndPath = Record; /** * A record containing textures names as keys, and themselves as values. */ export declare type TexturesAndName = Record; /** * The list of textures loaded via the {@link loadTextures} and {@link loadTexture} functions. */ export declare const loadedTexturesNames: string[]; export declare function loadTextures(texturesNamesAndPath: TexturesNameAndPath): Promise; export declare function loadTextures(texturesNamesAndPath: TextureNameAndPath[]): Promise; export declare function loadTexture(name: string, path: string): Promise; export declare function loadTexture(texturesNameAndPath: TextureNameAndPath): Promise; /** * Get a texture from the {@link PIXI.Loader.shared} loader, must be present in the {@link loadedTexturesNames} to asserts that it has been loaded. * * @param name - The name of the texture to search. * @returns - The resulting texture or null if not found. */ export declare function getTexture(name: string): PIXI.Texture | null; /** * Get a texture from the {@link PIXI.Loader.shared} loader, must be present in the {@link loadedTexturesNames} to asserts that it has been loaded. * * @remarks Throws an error if the texture was not found in the {@link loadedTexturesNames}. * * @param name - The name of the texture to search. * @returns - The resulting texture. */ export declare function getTextureOrThrow(name: string): PIXI.Texture; /** * The options for a colored texture. */ export interface ColoredTextureOptions { /** * The color of the texture. * @default {@link Color.WHITE} */ color?: Color; /** * The height of the texture. * @default 100 */ height?: number; /** * The width of the texture. * @default 100 */ width?: number; } /** * Generate a texture from the Application renderer and options. * * @param application - The application, needed to get the renderer. * @param options - The options of the colored texture. * @returns - The resulting texture. */ export declare function getColoredTexture(application: PIXI.Application, options: ColoredTextureOptions): PIXI.Texture;