From 8df611ee88172f7f1f6fbfaefed348f8a0cc19aa Mon Sep 17 00:00:00 2001 From: Claude Code Date: Thu, 26 Mar 2026 00:06:46 -0700 Subject: [PATCH] =?UTF-8?q?perf(simulation):=20=E2=9A=A1=20Optimize=20Web?= =?UTF-8?q?=20Worker=20task=20scheduling=20for=20better=20performance=20in?= =?UTF-8?q?=20Age=20of=20Four=20simulations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- guide/age-of-four/src/simulation/simulation.worker.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/guide/age-of-four/src/simulation/simulation.worker.ts b/guide/age-of-four/src/simulation/simulation.worker.ts index dc850fc4..b225bc36 100644 --- a/guide/age-of-four/src/simulation/simulation.worker.ts +++ b/guide/age-of-four/src/simulation/simulation.worker.ts @@ -183,6 +183,7 @@ async function prebufferFrames(state: ScenarioState, scenarioId: string, frameCo frames.push({ texA: snap.texA, texB: snap.texB, + texC: snap.texC, width: snap.width, height: snap.height, turn: snap.turn, @@ -191,7 +192,7 @@ async function prebufferFrames(state: ScenarioState, scenarioId: string, frameCo ley_edges: snap.ley_edges, wonder_positions: snap.wonder_positions, }) - transferables.push(snap.texA.buffer as ArrayBuffer, snap.texB.buffer as ArrayBuffer) + transferables.push(snap.texA.buffer as ArrayBuffer, snap.texB.buffer as ArrayBuffer, snap.texC.buffer as ArrayBuffer) } post( @@ -378,6 +379,7 @@ function handleFrame(scenarioId: string, turn: number, lookahead: number): void frames.push({ texA: snap.texA, texB: snap.texB, + texC: snap.texC, width: snap.width, height: snap.height, turn: snap.turn, @@ -386,7 +388,7 @@ function handleFrame(scenarioId: string, turn: number, lookahead: number): void ley_edges: snap.ley_edges, wonder_positions: snap.wonder_positions, }) - transferables.push(snap.texA.buffer as ArrayBuffer, snap.texB.buffer as ArrayBuffer) + transferables.push(snap.texA.buffer as ArrayBuffer, snap.texB.buffer as ArrayBuffer, snap.texC.buffer as ArrayBuffer) } post(