Преглед на файлове

update to the latest aframe

Nikolay Suslov преди 7 години
родител
ревизия
8cdd3250d5
променени са 26 файла, в които са добавени 3291 реда и са изтрити 34994 реда
  1. 3 3
      support/client/lib/vwf.js
  2. 0 1
      support/client/lib/vwf/model/aframe/addon/aframe-components.js
  3. 203 173
      support/client/lib/vwf/model/aframe/aframe-master.js
  4. 3 26
      support/client/lib/vwf/model/aframe/aframe-master.js.map
  5. 1 1
      support/client/lib/vwf/model/aframe/aframe-master.min.js
  6. 0 0
      support/client/lib/vwf/model/aframe/aframe-master.min.js.map
  7. 381 16517
      support/client/lib/vwf/model/aframe/extras/aframe-extras.controls.js
  8. 0 0
      support/client/lib/vwf/model/aframe/extras/aframe-extras.controls.min.js
  9. 653 575
      support/client/lib/vwf/model/aframe/extras/aframe-extras.js
  10. 630 536
      support/client/lib/vwf/model/aframe/extras/aframe-extras.loaders.js
  11. 0 0
      support/client/lib/vwf/model/aframe/extras/aframe-extras.loaders.min.js
  12. 0 0
      support/client/lib/vwf/model/aframe/extras/aframe-extras.min.js
  13. 141 16229
      support/client/lib/vwf/model/aframe/extras/aframe-extras.misc.js
  14. 0 0
      support/client/lib/vwf/model/aframe/extras/aframe-extras.misc.min.js
  15. 1051 786
      support/client/lib/vwf/model/aframe/extras/aframe-extras.pathfinding.js
  16. 0 0
      support/client/lib/vwf/model/aframe/extras/aframe-extras.pathfinding.min.js
  17. 58 60
      support/client/lib/vwf/model/aframe/extras/aframe-extras.primitives.js
  18. 0 0
      support/client/lib/vwf/model/aframe/extras/aframe-extras.primitives.min.js
  19. 30 16
      support/client/lib/vwf/model/aframe/extras/components/grab.js
  20. 0 0
      support/client/lib/vwf/model/aframe/extras/components/grab.min.js
  21. 54 36
      support/client/lib/vwf/model/aframe/extras/components/sphere-collider.js
  22. 0 0
      support/client/lib/vwf/model/aframe/extras/components/sphere-collider.min.js
  23. 62 24
      support/client/lib/vwf/view/aframe.js
  24. 1 1
      support/proxy/vwf.example.com/aframe/avatar.js
  25. 11 1
      support/proxy/vwf.example.com/aframe/gearvrcontroller.js
  26. 9 9
      support/proxy/vwf.example.com/aframe/wmrvrcontroller.js

+ 3 - 3
support/client/lib/vwf.js

@@ -293,7 +293,7 @@
                         deps: [ "vwf/model/aframe/aframe-master" ]
                     },
 
-                    "vwf/model/aframe/addon/aframe-gamepad-controls.min": {
+                    "vwf/model/aframe/extras/aframe-extras.controls.min": {
                         deps: [ "vwf/model/aframe/aframe-master" ]
                     },
                     "vwf/model/aframe/addon/SkyShader": {
@@ -351,7 +351,7 @@
                     "vwf/model/aframe/addon/aframe-sun-sky",
                     "vwf/model/aframe/addon/aframe-components",
                     "vwf/model/aframe/addon/SkyShader",
-                    "vwf/model/aframe/addon/aframe-gamepad-controls.min",
+                    "vwf/model/aframe/extras/aframe-extras.controls.min",
                     "vwf/model/aframe/addon/BVHLoader",
                     "vwf/model/aframe/addon/TransformControls",
                     "vwf/model/aframe/addon/THREE.MeshLine"
@@ -388,7 +388,7 @@
                 
                 
                 { library: "vwf/model/aframe/addon/SkyShader", active: false },
-                { library: "vwf/model/aframe/addon/aframe-gamepad-controls.min", active: false },
+                { library: "vwf/model/aframe/extras/aframe-extras.controls.min", active: false },
 
                 { library: "vwf/view/aframeComponent", active: true },
 

+ 0 - 1
support/client/lib/vwf/model/aframe/addon/aframe-components.js

@@ -415,7 +415,6 @@ AFRAME.registerComponent('gearvrcontrol', {
             vwf_view.kernel.callMethod(controllerID, "triggerup", []);
         });
 
-
     },
 
     update: function () {

Файловите разлики са ограничени, защото са твърде много
+ 203 - 173
support/client/lib/vwf/model/aframe/aframe-master.js


Файловите разлики са ограничени, защото са твърде много
+ 3 - 26
support/client/lib/vwf/model/aframe/aframe-master.js.map


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
support/client/lib/vwf/model/aframe/aframe-master.min.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
support/client/lib/vwf/model/aframe/aframe-master.min.js.map


Файловите разлики са ограничени, защото са твърде много
+ 381 - 16517
support/client/lib/vwf/model/aframe/extras/aframe-extras.controls.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
support/client/lib/vwf/model/aframe/extras/aframe-extras.controls.min.js


Файловите разлики са ограничени, защото са твърде много
+ 653 - 575
support/client/lib/vwf/model/aframe/extras/aframe-extras.js


Файловите разлики са ограничени, защото са твърде много
+ 630 - 536
support/client/lib/vwf/model/aframe/extras/aframe-extras.loaders.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
support/client/lib/vwf/model/aframe/extras/aframe-extras.loaders.min.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
support/client/lib/vwf/model/aframe/extras/aframe-extras.min.js


Файловите разлики са ограничени, защото са твърде много
+ 141 - 16229
support/client/lib/vwf/model/aframe/extras/aframe-extras.misc.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
support/client/lib/vwf/model/aframe/extras/aframe-extras.misc.min.js


Файловите разлики са ограничени, защото са твърде много
+ 1051 - 786
support/client/lib/vwf/model/aframe/extras/aframe-extras.pathfinding.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
support/client/lib/vwf/model/aframe/extras/aframe-extras.pathfinding.min.js


Файловите разлики са ограничени, защото са твърде много
+ 58 - 60
support/client/lib/vwf/model/aframe/extras/aframe-extras.primitives.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
support/client/lib/vwf/model/aframe/extras/aframe-extras.primitives.min.js


+ 30 - 16
support/client/lib/vwf/model/aframe/extras/components/grab.js

@@ -1,6 +1,13 @@
 (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
-AFRAME.registerComponent('grab', require('./src/misc/grab'));
+'use strict';
+
+require('./src/misc/grab');
+
 },{"./src/misc/grab":2}],2:[function(require,module,exports){
+'use strict';
+
+/* global CANNON */
+
 /**
  * Based on aframe/examples/showcase/tracked-controls.
  *
@@ -8,14 +15,17 @@ AFRAME.registerComponent('grab', require('./src/misc/grab'));
  * Determines if the entity is grabbed or released.
  * Updates its position to move along the controller.
  */
-module.exports = {
-  init: function () {
+
+module.exports = AFRAME.registerComponent('grab', {
+  init: function init() {
+    this.system = this.el.sceneEl.systems.physics;
+
     this.GRABBED_STATE = 'grabbed';
 
     this.grabbing = false;
-    this.hitEl =      /** @type {AFRAME.Element}    */ null;
-    this.physics =    /** @type {AFRAME.System}     */ this.el.sceneEl.systems.physics;
-    this.constraint = /** @type {CANNON.Constraint} */ null;
+    this.hitEl = /** @type {AFRAME.Element}    */null;
+    this.physics = /** @type {AFRAME.System}     */this.el.sceneEl.systems.physics;
+    this.constraint = /** @type {CANNON.Constraint} */null;
 
     // Bind event handlers
     this.onHit = this.onHit.bind(this);
@@ -23,7 +33,7 @@ module.exports = {
     this.onGripClose = this.onGripClose.bind(this);
   },
 
-  play: function () {
+  play: function play() {
     var el = this.el;
     el.addEventListener('hit', this.onHit);
     el.addEventListener('gripdown', this.onGripClose);
@@ -34,7 +44,7 @@ module.exports = {
     el.addEventListener('triggerup', this.onGripOpen);
   },
 
-  pause: function () {
+  pause: function pause() {
     var el = this.el;
     el.removeEventListener('hit', this.onHit);
     el.removeEventListener('gripdown', this.onGripClose);
@@ -45,31 +55,35 @@ module.exports = {
     el.removeEventListener('triggerup', this.onGripOpen);
   },
 
-  onGripClose: function (evt) {
+  onGripClose: function onGripClose() {
     this.grabbing = true;
   },
 
-  onGripOpen: function (evt) {
+  onGripOpen: function onGripOpen() {
     var hitEl = this.hitEl;
     this.grabbing = false;
-    if (!hitEl) { return; }
+    if (!hitEl) {
+      return;
+    }
     hitEl.removeState(this.GRABBED_STATE);
     this.hitEl = undefined;
-    this.physics.world.removeConstraint(this.constraint);
+    this.system.removeConstraint(this.constraint);
     this.constraint = null;
   },
 
-  onHit: function (evt) {
+  onHit: function onHit(evt) {
     var hitEl = evt.detail.el;
     // If the element is already grabbed (it could be grabbed by another controller).
     // If the hand is not grabbing the element does not stick.
     // If we're already grabbing something you can't grab again.
-    if (!hitEl || hitEl.is(this.GRABBED_STATE) || !this.grabbing || this.hitEl) { return; }
+    if (!hitEl || hitEl.is(this.GRABBED_STATE) || !this.grabbing || this.hitEl) {
+      return;
+    }
     hitEl.addState(this.GRABBED_STATE);
     this.hitEl = hitEl;
     this.constraint = new CANNON.LockConstraint(this.el.body, hitEl.body);
-    this.physics.world.addConstraint(this.constraint);
+    this.system.addConstraint(this.constraint);
   }
-};
+});
 
 },{}]},{},[1]);

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
support/client/lib/vwf/model/aframe/extras/components/grab.min.js


+ 54 - 36
support/client/lib/vwf/model/aframe/extras/components/sphere-collider.js

@@ -1,6 +1,11 @@
 (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
-AFRAME.registerComponent('sphere-collider', require('./src/misc/sphere-collider'));
+'use strict';
+
+require('./src/misc/sphere-collider');
+
 },{"./src/misc/sphere-collider":2}],2:[function(require,module,exports){
+'use strict';
+
 /**
  * Based on aframe/examples/showcase/tracked-controls.
  *
@@ -11,15 +16,16 @@ AFRAME.registerComponent('sphere-collider', require('./src/misc/sphere-collider'
  * @property {string} state - State to set on collided entities.
  *
  */
-module.exports = {
+
+module.exports = AFRAME.registerComponent('sphere-collider', {
   schema: {
-    objects: {default: ''},
-    state: {default: 'collided'},
-    radius: {default: 0.05},
-    watch: {default: true}
+    objects: { default: '' },
+    state: { default: 'collided' },
+    radius: { default: 0.05 },
+    watch: { default: true }
   },
 
-  init: function () {
+  init: function init() {
     /** @type {MutationObserver} */
     this.observer = null;
     /** @type {Array<Element>} Elements to watch for collisions. */
@@ -31,20 +37,20 @@ module.exports = {
     this.handleHitEnd = this.handleHitEnd.bind(this);
   },
 
-  remove: function () {
+  remove: function remove() {
     this.pause();
   },
 
-  play: function () {
+  play: function play() {
     var sceneEl = this.el.sceneEl;
 
     if (this.data.watch) {
       this.observer = new MutationObserver(this.update.bind(this, null));
-      this.observer.observe(sceneEl, {childList: true, subtree: true});
+      this.observer.observe(sceneEl, { childList: true, subtree: true });
     }
   },
 
-  pause: function () {
+  pause: function pause() {
     if (this.observer) {
       this.observer.disconnect();
       this.observer = null;
@@ -54,9 +60,9 @@ module.exports = {
   /**
    * Update list of entities to test for collision.
    */
-  update: function () {
+  update: function update() {
     var data = this.data;
-    var objectEls;
+    var objectEls = void 0;
 
     // Push entities into list of els to intersect.
     if (data.objects) {
@@ -69,20 +75,21 @@ module.exports = {
     this.els = Array.prototype.slice.call(objectEls);
   },
 
-  tick: (function () {
+  tick: function () {
     var position = new THREE.Vector3(),
         meshPosition = new THREE.Vector3(),
-        meshScale = new THREE.Vector3(),
         colliderScale = new THREE.Vector3(),
         distanceMap = new Map();
     return function () {
       var el = this.el,
           data = this.data,
           mesh = el.getObject3D('mesh'),
-          colliderRadius,
           collisions = [];
+      var colliderRadius = void 0;
 
-      if (!mesh) { return; }
+      if (!mesh) {
+        return;
+      }
 
       distanceMap.clear();
       position.copy(el.object3D.getWorldPosition());
@@ -92,14 +99,14 @@ module.exports = {
       this.els.forEach(intersect);
 
       // Emit events and add collision states, in order of distance.
-      collisions
-        .sort(function (a, b) {
-          return distanceMap.get(a) > distanceMap.get(b) ? 1 : -1;
-        })
-        .forEach(this.handleHit);
+      collisions.sort(function (a, b) {
+        return distanceMap.get(a) > distanceMap.get(b) ? 1 : -1;
+      }).forEach(this.handleHit);
 
       // Remove collision state from current element.
-      if (collisions.length === 0) { el.emit('hit', {el: null}); }
+      if (collisions.length === 0) {
+        el.emit('hit', { el: null });
+      }
 
       // Remove collision state from other elements.
       this.collisions.filter(function (el) {
@@ -110,14 +117,23 @@ module.exports = {
       this.collisions = collisions;
 
       // Bounding sphere collision detection
-      function intersect (el) {
-        var radius, mesh, distance, box, extent, size;
-
-        if (!el.isEntity) { return; }
+      function intersect(el) {
+        var radius = void 0,
+            mesh = void 0,
+            distance = void 0,
+            box = void 0,
+            extent = void 0,
+            size = void 0;
+
+        if (!el.isEntity) {
+          return;
+        }
 
         mesh = el.getObject3D('mesh');
 
-        if (!mesh) { return; }
+        if (!mesh) {
+          return;
+        }
 
         box = new THREE.Box3().setFromObject(mesh);
         size = box.getSize();
@@ -125,7 +141,9 @@ module.exports = {
         radius = Math.sqrt(2 * extent * extent);
         box.getCenter(meshPosition);
 
-        if (!radius) { return; }
+        if (!radius) {
+          return;
+        }
 
         distance = position.distanceTo(meshPosition);
         if (distance < radius + colliderRadius) {
@@ -134,22 +152,22 @@ module.exports = {
         }
       }
       // use max of scale factors to maintain bounding sphere collision
-      function scaleFactor (scaleVec) {
+      function scaleFactor(scaleVec) {
         return Math.max.apply(null, scaleVec.toArray());
       }
     };
-  })(),
+  }(),
 
-  handleHit: function (targetEl) {
+  handleHit: function handleHit(targetEl) {
     targetEl.emit('hit');
     targetEl.addState(this.data.state);
-    this.el.emit('hit', {el: targetEl});
+    this.el.emit('hit', { el: targetEl });
   },
-  handleHitEnd: function (targetEl) {
+  handleHitEnd: function handleHitEnd(targetEl) {
     targetEl.emit('hitend');
     targetEl.removeState(this.data.state);
-    this.el.emit('hitend', {el: targetEl});
+    this.el.emit('hitend', { el: targetEl });
   }
-};
+});
 
 },{}]},{},[1]);

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
support/client/lib/vwf/model/aframe/extras/components/sphere-collider.min.js


+ 62 - 24
support/client/lib/vwf/view/aframe.js

@@ -436,13 +436,15 @@ define(["module", "vwf/view"], function (module, view) {
     });
 
 
-    function compareCoordinates(a, b) {
-        return a.x !== b.x || a.y !== b.y || a.z !== b.z
+    function compareCoordinates(a, b, delta) {
+        return Math.abs(a.x - b.x) > delta || Math.abs(a.y - b.y) > delta || Math.abs(a.z - b.z) > delta
 
     }
 
     function updateAvatarPosition() {
 
+        let delta = 0.0001;
+
         let avatarName = 'avatar-' + self.kernel.moniker();
         var node = self.state.nodes[avatarName];
         if (!node) return;
@@ -450,21 +452,31 @@ define(["module", "vwf/view"], function (module, view) {
 
         let el = document.querySelector('#avatarControl');
         if (el) {
-            let position = el.getAttribute('position');//el.object3D.getWorldPosition()//
-            let rotation = el.getAttribute('rotation');
+            let position = el.object3D.getWorldPosition(); //el.getAttribute('position');
+
+            let worldQuat = el.object3D.getWorldQuaternion(); 
+            //console.log(worldQuat);
+            let angle = (new THREE.Euler()).setFromQuaternion(worldQuat, 'YXZ');
+            var rotation = (new THREE.Vector3(THREE.Math.radToDeg(angle.x),
+            THREE.Math.radToDeg(angle.y), THREE.Math.radToDeg(angle.z) ));
+
+           // console.log(rotation);
+            //let rotation = el.getAttribute('rotation');
 
             let lastRotation = self.nodes[avatarName].selfTickRotation;
+            let lastPosition = self.nodes[avatarName].selfTickPosition;
 
-            let currentPosition = node.aframeObj.getAttribute('position');
-            let currentRotation = node.aframeObj.getAttribute('rotation');
+            // let currentPosition = node.aframeObj.getAttribute('position');
+            // let currentRotation = node.aframeObj.getAttribute('rotation');
 
-            if (position && rotation && currentPosition && currentRotation && lastRotation) {
-            if (compareCoordinates(position, currentPosition) || rotation.y !== lastRotation.y) {
+            if (position && rotation && lastPosition  && lastRotation) {
+            if (compareCoordinates(position, lastPosition, delta) || Math.abs(rotation.y - lastRotation.y) > delta) {
                     console.log("not equal!!")
                     vwf_view.kernel.callMethod(avatarName, "followAvatarControl", [position, rotation]);
                 }
             }
-            self.nodes[avatarName].selfTickRotation = Object.assign({}, el.getAttribute('rotation'));
+            self.nodes[avatarName].selfTickRotation = Object.assign({}, rotation);
+            self.nodes[avatarName].selfTickPosition = Object.assign({}, position);
         }
 
     }
@@ -472,6 +484,9 @@ define(["module", "vwf/view"], function (module, view) {
 
     function updateHandControllerVR(aName, aSelector) {
         //let avatarName = 'avatar-' + self.kernel.moniker();
+
+        let delta = 0.0001
+
         let avatarName = aName + self.kernel.moniker();
         var node = self.state.nodes[avatarName];
         if (!node) return;
@@ -480,7 +495,14 @@ define(["module", "vwf/view"], function (module, view) {
         let el = document.querySelector(aSelector);
         if (el) {
             let position = el.object3D.getWorldPosition() //el.getAttribute('position');
-            let rotation = el.getAttribute('rotation');
+
+            let worldQuat = el.object3D.getWorldQuaternion(); 
+            //console.log(worldQuat);
+            let angle = (new THREE.Euler()).setFromQuaternion(worldQuat, 'YXZ');
+            var rotation = (new THREE.Vector3(THREE.Math.radToDeg(angle.x),
+            THREE.Math.radToDeg(angle.y), THREE.Math.radToDeg(angle.z) ));
+
+            //let rotation = el.getAttribute('rotation');
 
             let lastRotation = self.nodes[avatarName].selfTickRotation;
             let lastPosition = self.nodes[avatarName].selfTickPosition;
@@ -489,14 +511,17 @@ define(["module", "vwf/view"], function (module, view) {
             //let currentRotation = node.aframeObj.getAttribute('rotation');
 
             if (position && rotation && lastRotation && lastPosition) {
-                if (compareCoordinates(position, lastPosition) || compareCoordinates(rotation, lastRotation)) {
+                if (compareCoordinates(position, lastPosition, delta) || compareCoordinates(rotation, lastRotation, delta)) {
                     console.log("not equal!!");
                     vwf_view.kernel.callMethod(avatarName, "updateVRControl", [position, rotation]);
                 }
             }
 
-            self.nodes[avatarName].selfTickRotation = Object.assign({}, el.getAttribute('rotation'));
-            self.nodes[avatarName].selfTickPosition = Object.assign({}, el.getAttribute('position'));
+          
+            //vwf_view.kernel.callMethod(avatarName, "updateVRControl", [position, rotation]);
+
+            self.nodes[avatarName].selfTickPosition = Object.assign({}, position);
+            self.nodes[avatarName].selfTickRotation = Object.assign({}, rotation);
 
         }
     }
@@ -508,23 +533,30 @@ define(["module", "vwf/view"], function (module, view) {
 
         let avatarEl = document.createElement('a-entity');
         avatarEl.setAttribute('id', 'avatarControlParent');
-        avatarEl.setAttribute('position', '0 1.6 0');
+        
 
         if (AFRAME.utils.device.isGearVR()) {
-            avatarEl.setAttribute('position', '0 0 0');
+            avatarEl.setAttribute('movement-controls', {});//{'controls': 'gamepad'});
+            //avatarEl.setAttribute('position', '0 0 0');
         }
+       
 
         let controlEl = document.createElement('a-camera');
 
         controlEl.setAttribute('id', 'avatarControl');
-        controlEl.setAttribute('wasd-controls', {});
+        //controlEl.setAttribute('wasd-controls', {});
         controlEl.setAttribute('look-controls', {pointerLockEnabled: false});
-       controlEl.setAttribute('gamepad-controls', {'controller': 0});
+       //controlEl.setAttribute('gamepad-controls', {'controller': 0});
         
+
         //controlEl.setAttribute('gearvr-controls',{});
-        controlEl.setAttribute('camera', 'active', true);
+        
        // controlEl.setAttribute('camera', 'near', 0.51);
 
+       
+    //controlEl.setAttribute('position', '0 0 0');
+    controlEl.setAttribute('camera', 'active', true);
+
         let cursorEl = document.createElement('a-cursor');
         cursorEl.setAttribute('id', 'cursor-' + avatarName);
         cursorEl.setAttribute('raycaster', {});
@@ -625,26 +657,32 @@ define(["module", "vwf/view"], function (module, view) {
 
         let sceneEl = document.querySelector('a-scene');
 
-        //let avatarControl = document.querySelector('#avatarControlParent');
+        let avatarControl = document.querySelector('#avatarControlParent');
 
         let gearvr = document.createElement('a-entity');
         gearvr.setAttribute('id', 'gearvrcontrol');
-        gearvr.setAttribute('gearvr-controls', '');
-        gearvr.setAttribute('gearvr-controls', 'hand', 'right');
-        gearvr.setAttribute('gearvrcontrol', '');
-        sceneEl.appendChild(gearvr);
+        gearvr.setAttribute('gearvr-controls', {
+            'hand': 'right',
+        'model': true        });
+       // gearvr.setAttribute('gearvr-controls', 'hand', 'right');
+
+        gearvr.setAttribute('gearvrcontrol', {});
+        avatarControl.appendChild(gearvr);
 
     }
 
     function createWMRVRControls(hand) {
 
         let sceneEl = document.querySelector('a-scene');
+
+        let avatarControl = document.querySelector('#avatarControlParent');
+
         let wmrvr = document.createElement('a-entity');
         wmrvr.setAttribute('id', 'wmrvrcontrol' + hand);
         wmrvr.setAttribute('windows-motion-controls', '');
         wmrvr.setAttribute('windows-motion-controls', 'hand', hand);
         wmrvr.setAttribute('wmrvrcontrol', {'hand': hand});
-        sceneEl.appendChild(wmrvr);
+        avatarControl.appendChild(wmrvr);
     }
 
 

+ 1 - 1
support/proxy/vwf.example.com/aframe/avatar.js

@@ -39,7 +39,7 @@ this.modelBodyDef = {
 
 this.createAvatarBody = function (modelSrc) {
 
-    var userHeight = 0;
+    var userHeight = -1.6;
 
     // if (AFRAME.utils.device.isGearVR()) {
     //     userHeight = 0

+ 11 - 1
support/proxy/vwf.example.com/aframe/gearvrcontroller.js

@@ -32,8 +32,16 @@ this.simpleDef = {
                         "color": "green"
                     }
                 }
+                // "rotationText": {
+                //     "extends": "http://vwf.example.com/aframe/atext.vwf",
+                //     "properties":{
+                //         "value": "rot",
+                //             "side": "double",
+                //     }
+                // }
             }
         }
+       
     }
 }
 
@@ -95,8 +103,10 @@ this.createController = function (modelSrc) {
 
 this.updateVRControl = function(position, rotation){
 
-    this.rotation = rotation;
+    
     this.position = position;
+    this.rotation = rotation;
+   // this.handVRNode.controller.pointer.rotationText.value = rotation.x.toString() + rotation.y.toString() + rotation.z.toString();
 
 }
 

+ 9 - 9
support/proxy/vwf.example.com/aframe/wmrvrcontroller.js

@@ -33,15 +33,15 @@ this.simpleDef = {
                     }
                 }
             }
-        },
-        "interpolation":
-            {
-                "extends": "http://vwf.example.com/aframe/interpolation-component.vwf",
-                "type": "component",
-                "properties": {
-                    "enabled": true
-                }
-            }
+        }
+        // "interpolation":
+        //     {
+        //         "extends": "http://vwf.example.com/aframe/interpolation-component.vwf",
+        //         "type": "component",
+        //         "properties": {
+        //             "enabled": true
+        //         }
+        //     }
     }
 }
 

Някои файлове не бяха показани, защото твърде много файлове са промени