Skip to content

Commit

Permalink
worker auto mode
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Oct 22, 2024
1 parent c2c384d commit 46838e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prismarine-viewer/examples/webgpuRendererMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ export const removeBlocksSection = (key) => {

// do not use worker in safari, it is slow
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)
// const USE_WORKER = !isSafari
const USE_WORKER = new URLSearchParams(window.location.search).get('worker') === 'true'
const workerParam = new URLSearchParams(window.location.search).get('webgpuWorker')
const USE_WORKER = workerParam ? workerParam === 'true' : !isSafari

let playground = false
export const initWebgpuRenderer = async (postRender = () => { }, playgroundModeInWorker = false, actuallyPlayground = false) => {
Expand Down

0 comments on commit 46838e8

Please sign in to comment.