Files
heygen-com__hyperframes/packages/studio/index.html
Miguel Ángel fb797751bc feat(studio): GSAP keyframe + motion-path editing
Consolidates the studio side of the GSAP keyframe/motion-path work into one
PR: runtime read layer + shared helpers, drag/commit/bridge editing infra,
motion-path geometry + commit helpers, on-canvas motion-path overlay, and the
keyframes flag with gesture recording + timeline/selection refinements.

Makes "Add keyframe at playhead" do the right thing for every GSAP animation
shape, never disabling or silently no-oping:
- Array-form keyframe tweens (keyframes: [{x,y},…]): readElementPosition now
  derives the captured props from the keyframe stops (top-level properties is
  empty for array form), and the percentage uses the tween range, not the clip
  range — so the add lands at the right spot instead of no-oping.
- Out of the tween range, the action extends the tween to reach the playhead
  and adds a hold there, rescaling existing keyframes to keep their absolute
  timing (was: disabled / destructive).
- Flat tweens (to/from/fromTo) convert to their natural keyframes, then take
  the same add/extend path.
- set() is promoted to a two-stop tween from the set's time to the playhead.
- motionPath/arc tweens add a waypoint at the on-path position (matching
  segment, so the curve is preserved) instead of being linearized; outside the
  range they extend their duration, with a merge threshold against duplicates.

Also fixes deep-link hydration. A URL with ?t=…&selId=… restored neither the
playhead nor the selection on a fresh load: useStudioUrlState requests the seek
before the player runtime mounts its requestedSeekTime subscription, so the
request never reached pendingSeekRef, and initializeAdapter (which drained only
pendingSeekRef when the adapter became ready) started at 0 — which also blocked
selection hydration (gated on the seek settling). Fixed at the source:
initializeAdapter now reconciles the store's requestedSeekTime as well, so a seek
requested any time before the adapter is ready lands deterministically.

Supersedes the separately-reviewed studio PRs #1557, #1558, #1559, #1560, #1561.
2026-06-19 18:33:20 -04:00

14 lines
411 B
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<title>HyperFrames Studio</title>
</head>
<body>
<div data-hf-id="hf-aph5" id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>