refactored loadTerrainMap to reuse the existing canUseSharedBuffers

This commit is contained in:
scamiv
2025-11-26 21:55:37 +01:00
parent 81b0d36c38
commit 7e2784eee2
+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 *