Skip to content

Commit

Permalink
worker is widely available
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSom committed Jan 27, 2025
1 parent a344015 commit 7a2e2fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demo/samples/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function updateDebugDrawFlags(){
}

async function initialize(){
const maxThreads = typeof Worker !== 'undefined' ? navigator.hardwareConcurrency || 4 : 1;
const maxThreads = navigator.hardwareConcurrency || 4;

box2d = await Box2DFactory({
pthreadCount: maxThreads,
Expand Down

0 comments on commit 7a2e2fb

Please sign in to comment.