From 6d23476016f50e243af6ec46e40c0b9b95d8ebd4 Mon Sep 17 00:00:00 2001 From: haydenjameslee Date: Wed, 17 Jan 2018 19:37:30 +0700 Subject: [PATCH] dist bump --- dist/networked-aframe.js | 72 ++++++++++++++++++------------------ dist/networked-aframe.min.js | 2 +- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/dist/networked-aframe.js b/dist/networked-aframe.js index 7c5164ca..c42f7bad 100644 --- a/dist/networked-aframe.js +++ b/dist/networked-aframe.js @@ -1794,7 +1794,7 @@ naf.utils = utils; naf.log = new NafLogger(); naf.schemas = new Schemas(); - naf.version = "0.4.0"; + naf.version = "0.5.0"; naf.adapters = new AdapterFactory(); var entities = new NetworkEntities(); @@ -1884,10 +1884,10 @@ return a.selector == b.selector && a.component == b.component && a.property == b.property; }; - /** - * Find the closest ancestor (including the passed in entity) that has a `networked` component - * @param {ANode} entity - Entity to begin the search on - * @returns {ANode} An entity with a `networked` component or null + /** + * Find the closest ancestor (including the passed in entity) that has a `networked` component + * @param {ANode} entity - Entity to begin the search on + * @returns {ANode} An entity with a `networked` component or null */ function getNetworkedEntity(entity) { while (entity && !(entity.components && entity.components.networked)) { @@ -3037,8 +3037,8 @@ this.easyrtc.disconnect(); } - /** - * Privates + /** + * Privates */ }, { @@ -3116,8 +3116,8 @@ } }, - /** - * Connect to signalling server and begin connecting to other clients + /** + * Connect to signalling server and begin connecting to other clients */ connect: function connect() { NAF.log.setDebug(this.data.debug); @@ -3752,19 +3752,19 @@ "use strict"; - /** - Compressed packet structure: - [ - 1, // 1 for compressed - networkId, - ownerId, - parent, - { - 0: data, // key maps to index of synced components in network component schema - 3: data, - 4: data - } - ] + /** + Compressed packet structure: + [ + 1, // 1 for compressed + networkId, + ownerId, + parent, + { + 0: data, // key maps to index of synced components in network component schema + 3: data, + 4: data + } + ] */ module.exports.compressSyncData = function (syncData, allComponents) { var compressed = []; @@ -3796,20 +3796,20 @@ return compressed; }; - /** - Decompressed packet structure: - [ - 0: 0, // 0 for uncompressed - networkId: networkId, - owner: clientId, - parent: parentNetworkId or null, - template: template, - components: { - position: data, - scale: data, - .head---visible: data - }, - ] + /** + Decompressed packet structure: + [ + 0: 0, // 0 for uncompressed + networkId: networkId, + owner: clientId, + parent: parentNetworkId or null, + template: template, + components: { + position: data, + scale: data, + .head---visible: data + }, + ] */ module.exports.decompressSyncData = function (compressed, components) { var entityData = {}; diff --git a/dist/networked-aframe.min.js b/dist/networked-aframe.min.js index 293e5898..5acb2318 100644 --- a/dist/networked-aframe.min.js +++ b/dist/networked-aframe.min.js @@ -1,3 +1,3 @@ -!function(t){function u(n){if(e[n])return e[n].exports;var i=e[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,u),i.loaded=!0,i.exports}var e={};return u.m=t,u.c=e,u.p="",u(0)}([function(t,u,e){"use strict";e(12),e(11),e(4),e(62),e(63),e(61)},function(t,u,e){"use strict";var n=e(7)();t.exports=function(t){return t!==n&&null!==t}},function(t,u){"use strict";var e=Array.prototype.forEach,n=Object.create;t.exports=function(t){var u=n(null);return e.call(arguments,function(t){u[t]=!0}),u}},function(t,u,e){"use strict";var n=e(1);t.exports=function(t){if(!n(t))throw new TypeError("Cannot use null or undefined");return t}},function(t,u,e){"use strict";var n=e(64),i=e(65),r=e(54),o=e(57),a=e(56),s=e(55),c=e(58),D={};D.app="",D.room="",D.clientId="",D.options=n,D.utils=i,D.log=new r,D.schemas=new o,D.version="0.4.0",D.adapters=new c;var l=new a,f=new s(l);D.connection=f,D.entities=l,t.exports=window.NAF=D},function(t,u,e){"use strict";t.exports=e(17)()?Array.from:e(18)},function(t,u,e){"use strict";var n,i=e(26),r=e(8),o=e(29),a=e(33);n=t.exports=function(t,u){var e,n,o,s,c;return arguments.length<2||"string"!=typeof t?(s=u,u=t,t=null):s=arguments[2],null==t?(e=o=!0,n=!1):(e=a.call(t,"c"),n=a.call(t,"e"),o=a.call(t,"w")),c={value:u,configurable:e,enumerable:n,writable:o},s?i(r(s),c):c},n.gs=function(t,u,e){var n,s,c,D;return"string"!=typeof t?(c=e,e=u,u=t,t=null):c=arguments[3],null==u?u=void 0:o(u)?null==e?e=void 0:o(e)||(c=e,e=void 0):(c=u,u=e=void 0),null==t?(n=!0,s=!1):(n=a.call(t,"c"),s=a.call(t,"e")),D={get:u,set:e,configurable:n,enumerable:s},c?i(r(c),D):D}},function(t,u){"use strict";t.exports=function(){}},function(t,u,e){"use strict";var n=e(1),i=Array.prototype.forEach,r=Object.create,o=function(t,u){var e;for(e in t)u[e]=t[e]};t.exports=function(t){var u=r(null);return i.call(arguments,function(t){n(t)&&o(Object(t),u)}),u}},function(t,u){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,u,e){"use strict";var n=e(5),i=e(2);t.exports=i.apply(null,n("\n\r\u2028\u2029"))},function(t,u,e){"use strict";if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");var n=THREE.Math.degToRad,i=e(13);AFRAME.registerComponent("lerp",{schema:{properties:{default:["position","rotation","scale"]}},init:function(){var t=this.el;this.lastPosition=t.getAttribute("position"),this.lastRotation=t.getAttribute("rotation"),this.lastScale=t.getAttribute("scale"),this.lerpingPosition=!1,this.lerpingRotation=!1,this.lerpingScale=!1,this.timeOfLastUpdate=0},tick:function(t,u){var e,n=this.now(),i=this.el.object3D;this.checkForComponentChanged(),this.lerpingPosition&&(e=(n-this.startLerpTimePosition)/this.duration,i.position.lerpVectors(this.startPosition,this.targetPosition,e),e>=1&&(this.lerpingPosition=!1)),this.lerpingRotation&&(e=(n-this.startLerpTimeRotation)/this.duration,THREE.Quaternion.slerp(this.startRotation,this.targetRotation,i.quaternion,e),e>=1&&(this.lerpingRotation=!1)),this.lerpingScale&&(e=(n-this.startLerpTimeScale)/this.duration,i.scale.lerpVectors(this.startScale,this.targetScale,e),e>=1&&(this.lerpingScale=!1))},checkForComponentChanged:function(){var t=this.el,u=!1,e=t.getAttribute("position");this.isLerpable("position")&&!this.almostEqualVec3(this.lastPosition,e)&&(this.toPosition(this.lastPosition,e),this.lastPosition=e,u=!0);var n=t.getAttribute("rotation");this.isLerpable("rotation")&&!this.almostEqualVec3(this.lastRotation,n)&&(this.toRotation(this.lastRotation,n),this.lastRotation=n,u=!0);var i=t.getAttribute("scale");this.isLerpable("scale")&&!this.almostEqualVec3(this.lastScale,i)&&(this.toScale(this.lastScale,i),this.lastScale=i,u=!0),u&&this.updateDuration()},isLerpable:function(t){return this.data.properties.indexOf(t)!=-1},updateDuration:function(){var t=this.now();this.duration=t-this.timeOfLastUpdate,this.timeOfLastUpdate=t},toPosition:function(t,u){this.lerpingPosition=!0,this.startLerpTimePosition=this.now(),this.startPosition=new THREE.Vector3(t.x,t.y,t.z),this.targetPosition=new THREE.Vector3(u.x,u.y,u.z)},toRotation:function(t,u){this.lerpingRotation=!0,this.startLerpTimeRotation=this.now(),this.startRotation=new THREE.Quaternion,this.startRotation.setFromEuler(new THREE.Euler(n(t.x),n(t.y),n(t.z),"YXZ")),this.targetRotation=new THREE.Quaternion,this.targetRotation.setFromEuler(new THREE.Euler(n(u.x),n(u.y),n(u.z),"YXZ"))},toScale:function(t,u){this.lerpingScale=!0,this.startLerpTimeScale=this.now(),this.startScale=new THREE.Vector3(t.x,t.y,t.z),this.targetScale=new THREE.Vector3(u.x,u.y,u.z)},almostEqualVec3:function(t,u){return i(t.x,u.x)&&i(t.y,u.y)&&i(t.z,u.z)},now:function(){return Date.now()}})},function(t,u,e){"use strict";function n(t,u,e){return new Promise(function(n){l(u).then(function(){d[t]={template:a(u)(e.trim()),type:u},n(d[t])})})}function i(t,u,e){switch(u){case p:return t(e);case E:return t(e);case y:return Mustache.render(t,e);case m:return t.render(e);default:return f(t,e)}}function r(t,u){var e=document.querySelector(t),i=e.getAttribute("type"),r=e.innerHTML;if(!u){if(!i)throw new Error("Must provide `type` attribute for