/** * Animation Controller system * Core logic for animation controllers without UI dependencies */ import { Animation } from './animation'; export interface AnimationControllerStateData { uuid?: string; name?: string; animations?: Array<{ uuid?: string; key?: string; animation?: string; blend_value?: string; }>; transitions?: Array<{ uuid?: string; target?: string; condition?: string; }>; particles?: any[]; sounds?: any[]; on_entry?: string | string[]; on_exit?: string | string[]; blend_transition?: number | Record; blend_transition_curve?: Record; blend_via_shortest_path?: boolean; [key: string]: any; } export interface AnimationControllerTransition { uuid: string; target: string; condition: string; } export interface AnimationControllerStateAnimation { uuid: string; key: string; animation: string; blend_value: string; } export declare class AnimationControllerState { uuid: string; controller: AnimationController; name: string; animations: AnimationControllerStateAnimation[]; transitions: AnimationControllerTransition[]; particles: any[]; sounds: any[]; on_entry: string[]; on_exit: string[]; blend_transition: number; blend_transition_curve: Record; blend_via_shortest_path: boolean; start_timestamp: number; playing_sounds: any[]; muted: { sound: boolean; particle: boolean; }; constructor(controller: AnimationController, data?: AnimationControllerStateData); extend(data: AnimationControllerStateData): this; /** * Get state time (time since state was entered) */ getStateTime(playbackSpeed?: number): number; /** * Check if all animations in this state have finished */ allAnimationsFinished(animations: Animation[]): boolean; /** * Check if any animation in this state has finished */ anyAnimationFinished(animations: Animation[]): boolean; /** * Select this state */ select(force?: boolean): this; /** * Unselect this state */ unselect(): this; /** * Play effects (sounds and particles) */ playEffects(): this; /** * Compile state for Bedrock format */ compileForBedrock(animations: Animation[]): any; getSaveCopy(): any; getUndoCopy(): any; } export interface AnimationControllerData { uuid?: string; name?: string; initial_state?: string; states?: AnimationControllerStateData[] | Record; saved?: boolean; path?: string; saved_name?: string; selected_state?: string; } export declare class AnimationController { uuid: string; name: string; initial_state: string; states: AnimationControllerState[]; selected_state: AnimationControllerState | null; playing: boolean; selected: boolean; last_state: AnimationControllerState | null; transition_timestamp: number; saved: boolean; path?: string; saved_name?: string; constructor(data?: AnimationControllerData); extend(data: AnimationControllerData): this; /** * Get state by UUID */ getState(uuid: string): AnimationControllerState | undefined; /** * Get state by name */ getStateByName(name: string): AnimationControllerState | undefined; /** * Get initial state */ getInitialState(): AnimationControllerState | undefined; /** * Add a new state */ addState(data?: AnimationControllerStateData): AnimationControllerState; /** * Remove a state */ removeState(state: AnimationControllerState): boolean; /** * Select a state */ selectState(state: AnimationControllerState | string, force?: boolean): this; /** * Compile controller for Bedrock format */ compileForBedrock(animations: Animation[]): any; getSaveCopy(): any; getUndoCopy(): any; } //# sourceMappingURL=animation_controller.d.ts.map