Pārlūkot izejas kodu

update aframe to the latest version 0.9.1

Nikolay Suslov 5 gadi atpakaļ
vecāks
revīzija
922c693b68

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
public/lib/require.js


+ 3 - 3
public/vwf/model/aframe/addon/aframe-components.js

@@ -17,7 +17,7 @@ AFRAME.registerComponent('scene-utils', {
 
 
             //vwf_view.kernel.callMethod(vwf.application(), "enterVR");
             //vwf_view.kernel.callMethod(vwf.application(), "enterVR");
             let avatarEl = document.querySelector('#avatarControlParent');
             let avatarEl = document.querySelector('#avatarControlParent');
-            if (AFRAME.utils.device.isGearVR()) {
+            if (AFRAME.utils.device.isMobileVR()) {
 
 
             } else if (AFRAME.utils.device.isMobile()) {
             } else if (AFRAME.utils.device.isMobile()) {
                 avatarEl.setAttribute('position', '0 0 0')
                 avatarEl.setAttribute('position', '0 0 0')
@@ -36,8 +36,8 @@ AFRAME.registerComponent('scene-utils', {
             //vwf_view.kernel.callMethod(vwf.application(), "exitVR");
             //vwf_view.kernel.callMethod(vwf.application(), "exitVR");
             let avatarEl = document.querySelector('#avatarControlParent');
             let avatarEl = document.querySelector('#avatarControlParent');
 
 
-            if (AFRAME.utils.device.isGearVR()) {
-
+            if (AFRAME.utils.device.isMobileVR()) {
+                //avatarEl.setAttribute('position', '0 0 0');
             } else if (AFRAME.utils.device.isMobile()) {
             } else if (AFRAME.utils.device.isMobile()) {
                 avatarEl.setAttribute('position', '0 1.6 0');
                 avatarEl.setAttribute('position', '0 1.6 0');
             } else {
             } else {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 9 - 46
public/vwf/model/aframe/aframe-master.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
public/vwf/model/aframe/aframe-master.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
public/vwf/model/aframe/aframe-master.min.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
public/vwf/model/aframe/aframe-master.min.js.map


+ 1 - 1
public/vwf/model/aframe/extras/aframe-extras.controls.js

@@ -875,7 +875,7 @@ module.exports = AFRAME.registerComponent('checkpoint-controls', {
     var targetPosition = this.targetPosition;
     var targetPosition = this.targetPosition;
 
 
     position.copy(this.el.getAttribute('position'));
     position.copy(this.el.getAttribute('position'));
-    targetPosition.copy(this.checkpoint.object3D.getWorldPosition());
+    this.checkpoint.object3D.getWorldPosition(targetPosition);
     targetPosition.add(this.checkpoint.components.checkpoint.getOffset());
     targetPosition.add(this.checkpoint.components.checkpoint.getOffset());
     offset.copy(targetPosition).sub(position);
     offset.copy(targetPosition).sub(position);
   }
   }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
public/vwf/model/aframe/extras/aframe-extras.controls.min.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 3577 - 1
public/vwf/model/aframe/extras/aframe-extras.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 3577 - 1
public/vwf/model/aframe/extras/aframe-extras.loaders.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
public/vwf/model/aframe/extras/aframe-extras.loaders.min.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
public/vwf/model/aframe/extras/aframe-extras.min.js


+ 5 - 6
public/vwf/model/aframe/extras/aframe-extras.misc.js

@@ -676,6 +676,8 @@ module.exports = AFRAME.registerComponent('sphere-collider', {
     var position = new THREE.Vector3(),
     var position = new THREE.Vector3(),
         meshPosition = new THREE.Vector3(),
         meshPosition = new THREE.Vector3(),
         colliderScale = new THREE.Vector3(),
         colliderScale = new THREE.Vector3(),
+        size = new THREE.Vector3(),
+        box = new THREE.Box3(),
         distanceMap = new Map();
         distanceMap = new Map();
     return function () {
     return function () {
       var el = this.el,
       var el = this.el,
@@ -689,7 +691,7 @@ module.exports = AFRAME.registerComponent('sphere-collider', {
       }
       }
 
 
       distanceMap.clear();
       distanceMap.clear();
-      position.copy(el.object3D.getWorldPosition());
+      el.object3D.getWorldPosition(position);
       el.object3D.getWorldScale(colliderScale);
       el.object3D.getWorldScale(colliderScale);
       colliderRadius = data.radius * scaleFactor(colliderScale);
       colliderRadius = data.radius * scaleFactor(colliderScale);
       // Update collision list.
       // Update collision list.
@@ -718,9 +720,7 @@ module.exports = AFRAME.registerComponent('sphere-collider', {
         var radius = void 0,
         var radius = void 0,
             mesh = void 0,
             mesh = void 0,
             distance = void 0,
             distance = void 0,
-            box = void 0,
-            extent = void 0,
-            size = void 0;
+            extent = void 0;
 
 
         if (!el.isEntity) {
         if (!el.isEntity) {
           return;
           return;
@@ -732,8 +732,7 @@ module.exports = AFRAME.registerComponent('sphere-collider', {
           return;
           return;
         }
         }
 
 
-        box = new THREE.Box3().setFromObject(mesh);
-        size = box.getSize();
+        box.setFromObject(mesh).getSize(size);
         extent = Math.max(size.x, size.y, size.z) / 2;
         extent = Math.max(size.x, size.y, size.z) / 2;
         radius = Math.sqrt(2 * extent * extent);
         radius = Math.sqrt(2 * extent * extent);
         box.getCenter(meshPosition);
         box.getCenter(meshPosition);

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
public/vwf/model/aframe/extras/aframe-extras.misc.min.js


+ 5 - 6
public/vwf/model/aframe/extras/components/sphere-collider.js

@@ -79,6 +79,8 @@ module.exports = AFRAME.registerComponent('sphere-collider', {
     var position = new THREE.Vector3(),
     var position = new THREE.Vector3(),
         meshPosition = new THREE.Vector3(),
         meshPosition = new THREE.Vector3(),
         colliderScale = new THREE.Vector3(),
         colliderScale = new THREE.Vector3(),
+        size = new THREE.Vector3(),
+        box = new THREE.Box3(),
         distanceMap = new Map();
         distanceMap = new Map();
     return function () {
     return function () {
       var el = this.el,
       var el = this.el,
@@ -92,7 +94,7 @@ module.exports = AFRAME.registerComponent('sphere-collider', {
       }
       }
 
 
       distanceMap.clear();
       distanceMap.clear();
-      position.copy(el.object3D.getWorldPosition());
+      el.object3D.getWorldPosition(position);
       el.object3D.getWorldScale(colliderScale);
       el.object3D.getWorldScale(colliderScale);
       colliderRadius = data.radius * scaleFactor(colliderScale);
       colliderRadius = data.radius * scaleFactor(colliderScale);
       // Update collision list.
       // Update collision list.
@@ -121,9 +123,7 @@ module.exports = AFRAME.registerComponent('sphere-collider', {
         var radius = void 0,
         var radius = void 0,
             mesh = void 0,
             mesh = void 0,
             distance = void 0,
             distance = void 0,
-            box = void 0,
-            extent = void 0,
-            size = void 0;
+            extent = void 0;
 
 
         if (!el.isEntity) {
         if (!el.isEntity) {
           return;
           return;
@@ -135,8 +135,7 @@ module.exports = AFRAME.registerComponent('sphere-collider', {
           return;
           return;
         }
         }
 
 
-        box = new THREE.Box3().setFromObject(mesh);
-        size = box.getSize();
+        box.setFromObject(mesh).getSize(size);
         extent = Math.max(size.x, size.y, size.z) / 2;
         extent = Math.max(size.x, size.y, size.z) / 2;
         radius = Math.sqrt(2 * extent * extent);
         radius = Math.sqrt(2 * extent * extent);
         box.getCenter(meshPosition);
         box.getCenter(meshPosition);

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
public/vwf/model/aframe/extras/components/sphere-collider.min.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 2518 - 0
public/vwf/model/aframe/old/aframe-master.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 195 - 0
public/vwf/model/aframe/old/aframe-master.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 4 - 0
public/vwf/model/aframe/old/aframe-master.min.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
public/vwf/model/aframe/old/aframe-master.min.js.map


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

@@ -86,7 +86,7 @@ define(["module", "vwf/view"], function (module, view) {
 
 
                     if (this.gearvr == true) {
                     if (this.gearvr == true) {
                         console.log("CREATE GEARVR HERE!!");
                         console.log("CREATE GEARVR HERE!!");
-                        if (AFRAME.utils.device.isGearVR()) {
+                        if (AFRAME.utils.device.isMobileVR()) {
                             let nodeName = 'gearvr-' + self.kernel.moniker();
                             let nodeName = 'gearvr-' + self.kernel.moniker();
                             createGearVRControls();
                             createGearVRControls();
                             createGearVRController.call(self, childID, nodeName);
                             createGearVRController.call(self, childID, nodeName);
@@ -854,7 +854,7 @@ define(["module", "vwf/view"], function (module, view) {
         avatarEl.setAttribute('id', 'avatarControlParent');
         avatarEl.setAttribute('id', 'avatarControlParent');
 
 
 
 
-        if (AFRAME.utils.device.isGearVR()) {
+        if (AFRAME.utils.device.isMobileVR()) {
             avatarEl.setAttribute('movement-controls', {});//{'controls': 'gamepad'});
             avatarEl.setAttribute('movement-controls', {});//{'controls': 'gamepad'});
             //avatarEl.setAttribute('position', '0 0 0');
             //avatarEl.setAttribute('position', '0 0 0');
         }
         }
@@ -891,7 +891,7 @@ define(["module", "vwf/view"], function (module, view) {
         cursorEl.setAttribute('raycaster', 'objects', '.clickable');
         cursorEl.setAttribute('raycaster', 'objects', '.clickable');
         cursorEl.setAttribute('raycaster', 'showLine', false);
         cursorEl.setAttribute('raycaster', 'showLine', false);
 
 
-        if (AFRAME.utils.device.isGearVR()) { }
+        if (AFRAME.utils.device.isMobileVR()) { }
 
 
         // cursorEl.setAttribute('raycaster', {objects: '.intersectable', showLine: true, far: 100});
         // cursorEl.setAttribute('raycaster', {objects: '.intersectable', showLine: true, far: 100});
         // cursorEl.setAttribute('raycaster', 'showLine', true);
         // cursorEl.setAttribute('raycaster', 'showLine', true);

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels