Skip to content

Commit

Permalink
set high performance as default power preference for three.js webgl r…
Browse files Browse the repository at this point in the history
…enderer

set `high-performance` as the default power preference option for three.js webgl renderer

so that browsers enable GPU acceleration
  • Loading branch information
macool committed Dec 7, 2023
1 parent 22f8c57 commit 836c16c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,8 @@ void main() {
devicePixelRatio: window.devicePixelRatio,
alpha: false,
clearColor: 0xffffff,
antialias: true
antialias: true,
powerPreference: 'high-performance'
});

const webglContext = this.renderer.getContext('webgl');
Expand Down

0 comments on commit 836c16c

Please sign in to comment.