Explorar el Código

fix offscreen orbitcontrols

Gregg Tavares hace 3 años
padre
commit
26f7cb8be7
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      threejs/offscreencanvas-worker-orbitcontrols.js

+ 5 - 0
threejs/offscreencanvas-worker-orbitcontrols.js

@@ -7,6 +7,8 @@ function noop() {
 class ElementProxyReceiver extends EventDispatcher {
   constructor() {
     super();
+    // because OrbitControls try to set style.touchAction;
+    this.style = {};
   }
   get clientWidth() {
     return this.width;
@@ -14,6 +16,9 @@ class ElementProxyReceiver extends EventDispatcher {
   get clientHeight() {
     return this.height;
   }
+  // OrbitControls call these as of r132. Maybe we should implement them
+  setPointerCapture() { }
+  releasePointerCapture() { }
   getBoundingClientRect() {
     return {
       left: this.left,