diff --git a/system/public/aesthetic.computer/bios.mjs b/system/public/aesthetic.computer/bios.mjs index c2f0a089a8..eab8522bd0 100644 --- a/system/public/aesthetic.computer/bios.mjs +++ b/system/public/aesthetic.computer/bios.mjs @@ -48,12 +48,7 @@ import * as graph from "./lib/graph.mjs"; import * as WebGPU from "./lib/webgpu.mjs"; import { initGPU, switchBackend } from "./lib/gpu/index.mjs"; // 🎨 New backend system (auto-registers backends) import { createWebGLBlitter } from "./lib/webgl-blit.mjs"; -import { - chooseCompactVideoMime, - getCameraCaptureSize, - measureCaptureAVSync, - shouldResumeCaptureRecorder, -} from "./lib/capture-session.mjs"; +import * as CaptureSession from "./lib/capture-session.mjs"; import { attachSoundtrackToFrames, frameIndexForSoundtrackProgress, @@ -61,8 +56,22 @@ import { } from "./lib/sound-on-film.mjs"; // import * as TwoD from "./lib/2d.mjs"; // 🆕 2D GPU Renderer. -const TwoD = undefined; -let hadVectorOverlay = false; // so the vector overlay clears once when a piece drops it +const TwoD = undefined; +const chooseCompactVideoMime = + CaptureSession.chooseCompactVideoMime || (() => null); +const getCameraCaptureSize = + CaptureSession.getCameraCaptureSize || + ((requestedWidth, requestedHeight) => { + const even = (value) => + Math.max(2, Math.round((Number(value) || 2) / 2) * 2); + return { width: even(requestedWidth), height: even(requestedHeight) }; + }); +const measureCaptureAVSync = + CaptureSession.measureCaptureAVSync || (() => null); +const shouldResumeCaptureRecorder = + CaptureSession.shouldResumeCaptureRecorder || + ((state, freshSession = false) => state === "paused" && !freshSession); +let hadVectorOverlay = false; // so the vector overlay clears once when a piece drops it // 🪟 Replay a piece's vector-overlay display-list onto the native UI canvas — crisp // anti-aliased rounded rects, text and lines above the pixel buffer. Cleared fresh diff --git a/system/public/sw.js b/system/public/sw.js index 84f0123aef..a8cad5c5f5 100644 --- a/system/public/sw.js +++ b/system/public/sw.js @@ -1,7 +1,7 @@ // Aesthetic Computer Service Worker // Caches JavaScript modules for faster subsequent loads -const CACHE_NAME = 'ac-modules-v9'; // Bump: lib/ + systems/ go network-first (piece↔lib lockstep), flush caches that hold pre-catnom nom.mjs +const CACHE_NAME = 'ac-modules-v10'; // Bump: clear stale capture-session modules after the camera API expansion const CACHE_DURATION = 60 * 60 * 1000; // 1 hour in ms (dev-friendly) // Critical modules to precache on install. NOTE: bios.mjs and lib/disk.mjs