@bscotch/sprite-source
Version:
Art pipeline scripting module for GameMaker sprites.
67 lines • 2.25 kB
TypeScript
import { Pathy } from '@bscotch/pathy';
import { SpritesInfo } from './SpriteCache.schemas.js';
import { SpriteDir } from './SpriteDir.js';
import type { Log } from './types.js';
export declare class SpriteCache {
readonly maxDepth: number;
readonly issues: Error[];
readonly logs: Log[];
readonly spritesRoot: Pathy;
/**
* @param spritesRoot The path to the root directory containing
* sprites. For a SpriteSource, this is the root of a set
* of nested folders-of-images. For a SpriteDest (a project),
* this is the `{project}/sprites` folder.
* @param maxDepth The maximum depth to search for sprites. For a SpriteSource this is probably Infinity. For a SpriteDest, this should be 1.
*/
constructor(spritesRoot: string | Pathy, maxDepth?: number);
get stitchDir(): Pathy<unknown>;
get cacheFile(): Pathy<{
[x: string]: unknown;
version: number;
info: Record<string, {
[x: string]: unknown;
spine: false;
checksum: string;
frames: Record<string, {
width: number;
height: number;
checksum: string;
changed: number;
}>;
} | {
[x: string]: unknown;
spine: true;
checksum: string;
changed: number;
}>;
$schema?: string | undefined;
}>;
protected getSpriteDirs(dirs: Pathy[]): Promise<SpriteDir[]>;
protected loadCache(): Promise<SpritesInfo>;
/**
* Update the sprite-info cache.
*/
protected updateSpriteInfo(ignore?: string[] | null): Promise<{
[x: string]: unknown;
version: number;
info: Record<string, {
[x: string]: unknown;
spine: false;
checksum: string;
frames: Record<string, {
width: number;
height: number;
checksum: string;
changed: number;
}>;
} | {
[x: string]: unknown;
spine: true;
checksum: string;
changed: number;
}>;
$schema?: string | undefined;
}>;
}
//# sourceMappingURL=SpriteCache.d.ts.map