refactored loadTerrainMap to reuse the existing canUseSharedBuffers

This commit is contained in:
scamiv
2025-11-26 21:55:37 +01:00
parent 2d63dcfcc5
commit 8bc140e23f
+1 -5
View File
@@ -58,11 +58,7 @@ export async function loadTerrainMap(
const stateBuffer =
sharedStateBuffer ??
(typeof SharedArrayBuffer !== "undefined" &&
typeof Atomics !== "undefined" &&
// crossOriginIsolated is only defined in browser contexts
typeof (globalThis as any).crossOriginIsolated === "boolean" &&
(globalThis as any).crossOriginIsolated === true
(canUseSharedBuffers
? new SharedArrayBuffer(
manifest.map.width *
manifest.map.height *