Skip to content

@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

PropertyTypeDescriptionDefined 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 | nullName of the state to activate after construction.components/Animation.ts:16
paused?booleanWhether playback starts paused.components/Animation.ts:18
reverse?booleanPlay the active clip in reverse.components/Animation.ts:20
timeScale?numberTime-scale multiplier (1 = real-time).components/Animation.ts:22
crossFadeDuration?numberDefault 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