Browse Source

new avatar

Nikolay Suslov 7 years ago
parent
commit
f625c085e1

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

@@ -97,7 +97,7 @@ function RotationInterpolator (timestep, entity) {
       next.setFromEuler(new THREE.Euler(
         radians(event.detail.newData.x),
         radians(event.detail.newData.y),
-        radians(event.detail.newData.z)
+        radians(event.detail.newData.z),'YXZ'
       ));
     }
   });

+ 4 - 6
support/client/lib/vwf/view/aframe.js

@@ -94,8 +94,8 @@ define(["module", "vwf/view", "jquery", "jquery-ui"], function (module, view, $)
                      //let avatarCameraID = 'camera-avatar-' + self.kernel.moniker();
                     //node.aframeObj.setAttribute('camera', 'active', propertyValue);
                      let avatarCameraEl = document.querySelector('#camera-avatar-'+ self.kernel.moniker());
-                        avatarCameraEl.setAttribute('camera', 'active', false);
-                        avatarCameraEl.setAttribute('camera', 'userHeight', 0.0);
+                        //avatarCameraEl.setAttribute('camera', 'active', false);
+                        //avatarCameraEl.setAttribute('camera', 'userHeight', 0.0);
                         document.querySelector('#avatarControl').setAttribute('camera', 'active', true);
 
 
@@ -174,13 +174,14 @@ define(["module", "vwf/view", "jquery", "jquery-ui"], function (module, view, $)
         let avatarID = self.kernel.moniker();
         var nodeName = 'avatar-' + avatarID;
 
+
         var newNode = {
             "id": nodeName,
             "uri": nodeName,
             "extends": "http://vwf.example.com/aframe/avatar.vwf",
             "children": {
                   "cursor": {
-                            "extends": "http://vwf.example.com/aframe/acursor.vwf"
+                            "extends": "http://vwf.example.com/aframe/acursor.vwf",
                         },
                 "camera": {
                     "id": 'camera-' + nodeName,
@@ -189,9 +190,6 @@ define(["module", "vwf/view", "jquery", "jquery-ui"], function (module, view, $)
                         "forAvatar": true,
                         "look-controls-enabled": false,
                         "wasd-controls": false
-                    },
-                    "children": {
-                      
                     }
                 }
             }

+ 2 - 2
support/proxy/vwf.example.com/aframe/avatar.vwf.yaml

@@ -2,6 +2,7 @@
 # Copyright 2017 Krestianstvo.org project
 ---
 extends: http://vwf.example.com/aframe/aentity.vwf
+type: "avatar"
 properties:
 methods:
     createAvatarBody:
@@ -12,7 +13,7 @@ methods:
                 "extends": "http://vwf.example.com/aframe/abox.vwf",
                 "properties": {
                     "color": myColor,
-                    "position": [0, 0, 0]
+                    "position": [0,0,0.5]
                 },
               "children": {
                 "avatarNameNode": {
@@ -28,7 +29,6 @@ methods:
                
                 } 
               };
-              this.position = [0, 0, 0];
               this.interpolation = "50ms";
               this.children.create( "avatarBody", newNode );
     getRandomColor: