Browse Source

xr controls fix

Nikolay Suslov 4 years ago
parent
commit
d47debd934

+ 1 - 1
public/vwf/model/aframe/addon/aframe-teleport-controls.js

@@ -548,7 +548,7 @@
 	  this.uvs = new Float32Array(numPoints * 2 * 2);
 	  this.width = width;
 
-	  this.geometry.setAttribute('position', new THREE.BufferAttribute(this.vertices, 3).setUsage(true));
+	  this.geometry.setAttribute('position', new THREE.BufferAttribute(this.vertices, 3).setUsage(THREE.DynamicDrawUsage));
 
 	  this.material = new THREE.MeshBasicMaterial({
 	    side: THREE.DoubleSide,

+ 7 - 7
public/vwf/view/aframe.js

@@ -1111,14 +1111,14 @@ define(["module", "vwf/view"], function (module, view) {
         let el = document.createElement('a-entity');
         el.setAttribute('id', 'xrcontroller' + hand);
 
-        // el.setAttribute('hand-controls', {
-        //     'hand': hand,
-        //     'handModelStyle': 'lowPoly',
-        //     'color': '#ffcccc'
-        // });
+        el.setAttribute('hand-controls', {
+            'hand': hand,
+            'handModelStyle': 'lowPoly',
+            'color': '#ffcccc'
+        });
 
-        el.setAttribute('laser-controls', {hand: hand});
-        //el.setAttribute('raycaster', {objects: ".laserTarget", far: 5});
+        el.setAttribute('laser-controls', {hand: hand, model:false});
+        //el.setAttribute('raycaster', {objects: ".collidable", far: 5, showLine: false});
 
         // wmrvr.setAttribute('windows-motion-controls', '');
         // wmrvr.setAttribute('windows-motion-controls', 'hand', hand);