animouse
Version:
lightweight animation state machine for three js
33 lines (32 loc) • 980 B
TypeScript
import type { AnimationAction } from "three";
import type { AnimationStateEvent } from "./AnimationStateEvent";
/**
* Small epsilon value used for floating-point comparisons.
*/
export declare const EPSILON = 0.000001;
/**
* Two times PI (2π), commonly used for full circle calculations.
*/
export declare const PI2: number;
/**
* Gets the next unique anchor index.
* @returns The next available anchor index
*/
export declare function getNextAnchorIndex(): number;
/**
* Animation anchor with timing and state information.
*/
export interface Anchor {
/** The index of the anchor */
index: number;
/** The animation action */
action: AnimationAction;
/** The weight of the animation action */
weight: number;
/** The duration of the animation */
duration: number;
/** The inverse duration of the animation */
invDuration: number;
/** The iteration event type for this anchor */
iterationEventType: AnimationStateEvent;
}