@spearwolf/twopoint5d
Version:
a library to create 2.5d realtime graphics and pixelart with three.js
21 lines • 1.01 kB
TypeScript
import { Texture } from 'three';
import { PowerOf2ImageLoader } from './PowerOf2ImageLoader.js';
import { TextureCoords } from './TextureCoords.js';
import { TextureFactory, type TextureOptionClasses } from './TextureFactory.js';
import type { TextureSource } from './types.js';
export interface TextureImage {
texture: Texture;
imgEl: TextureSource;
texCoords: TextureCoords;
}
type OnLoadCallback = (textureData: TextureImage) => void;
type OnErrorCallback = ((err: unknown) => void) | undefined;
export declare class TextureImageLoader {
imageLoader: PowerOf2ImageLoader;
textureFactory: TextureFactory;
constructor(textureFactory?: TextureFactory, imageLoader?: PowerOf2ImageLoader);
load(url: string, textureClasses: Array<TextureOptionClasses>, onLoadCallback: OnLoadCallback, onErrorCallback?: OnErrorCallback): void;
loadAsync(url: string, textureClasses: Array<TextureOptionClasses>): Promise<TextureImage>;
}
export {};
//# sourceMappingURL=TextureImageLoader.d.ts.map