From 836c16cb2b1c8e1f723b01ed3a0505b483350764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Andr=C3=A9s?= Date: Wed, 6 Dec 2023 21:20:16 -0500 Subject: [PATCH] set high performance as default power preference for three.js webgl renderer set `high-performance` as the default power preference option for three.js webgl renderer so that browsers enable GPU acceleration --- src/plugin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugin.js b/src/plugin.js index 3d1fe569..e8ab10cb 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -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');