@bscotch/sprite-source
Version:
Art pipeline scripting module for GameMaker sprites.
60 lines • 2.1 kB
TypeScript
import { Pathy } from '@bscotch/pathy';
import { SpriteCache } from './SpriteCache.js';
import { type SpriteSourceConfig, type SpriteSourceStage } from './SpriteSource.schemas.js';
export declare class SpriteSource extends SpriteCache {
get configFile(): Pathy<{
[x: string]: unknown;
$schema?: string | undefined;
staging?: {
[x: string]: unknown;
dir: string;
transforms: {
[x: string]: unknown;
include?: string | undefined;
bleed?: boolean | undefined;
crop?: boolean | undefined;
synced?: boolean | undefined;
renames?: {
[x: string]: unknown;
from: string;
to: string;
}[] | undefined;
}[];
}[] | null | undefined;
ignore?: string[] | null | undefined;
}>;
protected resolveStaged(staging: SpriteSourceStage): Promise<void>;
loadConfig(overrides?: SpriteSourceConfig): Promise<SpriteSourceConfig>;
/**
* Transform any staged sprites and add them to the source,
* and compute updated sprite info.
*/
update(
/** Optionally override config options */
options?: SpriteSourceConfig): 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;
}>;
/**
* @param options If specified, creates/overwrites the config file with these options.
*/
static from(spritesRoot: string | Pathy, options?: SpriteSourceConfig): Promise<SpriteSource>;
}
//# sourceMappingURL=SpriteSource.d.ts.map