animouse
Version:
lightweight animation state machine for three js
34 lines (33 loc) • 1.12 kB
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 for animation anchors.
* Each call returns an incrementing integer starting from 0.
* @returns The next available anchor index
*/
export declare function getNextAnchorIndex(): number;
/**
* Represents an animation anchor with timing and state information.
*/
export interface Anchor {
/** The index of the anchor */
index: number;
/** The animation action associated with this anchor */
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 type of iteration event associated with this anchor */
iterationEventType: AnimationStateEvent;
}