Animation
The @shell/animate package provides ECS-native tweens and timelines. A tween is one Tween entity for each property it moves, processed in batch via iter(). A timeline spawns no tweens: its playhead writes each segment’s fields itself, so seek, reverse and pause move the values with it.
Register the plugin on your world:
import { AnimatePlugin } from '@shell/animate';
world.addPlugin(AnimatePlugin);This registers:
Tweencomponent for per-property animation stateAnimateresource (IoC key:'animate') for the user-facing APITimelineSystematPostUpdatefor timeline advancementTweenSystematPostUpdatefor batch tween processing
Access
Section titled “Access”Retrieve the Animate resource inside any system:
const animate = resources.get('animate');Topics
Section titled “Topics”- Tweens — Animate individual component properties
- Timelines — Compose and sequence animations
- Easing — Built-in easing functions and custom registration
- Clips — Keyframed clips written as files, from
@shell/clip
Exports
Section titled “Exports”export { AnimatePlugin } from './plugin';export { Animate, TweenHandle } from './resource';export { EcsTimeline } from './timeline';export { Tween } from './components';export { AnimationTimeSource, TweenState } from './types';export type { AnimatableProperties, TweenCallback, TweenOptions, TimelineOptions, TimelineTweenOptions, TimelinePosition,} from './types';export type { EasingFn, EasingName } from './easing';export { EasingTable, EasingIndex } from './easing';