Motion-path overlay
-------------------
A toggleable always-on visualization of the selected layer's
position-keyframe trajectory. Pairs with the existing kf-selection-
driven path that only appears when a keyframe is actively selected.
- src/composables/useShowMotionPaths.ts: shared ref + localStorage
('animatr:showMotionPaths'), default off.
- CanvasStage.vue: new motionPathOverlay computed builds dashed
segments + a dot per keyframe for store.selectedLayerId, but only
when the toggle is on AND no kf is explicitly selected (the kf
view wins — it's richer with drag handles). Color: lilac
(#a47bff) so it doesn't collide with the blue kf-selection path.
- Click a dot → seek the playhead to that keyframe's time. Cheap
navigation aid for layers with many keyframes.
- Toggle button placed in the stage's existing zoom/view-controls
toolbar (alongside crop / mask preview / centre crosshair / stage
preview), not the app topbar — that's where the canvas-scoped
view modifiers already live.
Tests (4 new under "motion-path overlay — toggle + selected-layer rendering"):
- showMotionPaths persists to localStorage.
- Toggle on with two position kfs renders the overlay; toggling
off returns to a clean canvas.
- kf-selection path takes precedence over the toggle (mount smoke
with both paths active simultaneously).
- The motion-paths button in .zoom-controls flips the ref.
Type-check cleanup
------------------
The 7 pre-existing TS errors that piled up over the last few patch
bumps. None affected runtime, but vue-tsc was complaining:
- src/lib/clipBounds.ts: assetFootprint read width/height directly
off ButtonAsset, which actually has canvas.width/canvas.height.
Split the branch and added the same handling for SvgAsset.
- src/lib/render.ts: instancesByTrack was typed via
`typeof scene.clipInstances` (which is optional) → values were
ClipInstance[] | undefined. Wrapped in NonNullable.
- src/lib/ruwFile.ts: BackgroundVideo has no `name` field. Synthesised
one from page.id so the extracted file gets a readable filename
(`scene-bg-${page.id}`).
- src/devtools/tests.ts (2 sites): polygon test fixtures missed the
required `fill` field — added `fill: '#0f0'`.
- src/devtools/tests.ts (1 site): TS 5 widens
`Uint8Array<ArrayBufferLike>` past BlobPart's union; cast to
unknown as BlobPart at the new File call.
`npm run type-check` is now clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
30 lines
650 B
JSON
30 lines
650 B
JSON
{
|
|
"name": "ruwio",
|
|
"private": true,
|
|
"version": "1.2.11",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vue-tsc --noEmit && vite build",
|
|
"preview": "vite preview",
|
|
"type-check": "vue-tsc --noEmit",
|
|
"pack": "bash scripts/pack.sh"
|
|
},
|
|
"dependencies": {
|
|
"@phosphor-icons/vue": "^2.2.1",
|
|
"gifenc": "^1.0.3",
|
|
"konva": "^9.3.16",
|
|
"pinia": "^2.2.6",
|
|
"upng-js": "^2.1.0",
|
|
"vue": "^3.5.13",
|
|
"vue-konva": "^3.1.2"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.10.2",
|
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
"typescript": "^5.6.3",
|
|
"vite": "^6.0.3",
|
|
"vue-tsc": "^2.1.10"
|
|
}
|
|
}
|