@bscotch/sprite-source
Version:
Art pipeline scripting module for GameMaker sprites.
39 lines • 1.24 kB
TypeScript
import { Pathy } from '@bscotch/pathy';
import type { SpritesInfo } from './SpriteCache.schemas.js';
import { SpriteFrame } from './SpriteFrame.js';
import type { Log } from './types.js';
export declare class SpriteDir {
readonly path: Pathy;
readonly logs: Log[];
readonly issues: Error[];
protected _frames: SpriteFrame[];
protected _isSpine: boolean;
protected _spinePaths: undefined | {
atlas: Pathy;
json: Pathy;
pngs: Pathy[];
};
protected constructor(path: Pathy, logs: Log[], issues: Error[]);
get isSpine(): boolean;
get frames(): SpriteFrame[];
get spinePaths(): {
atlas: Pathy;
json: Pathy;
pngs: Pathy[];
};
updateCache(cache: SpritesInfo): Promise<void>;
bleed(): Promise<void>;
crop(): Promise<void>;
moveTo(newSpriteDir: Pathy): Promise<void>;
/**
* If there are images in this directory, get a `SpriteDir`
* instance. Else get `undefined`.
*/
static from(path: Pathy, logs?: Log[], issues?: Error[]): Promise<SpriteDir | undefined>;
toJSON(): {
path: Pathy<unknown>;
isSpine: boolean;
framePaths: SpriteFrame[];
};
}
//# sourceMappingURL=SpriteDir.d.ts.map