From d37761ec008247e2acde3d9277f9ff4d5d43794e Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Thu, 28 May 2026 16:49:33 -0700 Subject: [PATCH] p5-worker: paint returns true to force repaint each frame return false from paint marked the frame as cacheable, throttling animation to needsPaint-only updates. With a continuously-animating p5 sketch we want a fresh blit every AC frame, so return true (the 'assume repaint' path). --- system/public/aesthetic.computer/lib/p5-worker.mjs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/system/public/aesthetic.computer/lib/p5-worker.mjs b/system/public/aesthetic.computer/lib/p5-worker.mjs index 401b052ae6..2d99140921 100644 --- a/system/public/aesthetic.computer/lib/p5-worker.mjs +++ b/system/public/aesthetic.computer/lib/p5-worker.mjs @@ -403,7 +403,7 @@ export async function makeP5WorkerModule({ slug, source }) { wipe(20, 0, 0); ink(255, 120, 120).write(`p5 boot error:`, { x: 8, y: 12 }); ink(255, 200, 200).write(bootError.slice(0, 200), { x: 8, y: 28 }); - return false; + return true; // keep repainting so the error stays visible } // 📊 instrumentation const t0 = performance.now(); @@ -444,7 +444,10 @@ export async function makeP5WorkerModule({ slug, source }) { drainTimeTotal = blitTimeTotal = dtTotal = 0; maxDt = maxBlit = maxDrain = 0; } - return false; + // Returning truthy signals AC to repaint next frame (false would mark + // the frame as cacheable and throttle us to needsPaint-only updates, + // which for a continuously-animating p5 sketch is exactly wrong). + return true; }, sim: ({ screen }) => { -- 2.51.2