Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/thatstupidcomputer / apps/web/src/animation/orchestration/animationMachine.ts |
| Date | Not specified in source |
| Repository | Janady13/thatstupidcomputer |
| Revision | 57555cde46910102dd25d6c1c1fb2c359e9655bd |
| Branch | main |
| Path or archive member | apps/web/src/animation/orchestration/animationMachine.ts |
| Original SHA-256 | 2b5eb41fbd0451657908145b101596ab8f5e99d19005f3c1bab87592fea7e40e |
| Git blob SHA | bf75c53f112c8c2cde7e701a412566d0317aea92 |
| Reading-copy SHA-256 | 2b5eb41fbd0451657908145b101596ab8f5e99d19005f3c1bab87592fea7e40e |
Recovered source transcript
Download complete source text ↓15 lines · 0.8 KB
import { setup, assign } from 'xstate';
import { INITIAL_STATE, transition, type AnimationEvent, type AnimationState } from '../core/contracts.mjs';
/** Host state only. Native Rive timelines do not pretend to expose fabricated VM inputs. */
export const animationMachine = setup({
types: { context: {} as AnimationState, events: {} as AnimationEvent },
actions: { apply: assign(({ context, event }) => transition(context, event)) },
}).createMachine({
id: 'tsc-animation', context: { ...INITIAL_STATE },
on: {
SELECT: { actions: 'apply' }, PERFORM: { actions: 'apply' }, DESKTOP: { actions: 'apply' },
PAUSE: { actions: 'apply' }, PLAY: { actions: 'apply' }, REPLAY: { actions: 'apply' },
ATTITUDE: { actions: 'apply' }, SCENE: { actions: 'apply' }, CUE: { actions: 'apply' },
},
});