mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-13 22:59:02 +00:00
Implement shared draw phase buffer and time base in game rendering
- Added support for a shared draw phase buffer in the ClientGameRunner and TerritoryWebGLRenderer to manage tile rendering phases. - Introduced time base management to synchronize rendering updates based on the game state. - Updated relevant classes and methods to accommodate the new shared draw phase and time base, enhancing the rendering pipeline.
This commit is contained in:
@@ -26,6 +26,8 @@ export class WorkerClient {
|
||||
private sharedTileRingBuffers?: SharedTileRingBuffers,
|
||||
private sharedStateBuffer?: SharedArrayBuffer,
|
||||
private sharedDirtyBuffer?: SharedArrayBuffer,
|
||||
private sharedDrawPhaseBuffer?: SharedArrayBuffer,
|
||||
private timeBaseMs?: number,
|
||||
) {
|
||||
this.worker = new Worker(new URL("./Worker.worker.ts", import.meta.url));
|
||||
this.messageHandlers = new Map();
|
||||
@@ -78,6 +80,8 @@ export class WorkerClient {
|
||||
sharedTileRingData: this.sharedTileRingBuffers?.data,
|
||||
sharedStateBuffer: this.sharedStateBuffer,
|
||||
sharedDirtyBuffer: this.sharedDirtyBuffer,
|
||||
sharedDrawPhaseBuffer: this.sharedDrawPhaseBuffer,
|
||||
timeBaseMs: this.timeBaseMs,
|
||||
});
|
||||
|
||||
// Add timeout for initialization
|
||||
|
||||
Reference in New Issue
Block a user