Add /set/plate: background plate comp with poly mask
Deploy / deploy (push) Successful in 40s

Load a plate (fit to width, drag/pinch/scroll to place), comp the live
camera over it through a polygon mask drawn around the foreground.
Plate, placement and mask are remembered between visits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
twotalesanimation
2026-11-03 07:40:12 +02:00
parent 11ce5c128c
commit b5dfdc9897
5 changed files with 763 additions and 2 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
// Offline cache for /set (screen markers, spill checker, VFX report). Crews often have no signal on set:
// Offline cache for /set (screen markers, spill checker, plate comp, VFX report). Crews often have no signal on set:
// once the page has loaded once, it and every marker image work offline.
// Must match OFFLINE_CACHE in components/set/MarkerPicker.tsx
const CACHE = "ttvfx-set-v1";
@@ -22,7 +22,7 @@ self.addEventListener("fetch", (event) => {
const url = new URL(req.url);
if (url.origin !== self.location.origin) return;
// Pages (/set/, /set/spill/): network first so updates arrive, cached copy when offline.
// Pages (/set/, /set/spill/, /set/plate/): network first so updates arrive, cached copy when offline.
// Each page is cached under its own path so one never replaces the other.
if (req.mode === "navigate") {
const page = url.pathname.endsWith("/") ? url.pathname : url.pathname + "/";