@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / components / AnimationComponentOptions
Type Alias: AnimationComponentOptions
ts
type AnimationComponentOptions = {
clips?: THREE.AnimationClip[];
externalClipSources?: string[];
activeState?: string | null;
paused?: boolean;
reverse?: boolean;
timeScale?: number;
crossFadeDuration?: number;
states?: {
name: string;
clip: string;
clipId?: string;
loop?: boolean;
}[];
};Defined in: components/Animation.ts:10
Initializer for AnimationComponent.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
clips? | THREE.AnimationClip[] | Initial set of clips imported from the entity's model. | components/Animation.ts:12 |
externalClipSources? | string[] | URLs (or localasset:// paths) of clips to load asynchronously and merge into the catalog. | components/Animation.ts:14 |
activeState? | string | null | Name of the state to activate after construction. | components/Animation.ts:16 |
paused? | boolean | Whether playback starts paused. | components/Animation.ts:18 |
reverse? | boolean | Play the active clip in reverse. | components/Animation.ts:20 |
timeScale? | number | Time-scale multiplier (1 = real-time). | components/Animation.ts:22 |
crossFadeDuration? | number | Default cross-fade duration in seconds when switching states. | components/Animation.ts:24 |
states? | { name: string; clip: string; clipId?: string; loop?: boolean; }[] | Predefined state machine entries (name -> clip binding). | components/Animation.ts:26 |

