@spearwolf/twopoint5d
Version:
Create 2.5D realtime graphics and pixelart with WebGL and three.js
36 lines • 1.35 kB
TypeScript
import { DataTexture } from 'three/webgpu';
import { TextureAtlas } from './TextureAtlas.js';
import type { TextureCoords } from './TextureCoords.js';
import { TileSet } from './TileSet.js';
type AnimName = string | symbol;
export interface FrameBasedAnimDef {
frames: TextureCoords[];
duration: number;
name: AnimName;
id: number;
}
export interface BakeTextureOptions {
includeTextureSize: boolean;
}
export type AnimationTimingOptions = {
duration: number;
frameRate?: never;
} | {
duration?: never;
frameRate: number;
};
export declare class FrameBasedAnimations {
#private;
static MaxTextureSize: number;
add(...args: [name: AnimName | undefined, timing: number | AnimationTimingOptions, texCoords: TextureCoords[]] | [name: AnimName | undefined, timing: number | AnimationTimingOptions, atlas: TextureAtlas, frameNameQuery?: string] | [
name: AnimName | undefined,
timing: number | AnimationTimingOptions,
tileSet: TileSet,
firstTileId?: number,
tileCount?: number
] | [name: AnimName | undefined, timing: number | AnimationTimingOptions, tileSet: TileSet, tileIds: number[]]): number;
animId(name: AnimName): number;
bakeDataTexture(options?: BakeTextureOptions): DataTexture;
}
export {};
//# sourceMappingURL=FrameBasedAnimations.d.ts.map