瀏覽代碼

fix offscreen orbitcontrols

Gregg Tavares 3 年之前
父節點
當前提交
26f7cb8be7
共有 1 個文件被更改,包括 5 次插入0 次删除
  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,