@spearwolf/twopoint5d
Version:
a library to create 2.5d realtime graphics and pixelart with three.js
26 lines • 1.25 kB
TypeScript
import { FileLoader } from 'three';
import { TextureAtlas } from './TextureAtlas.js';
import type { TextureOptionClasses } from './TextureFactory.js';
import { TextureImageLoader, type TextureImage } from './TextureImageLoader.js';
import { type TexturePackerMetaData } from './TexturePackerJson.js';
export interface TextureAtlasData extends TextureImage {
atlas: TextureAtlas;
meta: TexturePackerMetaData;
}
export interface TextureAtlasLoadOptions {
overrideImageUrl?: string;
}
type OnLoadCallback = (textureData: TextureAtlasData) => void;
type OnErrorCallback = ((err: unknown) => void) | undefined;
export declare class TextureAtlasLoader {
fileLoader: FileLoader;
textureImageLoader: TextureImageLoader;
constructor(defaults?: {
fileLoader?: FileLoader;
textureImageLoader?: TextureImageLoader;
});
load(url: string, textureClasses: Array<TextureOptionClasses> | undefined, options: TextureAtlasLoadOptions | undefined, onLoadCallback: OnLoadCallback, onErrorCallback?: OnErrorCallback): void;
loadAsync(url: string, textureClasses?: Array<TextureOptionClasses>, options?: TextureAtlasLoadOptions): Promise<TextureAtlasData>;
}
export {};
//# sourceMappingURL=TextureAtlasLoader.d.ts.map