perf(simulation): ⚡ Optimize background simulation worker logic for faster execution and reduced resource consumption
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
8991ee1a10
commit
e454640de1
1 changed files with 4 additions and 0 deletions
|
|
@ -200,6 +200,8 @@ async function prebufferFrames(state: ScenarioState, scenarioId: string, frameCo
|
|||
ocean_dead_fraction: snap.ocean_dead_fraction,
|
||||
ley_edges: snap.ley_edges,
|
||||
wonder_positions: snap.wonder_positions,
|
||||
riverSegments: snap.riverSegments,
|
||||
riverSources: snap.riverSources,
|
||||
})
|
||||
transferables.push(snap.texA.buffer as ArrayBuffer, snap.texB.buffer as ArrayBuffer, snap.texC.buffer as ArrayBuffer)
|
||||
}
|
||||
|
|
@ -402,6 +404,8 @@ function handleFrame(scenarioId: string, turn: number, lookahead: number): void
|
|||
ocean_dead_fraction: snap.ocean_dead_fraction,
|
||||
ley_edges: snap.ley_edges,
|
||||
wonder_positions: snap.wonder_positions,
|
||||
riverSegments: snap.riverSegments,
|
||||
riverSources: snap.riverSources,
|
||||
})
|
||||
transferables.push(snap.texA.buffer as ArrayBuffer, snap.texB.buffer as ArrayBuffer, snap.texC.buffer as ArrayBuffer)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue