0.8.2: pan outside canvas + finish RUWIO rename of exports

- Canvas stage: plain left-click in the empty content area (outside
  the canvas rectangle) now starts a pan. Ctrl+left-click still pans
  anywhere, middle-click unchanged. Only pure left-click qualifies
  (any modifier leaves the old routing intact).
- Export rebrand Animatr → RUWIO for everything user-visible:
  - Default filenames: projekt.animatr.json → projekt.ruwio.json;
    animatr-runtime.js → ruwio-runtime.js; App's export fallback
    base animatr → ruwio.
  - Generated comment headers in runtime/scene/bundled scripts.
  - Console warn prefix in the runtime and the scene store.
  - Example HTML title, heading, and embed-usage snippet.
  - parseProject error message.
  - ExportDialog copy.
- RUNTIME_VERSION 14 → 15 so cached runtimes reload.
- On-disk magic stays `animatr-project` and window.AnimatrPlayer /
  __animatrPending / localStorage & IndexedDB keys are untouched so
  old project files and previously-exported HTML keep working.

Regression tests: legacy magic still parses; parseProject error
mentions RUWIO and not Animatr; runtime/scene/bundled scripts and
example HTML all carry the new brand; console prefix is [ruwio].

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
thandClaude Opus 4.7 committed 2026-04-21 22:17:10 +02:00
1 parent 82ee5c98d0
commit a2c8e5998a
10 files changed
+107 -19

No files matched your search

+21
View File
@@ -2597,9 +2597,30 @@ let panStartViewX = 0
let panStartViewY = 0
let panPointerId = -1
function isInsideCanvasBounds(e: PointerEvent | MouseEvent): boolean {
const rect = container.value?.getBoundingClientRect()
if (!rect) return true
const localX = e.clientX - rect.left
const localY = e.clientY - rect.top
const cw = effectiveCanvas.value.width * zoom.value
const ch = effectiveCanvas.value.height * zoom.value
return (
localX >= viewX.value &&
localX <= viewX.value + cw &&
localY >= viewY.value &&
localY <= viewY.value + ch
)
}
function isPanTrigger(e: PointerEvent | MouseEvent) {
if (e.button === 1) return true
if (e.button === 0 && e.ctrlKey) return true
// Plain left-click on the empty content view (outside the canvas
// rectangle) pans the viewport too — saves a ctrl-modifier for the
// common case of re-centering after zoom.
if (e.button === 0 && !e.ctrlKey && !e.metaKey && !e.altKey && !e.shiftKey && !isInsideCanvasBounds(e)) {
return true
}
return false
}