Skip to content

Add semantic motion engine - #222

Open
raiseCatError wants to merge 1 commit into
feature/165-surfacesfrom
feature/172-motion-engine
Open

raiseCatError wants to merge 1 commit into
feature/165-surfacesfrom
feature/172-motion-engine

Conversation

@raiseCatError

Copy link
Copy Markdown
Owner

Implements #172 (engine and shimmer migration; see Deferred).

Stacked on #221 (feature/165-surfaces), on #220, #219, #218, #217 and #203. Merge order: #203, #217, #218, #219, #220, #221, then this PR.

What changed

  • src/motion/motion.ts: a pure engine. sampleMotion(profile, elapsedMs, cell) returns a 0..1 intensity. Shapes are sine (breathing/traveling shimmer), comet (slow rise, fast fall), tail (fast rise, long tail) and pulse (settle). Spread is uniform or traveling. Easing comes from Chroma's curves.
  • Profiles per semantic state: waiting, processing, streaming, transition, completion, failure. One-shot profiles settle at zero and do not repeat.
  • Reduced motion (NMSH_REDUCED_MOTION=1 or deterministic presentation) holds every profile still.
  • The shimmer now samples the processing and streaming profiles. Its output is unchanged, and transcript activity rows now also honor reduced motion.
  • The engine has no timers, no width changes and no PTY access.

Deferred

  • No shared scheduler/clock was added. The one existing activity timer is already bounded (100 ms), cleared on exit, and its renders are suppressed during passthrough. A scheduler should arrive with a second animated consumer.
  • waiting, transition, completion and failure have no consumer yet. The issue asks not to animate merely because the engine exists.

Verification

tests/motion.test.ts and the existing tests/shimmer.test.ts; full suite 656/656, typecheck, build and git diff --check clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant