From 3aa0931d73f0798dad2dd6d21d3ca4d9dcd78392 Mon Sep 17 00:00:00 2001 From: altspaceautobot Date: Wed, 29 Nov 2017 15:35:01 -0800 Subject: [PATCH] Version bump 2.7.0 --- README.md | 4 ++-- dist/altspace.js | 6 +++--- dist/altspace.min.js | 2 +- doc/aframe/index.html | 2 +- ...module-altspace_components.altspace-cursor-collider.html | 2 +- ...odule-altspace_components.altspace-tracked-controls.html | 2 +- doc/aframe/module-altspace_components.altspace.html | 4 ++-- doc/aframe/module-altspace_components.collapse-model.html | 2 +- doc/aframe/module-altspace_components.html | 2 +- doc/aframe/module-altspace_components.instantiator.html | 2 +- doc/aframe/module-altspace_components.n-billboard.html | 2 +- doc/aframe/module-altspace_components.n-box-collider.html | 2 +- .../module-altspace_components.n-capsule-collider.html | 2 +- doc/aframe/module-altspace_components.n-cockpit-parent.html | 2 +- doc/aframe/module-altspace_components.n-collider.html | 2 +- doc/aframe/module-altspace_components.n-container.html | 2 +- doc/aframe/module-altspace_components.n-mesh-collider.html | 2 +- doc/aframe/module-altspace_components.n-object.html | 2 +- doc/aframe/module-altspace_components.n-portal.html | 2 +- .../module-altspace_components.n-skeleton-parent.html | 2 +- doc/aframe/module-altspace_components.n-sound.html | 2 +- doc/aframe/module-altspace_components.n-spawner.html | 2 +- .../module-altspace_components.n-sphere-collider.html | 2 +- doc/aframe/module-altspace_components.n-text.html | 2 +- doc/aframe/module-altspace_components.one-per-user.html | 2 +- doc/aframe/module-altspace_components.sync-color.html | 2 +- .../module-altspace_components.sync-n-skeleton-parent.html | 2 +- doc/aframe/module-altspace_components.sync-n-sound.html | 2 +- doc/aframe/module-altspace_components.sync-system.html | 2 +- doc/aframe/module-altspace_components.sync-transform.html | 2 +- doc/aframe/module-altspace_components.sync.html | 2 +- doc/aframe/module-altspace_components.wire.html | 2 +- doc/index.html | 4 ++-- doc/js/index.html | 2 +- package.json | 2 +- 35 files changed, 40 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 5faa5816..7566d26f 100644 --- a/README.md +++ b/README.md @@ -34,11 +34,11 @@ Many APIs are present in the client without loading `altspace.js`, but please st The version baked into the altspace.js script will determine which version of the entire SDK the client will provide your app. This means that if we make any breaking internal changes to things like rendering or cursor events, and you are using an older version of `altspace.js`, we will try to return legacy behavior appropriate to your version of `altspace.js`. Versioning will follow [SEMVER](http://semver.org/) as closely as possible. Details for each version can be found in the [Release Notes](https://github.com/AltspaceVR/AltspaceSDK/releases). -**Latest Version: v2.6.2 -- [See Changes](https://github.com/AltspaceVR/AltspaceSDK/releases/tag/v2.6.2)** +**Latest Version: v2.7.0 -- [See Changes](https://github.com/AltspaceVR/AltspaceSDK/releases/tag/v2.7.0)** Include the latest version of the SDK in your app with: -`` +`` If you use npm, you can install altspace.js with: diff --git a/dist/altspace.js b/dist/altspace.js index 664a5190..5d2ea760 100644 --- a/dist/altspace.js +++ b/dist/altspace.js @@ -501,7 +501,7 @@ var AltspaceTrackedControls = (function (AFrameComponent$$1) { * * My A-Frame Scene * -* +* * * * @@ -3070,7 +3070,7 @@ var Visible = (function (AFrameComponent$$1) { * * My A-Frame Scene * -* +* * * * @@ -6336,7 +6336,7 @@ var utilities_lib = Object.freeze({ if(!Object.isFrozen(window.altspace)) { Object.assign(window.altspace, {components: {}, utilities: {}, inClient: false}); } -var version = '2.6.2'; +var version = '2.7.0'; if (window.altspace.requestVersion) { window.altspace.requestVersion(version); } diff --git a/dist/altspace.min.js b/dist/altspace.min.js index a9c1ea2d..f07e8791 100644 --- a/dist/altspace.min.js +++ b/dist/altspace.min.js @@ -4,4 +4,4 @@ null!=e&&"object"==typeof e||null!=n&&"object"==typeof n)throw Error("Query: Fir n}}();ma(Of,Lf),Of.prototype.Be=function(t){return K("online"===t,"Unknown event type: "+t),[this.jc]},ca(Of),ma(Pf,Lf),Pf.prototype.Be=function(t){return K("visible"===t,"Unknown event type: "+t),[this.Ob]},ca(Pf);var Qf=/[\[\].#$\/\u0000-\u001F\u007F]/,Rf=/[\[\].#$\u0000-\u001F\u007F]/,Sf=/^[a-zA-Z][a-zA-Z._\-+]+$/;g=hg.prototype,g.add=function(t,e){this.set[t]=null!==e?e:!0},g.contains=function(t){return v(this.set,t)},g.get=function(t){return this.contains(t)?this.set[t]:void 0},g.remove=function(t){delete this.set[t]},g.clear=function(){this.set={}},g.e=function(){return wa(this.set)},g.count=function(){return pa(this.set)},g.keys=function(){var t=[];return r(this.set,function(e,n){t.push(n)}),t},pc.prototype.find=function(t){if(null!=this.A)return this.A.Y(t);if(t.e()||null==this.m)return null;var e=E(t);return t=H(t),this.m.contains(e)?this.m.get(e).find(t):null},pc.prototype.nc=function(t,e){if(t.e())this.A=e,this.m=null;else if(null!==this.A)this.A=this.A.K(t,e);else{null==this.m&&(this.m=new hg);var n=E(t);this.m.contains(n)||this.m.add(n,new pc),n=this.m.get(n),t=H(t),n.nc(t,e)}},pc.prototype.R=function(t){null!==this.m&&ig(this.m,function(e,n){t(e,n)})};var kg="auth.firebase.com",mg=["remember","redirectTo"];og.prototype.set=function(t,e){if(!e){if(!this.ce.length)throw Error("fb.login.SessionManager : No storage options available!");e=this.ce[0]}e.set(this.Re,t)},og.prototype.get=function(){var t=Qa(this.ce,q(this.og,this)),t=Pa(t,function(t){return null!==t});return Xa(t,function(t,e){return ad(e.token)-ad(t.token)}),0o.status){try{t=nb(o.responseText)}catch(e){}n(null,t)}else n(500<=o.status&&600>o.status?Eg("SERVER_ERROR"):Eg("NETWORK_ERROR"));n=null,vg(window,"beforeunload",i)}},"GET"===a)t+=(/\?/.test(t)?"":"?")+kb(e),r=null;else{var s=this.options.headers.content_type;"application/json"===s&&(r=B(e)),"application/x-www-form-urlencoded"===s&&(r=kb(e))}o.open(a,t,!0),t={"X-Requested-With":"XMLHttpRequest",Accept:"application/json;text/plain"},za(t,this.options.headers);for(var c in t)o.setRequestHeader(c,t[c]);o.send(r)},Gg.isAvailable=function(){var t;return(t=!!window.XMLHttpRequest)&&(t=pg(),t=!(t.match(/MSIE/)||t.match(/Trident/))||sg(10)),t},Gg.prototype.Cc=function(){return"json"},Hg.prototype.open=function(t,e,n){function i(){n&&(n(Eg("USER_CANCELLED")),n=null)}var r,o=this,a=Qc(kg);e.requestId=this.pc,e.redirectTo=a.scheme+"://"+a.host+"/blank/page.html",t+=/\?/.test(t)?"":"?",t+=kb(e),(r=window.open(t,"_blank","location=no"))&&ha(r.addEventListener)?(r.addEventListener("loadstart",function(t){var e;if(e=t&&t.url)t:{try{var s=document.createElement("a");s.href=t.url,e=s.host===a.host&&"/blank/page.html"===s.pathname;break t}catch(c){}e=!1}e&&(t=xg(t.url),r.removeEventListener("exit",i),r.close(),t=new lg(null,null,{requestId:o.pc,requestKey:t}),o.Ef.requestWithCredential("/auth/session",t,n),n=null)}),r.addEventListener("exit",i)):n(Eg("TRANSPORT_UNAVAILABLE"))},Hg.isAvailable=function(){return qg()},Hg.prototype.Cc=function(){return"redirect"},Ig.prototype.open=function(t,e,n){function i(){n&&(n(Eg("REQUEST_INTERRUPTED")),n=null)}function r(){setTimeout(function(){window.__firebase_auth_jsonp[o]=void 0,wa(window.__firebase_auth_jsonp)&&(window.__firebase_auth_jsonp=void 0);try{var t=document.getElementById(o);t&&t.parentNode.removeChild(t)}catch(e){}},1),vg(window,"beforeunload",i)}var o="fn"+(new Date).getTime()+Math.floor(99999*Math.random());e[this.options.callback_parameter]="__firebase_auth_jsonp."+o,t+=(/\?/.test(t)?"":"?")+kb(e),ug(window,"beforeunload",i),window.__firebase_auth_jsonp[o]=function(t){n&&(n(null,t),n=null),r()},Jg(o,t,n)},Ig.isAvailable=function(){return"undefined"!=typeof document&&null!=document.createElement},Ig.prototype.Cc=function(){return"json"},ma(Kg,Lf),g=Kg.prototype,g.ye=function(){return this.nb||null},g.te=function(t,e){Tg(this);var n=ng(t);n.$a._method="POST",this.qc("/users",n,function(t,n){t?R(e,t):R(e,t,n)})},g.Ue=function(t,e){var n=this;Tg(this);var i="/users/"+encodeURIComponent(t.email),r=ng(t);r.$a._method="DELETE",this.qc(i,r,function(t,i){!t&&i&&i.uid&&n.nb&&n.nb.uid&&n.nb.uid===i.uid&&Rg(n),R(e,t)})},g.qe=function(t,e){Tg(this);var n="/users/"+encodeURIComponent(t.email)+"/password",i=ng(t);i.$a._method="PUT",i.$a.password=t.newPassword,this.qc(n,i,function(t){R(e,t)})},g.pe=function(t,e){Tg(this);var n="/users/"+encodeURIComponent(t.oldEmail)+"/email",i=ng(t);i.$a._method="PUT",i.$a.email=t.newEmail,i.$a.password=t.password,this.qc(n,i,function(t){R(e,t)})},g.We=function(t,e){Tg(this);var n="/users/"+encodeURIComponent(t.email)+"/password",i=ng(t);i.$a._method="POST",this.qc(n,i,function(t){R(e,t)})},g.qc=function(t,e,n){Wg(this,[Gg,Ig],t,e,n)},g.Be=function(t){return K("auth_status"===t,'initial event must be of type "auth_status"'),this.Te?null:[this.nb]};var ah,bh;$g.prototype.open=function(t,e){this.hf=0,this.la=e,this.Af=new Xg(t),this.Ab=!1;var n=this;this.rb=setTimeout(function(){n.f("Timed out trying to connect."),n.hb(),n.rb=null},Math.floor(3e4)),Sc(function(){if(!n.Ab){n.Ta=new ch(function(t,e,i,r,o){if(dh(n,arguments),n.Ta)if(n.rb&&(clearTimeout(n.rb),n.rb=null),n.Hc=!0,"start"==t)n.id=e,n.Gf=i;else{if("close"!==t)throw Error("Unrecognized command received: "+t);e?(n.Ta.Xd=!1,Yg(n.Af,e,function(){n.hb()})):n.hb()}},function(t,e){dh(n,arguments),Zg(n.Af,t,e)},function(){n.hb()},n.jd);var t={start:"t"};t.ser=Math.floor(1e8*Math.random()),n.Ta.ie&&(t.cb=n.Ta.ie),t.v="5",n.Zd&&(t.s=n.Zd),"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(t.r="f"),t=n.jd(t),n.f("Connecting via long-poll to "+t),eh(n.Ta,t,function(){})}})},$g.prototype.start=function(){var t=this.Ta,e=this.Gf;for(t.sg=this.id,t.tg=e,t.me=!0;fh(t););t=this.id,e=this.Gf,this.gc=document.createElement("iframe");var n={dframe:"t"};n.id=t,n.pw=e,this.gc.src=this.jd(n),this.gc.style.display="none",document.body.appendChild(this.gc)},$g.isAvailable=function(){return ah||!bh&&"undefined"!=typeof document&&null!=document.createElement&&!("object"==typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"==typeof Windows&&"object"==typeof Windows.Vg)&&!0},g=$g.prototype,g.Ed=function(){},g.dd=function(){this.Ab=!0,this.Ta&&(this.Ta.close(),this.Ta=null),this.gc&&(document.body.removeChild(this.gc),this.gc=null),this.rb&&(clearTimeout(this.rb),this.rb=null)},g.hb=function(){this.Ab||(this.f("Longpoll is closing itself"),this.dd(),this.la&&(this.la(this.Hc),this.la=null))},g.close=function(){this.Ab||(this.f("Longpoll is being closed."),this.dd())},g.send=function(t){t=B(t),this.pb+=t.length,Nb(this.Va,"bytes_sent",t.length),t=Jc(t),t=fb(t,!0),t=Wc(t,1840);for(var e=0;e=t.length){var e=Number(t);if(!isNaN(e)){r.cf=e,r.frames=[],t=null;break t}}r.cf=1,r.frames=[]}null!==t&&lh(r,t)}},this.ua.onerror=function(t){r.f("WebSocket error. Closing connection."),(t=t.message||t.data)&&r.f(t),r.hb()}},ih.prototype.start=function(){},ih.isAvailable=function(){var t=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var e=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);e&&1parseFloat(e[1])&&(t=!0)}return!t&&null!==hh&&!jh},ih.responsesRequiredToBeHealthy=2,ih.healthyTimeout=3e4,g=ih.prototype,g.Ed=function(){Cc.remove("previous_websocket_failure")},g.send=function(t){kh(this),t=B(t),this.pb+=t.length,Nb(this.Va,"bytes_sent",t.length),t=Wc(t,16384),1r;r++)e+=" ";console.log(e+i)}}},g.$e=function(t){Nb(this.Va,t),this.Qg.Nf[t]=!0},g.f=function(t){var e="";this.Sa&&(e=this.Sa.id+":"),Cb(e,arguments)},W.prototype.zb=function(){for(var t in this.oc)this.oc[t].zb()},W.prototype.rc=function(){for(var t in this.oc)this.oc[t].rc()},W.prototype.we=function(){this.Qf=!0},ca(W),W.prototype.interrupt=W.prototype.zb,W.prototype.resume=W.prototype.rc,X.prototype.cancel=function(t){x("Firebase.onDisconnect().cancel",0,1,arguments.length),A("Firebase.onDisconnect().cancel",1,t,!0),this.bd.Jd(this.ra,t||null)},X.prototype.cancel=X.prototype.cancel,X.prototype.remove=function(t){x("Firebase.onDisconnect().remove",0,1,arguments.length),bg("Firebase.onDisconnect().remove",this.ra),A("Firebase.onDisconnect().remove",1,t,!0),Yh(this.bd,this.ra,null,t)},X.prototype.remove=X.prototype.remove,X.prototype.set=function(t,e){x("Firebase.onDisconnect().set",1,2,arguments.length),bg("Firebase.onDisconnect().set",this.ra),Vf("Firebase.onDisconnect().set",t,this.ra,!1),A("Firebase.onDisconnect().set",2,e,!0),Yh(this.bd,this.ra,t,e)},X.prototype.set=X.prototype.set,X.prototype.Kb=function(t,e,n){x("Firebase.onDisconnect().setWithPriority",2,3,arguments.length),bg("Firebase.onDisconnect().setWithPriority",this.ra),Vf("Firebase.onDisconnect().setWithPriority",t,this.ra,!1),Yf("Firebase.onDisconnect().setWithPriority",2,e),A("Firebase.onDisconnect().setWithPriority",3,n,!0),Zh(this.bd,this.ra,t,e,n)},X.prototype.setWithPriority=X.prototype.Kb,X.prototype.update=function(t,e){if(x("Firebase.onDisconnect().update",1,2,arguments.length),bg("Firebase.onDisconnect().update",this.ra),ea(t)){for(var n={},i=0;i=t)throw Error("Query.limit: First argument must be a positive integer.");if(this.o.ja)throw Error("Query.limit: Limit was already set (by another call to limit, limitToFirst, orlimitToLast.");var e=this.o.Ie(t);return li(e),new Y(this.k,this.path,e,this.kc)},g.Je=function(t){if(x("Query.limitToFirst",1,1,arguments.length),!ga(t)||Math.floor(t)!==t||0>=t)throw Error("Query.limitToFirst: First argument must be a positive integer.");if(this.o.ja)throw Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new Y(this.k,this.path,this.o.Je(t),this.kc)},g.Ke=function(t){if(x("Query.limitToLast",1,1,arguments.length),!ga(t)||Math.floor(t)!==t||0>=t)throw Error("Query.limitToLast: First argument must be a positive integer.");if(this.o.ja)throw Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new Y(this.k,this.path,this.o.Ke(t),this.kc)},g.Cg=function(t){if(x("Query.orderByChild",1,1,arguments.length),"$key"===t)throw Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===t)throw Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===t)throw Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');$f("Query.orderByChild",1,t,!1),mi(this,"Query.orderByChild");var e=be(this.o,new Sd(t));return ki(e),new Y(this.k,this.path,e,!0)},g.Dg=function(){x("Query.orderByKey",0,0,arguments.length),mi(this,"Query.orderByKey");var t=be(this.o,Od);return ki(t),new Y(this.k,this.path,t,!0)},g.Eg=function(){x("Query.orderByPriority",0,0,arguments.length),mi(this,"Query.orderByPriority");var t=be(this.o,N);return ki(t),new Y(this.k,this.path,t,!0)},g.Fg=function(){x("Query.orderByValue",0,0,arguments.length),mi(this,"Query.orderByValue");var t=be(this.o,Yd);return ki(t),new Y(this.k,this.path,t,!0)},g.ae=function(t,e){x("Query.startAt",0,2,arguments.length),Vf("Query.startAt",t,this.path,!0),$f("Query.startAt",2,e,!0);var i=this.o.ae(t,e);if(li(i),ki(i),this.o.ma)throw Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return n(t)||(e=t=null),new Y(this.k,this.path,i,this.kc)},g.td=function(t,e){x("Query.endAt",0,2,arguments.length),Vf("Query.endAt",t,this.path,!0),$f("Query.endAt",2,e,!0);var n=this.o.td(t,e);if(li(n),ki(n),this.o.pa)throw Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new Y(this.k,this.path,n,this.kc)},g.ig=function(t,e){if(x("Query.equalTo",1,2,arguments.length),Vf("Query.equalTo",t,this.path,!1),$f("Query.equalTo",2,e,!0),this.o.ma)throw Error("Query.equalTo: Starting point was already set (by another call to endAt or equalTo).");if(this.o.pa)throw Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.ae(t,e).td(t,e)},g.toString=function(){x("Query.toString",0,0,arguments.length);for(var t=this.path,e="",n=t.Z;n=128?"dark":"light"}function o(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function a(t){function e(){i=(i+1)%256,r=(r+n[i])%256;var t=n[i];return n[i]=n[r],n[r]=t,n[(n[i]+n[r])%256]}for(var n=[],i=0,r=0,o=0;256>o;o++)n[o]=o;for(var a=0,s=0;256>a;a++){s=(s+n[a]+t.charCodeAt(a%t.length))%256;var c=n[a];n[a]=n[s],n[s]=c}this.random=function(){for(var t=0,n=0,i=1;8>t;t++)n+=e()*i,i*=256;return n/0x10000000000000000}}var s={},c={aliceblue:"F0F8FF",antiquewhite:"FAEBD7",aqua:"00FFFF",aquamarine:"7FFFD4",azure:"F0FFFF",beige:"F5F5DC",bisque:"FFE4C4",black:"000000",blanchedalmond:"FFEBCD",blue:"0000FF",blueviolet:"8A2BE2",brown:"A52A2A",burlywood:"DEB887",cadetblue:"5F9EA0",chartreuse:"7FFF00",chocolate:"D2691E",coral:"FF7F50",cornflowerblue:"6495ED",cornsilk:"FFF8DC",crimson:"DC143C",cyan:"00FFFF",darkblue:"00008B",darkcyan:"008B8B",darkgoldenrod:"B8860B",darkgray:"A9A9A9",darkgrey:"A9A9A9",darkgreen:"006400",darkkhaki:"BDB76B",darkmagenta:"8B008B",darkolivegreen:"556B2F",darkorange:"FF8C00",darkorchid:"9932CC",darkred:"8B0000",darksalmon:"E9967A",darkseagreen:"8FBC8F",darkslateblue:"483D8B",darkslategray:"2F4F4F",darkslategrey:"2F4F4F",darkturquoise:"00CED1",darkviolet:"9400D3",deeppink:"FF1493",deepskyblue:"00BFFF",dimgray:"696969",dimgrey:"696969",dodgerblue:"1E90FF",firebrick:"B22222",floralwhite:"FFFAF0",forestgreen:"228B22",fuchsia:"FF00FF",gainsboro:"DCDCDC",ghostwhite:"F8F8FF",gold:"FFD700",goldenrod:"DAA520",gray:"808080",grey:"808080",green:"008000",greenyellow:"ADFF2F",honeydew:"F0FFF0",hotpink:"FF69B4",indianred:"CD5C5C",indigo:"4B0082",ivory:"FFFFF0",khaki:"F0E68C",lavender:"E6E6FA",lavenderblush:"FFF0F5",lawngreen:"7CFC00",lemonchiffon:"FFFACD",lightblue:"ADD8E6",lightcoral:"F08080",lightcyan:"E0FFFF",lightgoldenrodyellow:"FAFAD2",lightgray:"D3D3D3",lightgrey:"D3D3D3",lightgreen:"90EE90",lightpink:"FFB6C1",lightsalmon:"FFA07A",lightseagreen:"20B2AA",lightskyblue:"87CEFA",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"B0C4DE",lightyellow:"FFFFE0",lime:"00FF00",limegreen:"32CD32",linen:"FAF0E6",magenta:"FF00FF",maroon:"800000",mediumaquamarine:"66CDAA",mediumblue:"0000CD",mediumorchid:"BA55D3",mediumpurple:"9370D8",mediumseagreen:"3CB371",mediumslateblue:"7B68EE",mediumspringgreen:"00FA9A",mediumturquoise:"48D1CC",mediumvioletred:"C71585",midnightblue:"191970",mintcream:"F5FFFA",mistyrose:"FFE4E1",moccasin:"FFE4B5",navajowhite:"FFDEAD",navy:"000080",oldlace:"FDF5E6",olive:"808000",olivedrab:"6B8E23",orange:"FFA500",orangered:"FF4500",orchid:"DA70D6",palegoldenrod:"EEE8AA",palegreen:"98FB98",paleturquoise:"AFEEEE",palevioletred:"D87093",papayawhip:"FFEFD5",peachpuff:"FFDAB9",peru:"CD853F",pink:"FFC0CB",plum:"DDA0DD",powderblue:"B0E0E6",purple:"800080",rebeccapurple:"663399",red:"FF0000",rosybrown:"BC8F8F",royalblue:"4169E1",saddlebrown:"8B4513",salmon:"FA8072",sandybrown:"F4A460",seagreen:"2E8B57",seashell:"FFF5EE",sienna:"A0522D",silver:"C0C0C0",skyblue:"87CEEB",slateblue:"6A5ACD",slategray:"708090",slategrey:"708090",snow:"FFFAFA",springgreen:"00FF7F",steelblue:"4682B4",tan:"D2B48C",teal:"008080",thistle:"D8BFD8",tomato:"FF6347",turquoise:"40E0D0",violet:"EE82EE",wheat:"F5DEB3",white:"FFFFFF",whitesmoke:"F5F5F5",yellow:"FFFF00",yellowgreen:"9ACD32"},u=.618033988749895,h={hue:null,saturation:null,value:null,base_color:"",greyscale:!1,grayscale:!1,golden:!0,full_random:!1,colors_returned:1,format:"hex",seed:null},l={scheme_type:"analogous",format:"hex"},f={golden:!1,format:"hex"};return s.NAME_to_HEX=function(t){return t=t.toLowerCase(),t in c?c[t]:void console.error("Color name not recognized.")},s.NAME_to_RGB=function(t){return s.HEX_to_RGB(s.NAME_to_HEX(t))},s.NAME_to_HSV=function(t){return s.HEX_to_HSV(s.NAME_to_HEX(t))},s.HEX_to_RGB=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,n,i){return e+e+n+n+i+i});var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null},s.RGB_to_HEX=function(t){return"#"+((1<<24)+(t.r<<16)+(t.g<<8)+t.b).toString(16).slice(1)},s.HSV_to_RGB=function(t){var e,n,i,r,o,a,s,c,u=t.h,h=t.s,l=t.v;if(0===h)return{r:l,g:l,b:l};switch(u/=60,r=Math.floor(u),o=u-r,a=l*(1-h),s=l*(1-h*o),c=l*(1-h*(1-o)),r){case 0:e=l,n=c,i=a;break;case 1:e=s,n=l,i=a;break;case 2:e=a,n=l,i=c;break;case 3:e=a,n=s,i=l;break;case 4:e=c,n=a,i=l;break;case 5:e=l,n=a,i=s}return{r:Math.floor(255*e),g:Math.floor(255*n),b:Math.floor(255*i)}},s.RGB_to_HSV=function(t){var e=t.r/255,n=t.g/255,i=t.b/255,r=0,o=0,a=0,s=Math.min(e,Math.min(n,i)),c=Math.max(e,Math.max(n,i));if(s===c)return a=s,{h:0,s:0,v:a};var u=e===s?n-i:i===s?e-n:i-e,h=e===s?3:i===s?1:5;return r=60*(h-u/(c-s)),o=(c-s)/c,a=c,{h:r,s:o,v:a}},s.HSV_to_HEX=function(t){return s.RGB_to_HEX(s.HSV_to_RGB(t))},s.HEX_to_HSV=function(t){return s.RGB_to_HSV(s.HEX_to_RGB(t))},s.make_scheme=function(t,e){function r(t){return{h:t.h,s:t.s,v:t.v}}var a,s,c,u,h,f=o(l);if(null!==e)for(var d in e)e.hasOwnProperty(d)&&(f[d]=e[d]);var p=[t];switch(f.scheme_type.toLowerCase()){case"monochromatic":case"mono":for(h=1;2>=h;h++)a=r(t),c=a.s+.1*h,c=n(c,0,1),u=a.v+.1*h,u=n(u,0,1),a.s=c,a.v=u,p.push(a);for(h=1;2>=h;h++)a=r(t),c=a.s-.1*h,c=n(c,0,1),u=a.v-.1*h,u=n(u,0,1),a.s=c,a.v=u,p.push(a);break;case"complementary":case"complement":case"comp":a=r(t),a.h=(a.h+180)%360,p.push(a);break;case"split-complementary":case"split-complement":case"split":a=r(t),a.h=(a.h+165)%360,p.push(a),a=r(t),a.h=Math.abs((a.h-165)%360),p.push(a);break;case"double-complementary":case"double-complement":case"double":a=r(t),a.h=(a.h+180)%360,p.push(a),a.h=(a.h+30)%360,s=r(a),p.push(a),a.h=(a.h+180)%360,p.push(s);break;case"analogous":case"ana":for(h=1;5>=h;h++)a=r(t),a.h=(a.h+20*h)%360,p.push(a);break;case"triadic":case"triad":case"tri":for(h=1;3>h;h++)a=r(t),a.h=(a.h+120*h)%360,p.push(a);break;default:console.error("Color scheme not recognized.")}return i(f.format.toLowerCase(),p),p},s.make_color=function(r){var c=[],l=o(h),f=null;if(null!==r)for(var d in r)r.hasOwnProperty(d)&&(l[d]=r[d]);var p=null;"string"==typeof l.seed&&(p=new a(l.seed)),l.base_color.length>0&&(f=l.base_color.match(/^#?([0-9a-f]{3})([0-9a-f]{3})?$/i)?s.HEX_to_HSV(l.base_color):s.NAME_to_HSV(l.base_color));for(var g=0;gc;c++)n[f[c]]=u[f[c]];for(;".."==l[0];)h.pop(),l.shift();n.path=("/"!=i.substring(0,1)?h.join("/"):"")+"/"+l.join("/")}r(n)},i=function(t){return t=t.replace(/\+/g," "),t=t.replace(/%([ef][0-9a-f])%([89ab][0-9a-f])%([89ab][0-9a-f])/gi,function(t,e,n,i){var r=parseInt(e,16)-224,o=parseInt(n,16)-128;if(0==r&&32>o)return t;var a=parseInt(i,16)-128,s=(r<<12)+(o<<6)+a;return s>65535?t:String.fromCharCode(s)}),t=t.replace(/%([cd][0-9a-f])%([89ab][0-9a-f])/gi,function(t,e,n){var i=parseInt(e,16)-192;if(2>i)return t;var r=parseInt(n,16)-128;return String.fromCharCode((i<<6)+r)}),t=t.replace(/%([0-7][0-9a-f])/gi,function(t,e){return String.fromCharCode(parseInt(e,16))})},r=function(t){var e=t.query;t.query=new function(t){for(var e,n=/([^=&]+)(=([^&]*))?/g;e=n.exec(t);){var r=decodeURIComponent(e[1].replace(/\+/g," ")),o=e[3]?i(e[3]):"";null!=this[r]?(this[r]instanceof Array||(this[r]=[this[r]]),this[r].push(o)):this[r]=o}this.clear=function(){for(r in this)this[r]instanceof Function||delete this[r]},this.toString=function(){var t="",e=encodeURIComponent;for(var n in this)if(!(this[n]instanceof Function))if(this[n]instanceof Array){var i=this[n].length;if(i)for(var r=0;i>r;r++)t+=t?"&":"",t+=e(n)+"="+e(this[n][r]);else t+=(t?"&":"")+e(n)+"="}else t+=t?"&":"",t+=e(n)+"="+e(this[n]);return t}}(e)};return function(t){this.toString=function(){return(this.protocol&&this.protocol+"://")+(this.user&&this.user+(this.pass&&":"+this.pass)+"@")+(this.host&&this.host)+(this.port&&":"+this.port)+(this.path&&this.path)+(this.query.toString()&&"?"+this.query)+(this.hash&&"#"+this.hash)},n(this,t)}}();!function(t,e,n){"use strict";function i(t){var e={};return e=t.__proto__?Object.assign(i(t.__proto__),t):Object.assign({schema:{},dependencies:[]},t),t.schema&&Object.assign(e.schema,t.schema),t.dependencies&&(n=e.dependencies).push.apply(n,t.dependencies),e;var n}function r(t,e){AFRAME.registerComponent(t,i(new e))}function o(t,e){AFRAME.registerSystem(t,i(new e))}function a(t,e,n){return 0===e.length?n:(t[e[0]]=a(t[e[0]]||{},e.slice(1),n),t)}function s(t,e,n){var i,r,o,a,s=0;n||(n={});var c=function(){s=n.leading===!1?0:Date.now(),i=null,a=t.apply(r,o),i||(r=o=null)},u=function(){var u=Date.now();s||n.leading!==!1||(s=u);var h=e-(u-s);return r=this,o=arguments,0>=h||h>e?(i&&(clearTimeout(i),i=null),s=u,a=t.apply(r,o),i||(r=o=null)):i||n.trailing===!1||(i=setTimeout(c,h)),a};return u.cancel=function(){clearTimeout(i),s=0,i=r=o=null},u}function c(t){return t?encodeURIComponent(t).replace(/\./g,"%2E").replace(/%[A-Z0-9]{2}/g,"-"):null}function u(){var t=document.querySelector("link[rel=canonical]");return t?t.href:window.location.href}function h(t,e,n){return c(e||n)+":"+c(t||"")}function l(n){n=n||{};var i=new e,r=n.baseRefUrl||"https://altspace-apps.firebaseio.com/apps/examples/",o=new t(r),a=n.instanceId||i.query["altspace-sync-instance"],s=n.spaceId||i.query["altspace-sync-space"],u=n.userId||i.query["altspace-sync-user"];if(!n.appId||!n.authorId)throw new Error("Both the appId and authorId must be provided to connect.");var l=[];Et&&(s||l.unshift(altspace.getSpace()),u||l.unshift(altspace.getUser()));var f={},d=h(n.appId,n.authorId,_t);f.app=o.child(d).child("app");var p=f.app.child("instances");return a?(f.instance=p.child(a),Promise.all(l).then(function(t){Et&&(s||(s=t.pop().sid),u||(u=t.pop().userId)),s=c(s),u=c(u),a=c(a),f.space=s?f.app.child("spaces").child(s):null,f.user=u?f.app.child("users").child(u):null;var e=f;return e})):(f.instance=p.push(),a=f.instance.key(),i.query["altspace-sync-instance"]=a,window.location.href=i.toString(),Promise.reject(new Error("Sync instance id not found. Reloading app with new sync id.")))}function f(t,e,n){if(!(t&&t instanceof THREE.Scene))throw new TypeError("Requires THREE.Scene argument");if(!(e&&e instanceof THREE.Camera))throw new TypeError("Requires THREE.Camera argument");bt=t,yt=e;var i=n||{};vt=i.renderer&&i.renderer.domElement||window,vt.addEventListener("mousedown",d,!1),vt.addEventListener("mouseup",p,!1),vt.addEventListener("mousemove",g,!1)}function d(t){var e=y(t);if(e&&e.point){var n=b("cursordown",e);e.object.dispatchEvent(n)}}function p(t){var e=y(t),n=b("cursorup",e);e?e.object.dispatchEvent(n):bt.dispatchEvent(n)}function g(t){var e=y(t),n=b("cursormove",e);bt.dispatchEvent(n);var i=e?e.object:null;mt!=i&&(mt&&(n=b("cursorleave",e),mt.dispatchEvent(n)),i&&(n=b("cursorenter",e),i.dispatchEvent(n)),mt=i)}function b(t,e){return{type:t,bubbles:!0,target:e?e.object:null,ray:{origin:St.ray.origin.clone(),direction:St.ray.direction.clone()},point:e?e.point.clone():null}}function y(t){var e=new THREE.Vector2;e.x=t.offsetX/(vt.width||vt.innerWidth)*2-1,e.y=2*-(t.offsetY/(vt.height||vt.innerHeight))+1,St.setFromCamera(e,yt);var n=St.intersectObjects(bt.children,!0);return n.find(function(t){return!t.object.userData||!t.object.userData.altspace||!t.object.userData.altspace.collider||t.object.userData.altspace.collider.enabled!==!1})||null}function v(t){var e=t||{};kt=e.TRACE||!1,e.crossOrigin&&(Rt=e.crossOrigin),e.baseUrl&&(Tt=e.baseUrl),"/"!==Tt.slice(-1)&&(Tt+="/"),At=new altspace.utilities.shims.OBJMTLLoader,At.crossOrigin=Rt,kt&&console.log("MultiLoader initialized with params",t)}function m(t,e){var n=t,i=Date.now();if(!(n&&n instanceof xt))throw new Error("MultiLoader.load expects first arg of type LoadRequest");if(!e||"function"!=typeof e)throw new Error("MultiLoader.load expects second arg of type function");if(!n.objUrls||!n.mtlUrls||n.objUrls.length!==n.mtlUrls.length)throw new Error("MultiLoader.load called with bad LoadRequest");var r=n.objUrls.length;kt&&console.log("Loading models...");for(var o=0;r>o;o++){var a=function(t,n){var o=Tt+t.objUrls[n],a=Tt+t.mtlUrls[n];kt&&console.log("Loading obj:"+o+", mtl:"+a),At.load(o,a,function(o){if(t.objects[n]=o,t.objectsLoaded++,t.objectsLoaded===r){var a=((Date.now()-i)/1e3).toFixed(2);kt&&console.log("Loaded "+r+" models in "+a+" seconds"),e()}},w,function(){var e=xhr.target.responseURL||"";t.error="Error loading file "+e})};a(n,o)}}function w(t){if(t.lengthComputable&&t.target.responseURL){var e=t.loaded/t.total*100,n=t.target.responseURL.split("/").pop();kt&&console.log("..."+n+" "+Math.round(e,2)+"% downloaded")}}function E(){console.log("In a tile: "+Mt),console.log("In VR: "+Dt)}function _(){if(!Mt&&Dt);else{var t=document.createElement("style");t.type="text/css",t.innerHTML="@import url(https://fonts.googleapis.com/css?family=Open+Sans:800);.altspace-info{text-align:center;font-family:'Open Sans',sans-serif;line-height:.5}.altspace-vr-notice{color:rgba(0,0,0,.7);font-size:5vw}.altspace-pen-name{font-size:7vw}",document.head.appendChild(t),document.body.style.background=n.make_color({seed:F()});var e=document.createElement("div");e.className="altspace-info",document.body.appendChild(e);var i=document.createElement("span");if(i.className="altspace-pen-name",i.innerHTML="

"+It.toUpperCase()+"

",e.appendChild(i),Mt){var r="VR mode does not support preview tiles. Stopping code execution.";throw console.log("ERROR: "+r),new Error(r)}if(!Dt){var o=document.createElement("span");o.className="altspace-vr-notice",o.innerHTML="

View

",e.insertBefore(o,i);var a=document.createElement("span");a.className="altspace-vr-notice",a.innerHTML='

in AltspaceVR

',e.appendChild(a);var r="Not in VR mode. Stopping code execution.";throw Mt&&console.log("ERROR: "+r),new Error(r)}}}function j(t){It=t}function S(){var t=document.querySelector("link[rel=canonical]"),n=t?t.href:window.location.href;return new e(n)}function F(){var t=S(),e=t.path.split("/"),n=e[e.length-1];return n}function O(){var t=S(),e=t.path.split("/"),n="team"==e[1],i=n?"team-"+e[2]:e[1];return i}function C(t){var e,n,i=this;if(t.bubbles&&(t.currentTarget=this,t.stopPropagation=function(){e=!0},t.stopImmediatePropagation=function(){n=!0}),this._listeners){var r=this._listeners,o=r[t.type];if(o){t.target=t.target||this;for(var a=[],s=o.length,c=0;s>c;c++)a[c]=o[c];for(var c=0;s>c;c++)if(a[c].call(i,t),n)return}}t.bubbles&&this.parent&&this.parent.dispatchEvent&&!e&&C.call(this.parent,t)}function A(t){t.updateMatrixWorld();var e=new THREE.Vector3;return e.setFromMatrixPosition(t.matrixWorld),e}function k(t){return new Promise(function(e,n){var i=null;return t.traverse(function(t){return"TrackingSkeleton"===t.type?void(i=t):void 0}),i?e(i):void altspace.getThreeJSTrackingSkeleton().then(function(n){return i=n,t.add(i),e(i)})})}function T(t,e){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length)return t.every(function(n,i){return T(t[i],e[i])});if(t instanceof Object&&e instanceof Object&&T(Object.keys(t).sort(),Object.keys(e).sort())){for(var n in t)if(!T(t[n],e[n]))return!1;return!0}return!1}function R(){fe.forEach(function(t){return t.autoSend()})}function x(t,e){var n=function(i,r){var o=altspace.getGamepads().find(function(e){return"steamvr"===e.mapping&&e.hand===t});o?(e.logging&&console.log("SteamVR input device found",o),i(o)):(e.logging&&console.log("SteamVR input device not found trying again in 500ms..."),setTimeout(n,500,i,r))};return new Promise(n)}t=t&&t.hasOwnProperty("default")?t["default"]:t,e=e&&e.hasOwnProperty("default")?e["default"]:e,n=n&&n.hasOwnProperty("default")?n["default"]:n;var L=function(){},I={schema:{}};I.schema.get=function(){return null},L.prototype.init=function(){},L.prototype.tick=function(t,e){},L.prototype.pause=function(){},L.prototype.play=function(){},Object.defineProperties(L.prototype,I);var M=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(t){},e.prototype.remove=function(){},e.prototype.updateSchema=function(t){},e}(L),D=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{enabled:{type:"boolean","default":!0}}},e.prototype.init=function(){var t=this;this.setColliderFlag(this.data.enabled),this.el.addEventListener("model-loaded",function(){t.setColliderFlag(t.data.enabled)}.bind(this))},e.prototype.update=function(){this.setColliderFlag(this.data.enabled)},e.prototype.setColliderFlag=function(t){var e=this.el.object3D;e&&(a(e.userData,["altspace","collider","enabled"],t),e.traverse(function(e){e instanceof THREE.Mesh&&a(e.userData,["altspace","collider","enabled"],t)}))},Object.defineProperties(e.prototype,n),e}(M),P=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(){this.gamepadIndex=null,this.trackedControlsSystem=document.querySelector("a-scene").systems["tracked-controls"],this.systemGamepads=0,altspace.getGamepads()},e.prototype.tick=function(){if(this.trackedControlsSystem&&this.systemGamepads!==this.trackedControlsSystem.controllers.length&&window.altspace&&altspace.getGamepads&&altspace.getGamepads().length){var t=this.el.components;t["paint-controls"]&&(this.gamepadIndex="left"===t["paint-controls"].data.hand?2:1),null===this.gamepadIndex&&t["hand-controls"]&&(this.gamepadIndex="left"===t["hand-controls"].data?2:1),null===this.gamepadIndex&&t["vive-controls"]&&(this.gamepadIndex="left"===t["vive-controls"].data.hand?2:1),null===this.gamepadIndex&&t["tracked-controls"]&&(this.gamepadIndex=t["tracked-controls"].data.controller),this.el.setAttribute("tracked-controls","id",altspace.getGamepads()[this.gamepadIndex].id),this.el.setAttribute("tracked-controls","controller",0),this.systemGamepads=this.trackedControlsSystem.controllers.length}},e}(M),U=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{usePixelScale:{type:"boolean","default":!1},verticalAlign:{type:"string","default":"middle"},enclosuresOnly:{type:"boolean","default":!0},fullspace:{type:"boolean","default":!1}}},e.prototype.init=function(){return this.version="AFRAME_ALTSPACE_VERSION",this.el.object3D instanceof THREE.Scene?void(window.altspace&&window.altspace.inClient?(this.el.setAttribute("vr-mode-ui",{enabled:!1}),this.initRenderer(),this.initCursorEvents(),this.initCollisionEvents()):console.warn("aframe-altspace-component only works inside of AltspaceVR")):void console.warn("aframe-altspace-component can only be attached to a-scene")},e.prototype.tick=function(t,e){this.el.object3D.updateAllBehaviors&&this.el.object3D.updateAllBehaviors()},e.prototype.initRenderer=function(){var t=this,e=this.el.object3D,n=this.el.sceneEl,i=n.getAttribute("scale")||{x:1,y:1,z:1};altspace.getEnclosure().then(function(n){switch(t.data.fullspace&&(n.fullspace&&a(e.userData,["altspace","initialized"],!0),n.requestFullspace(),n.addEventListener("fullspacechange",function(){e.scale.copy(i).multiplyScalar(n.pixelsPerMeter),a(e.userData,["altspace","initialized"],!0)})),(!t.data.usePixelScale||t.data.fullspace)&&e.scale.copy(i).multiplyScalar(n.pixelsPerMeter),t.data.verticalAlign){case"bottom":e.position.y-=n.innerHeight/2;break;case"top":e.position.y+=n.innerHeight/2;break;case"middle":break;default:console.warn("Unexpected value for verticalAlign: ",t.data.verticalAlign)}t.data.enclosuresOnly&&1===n.innerDepth&&(t.el.renderer.render(new THREE.Scene),t.el.renderer=t.el.effect=r),t.data.fullspace||a(e.userData,["altspace","initialized"],!0)}.bind(this));var r=this.el.renderer,o=this.el.renderer=this.el.effect=altspace.getThreeJSRenderer({aframeComponentVersion:this.version}),s=function(){};o.setSize=s,o.setPixelRatio=s,o.setClearColor=s,o.clear=s,o.enableScissorTest=s,o.setScissor=s,o.setViewport=s,o.getPixelRatio=s,o.getMaxAnisotropy=s,o.setFaceCulling=s,o.submitFrame=s,o.context={canvas:{}},o.shadowMap={},o.requestAnimationFrame=window.requestAnimationFrame},e.prototype.initCursorEvents=function(){function t(t,e){var i=e.target.el;n&&n.emit(t,{target:i,ray:e.ray,point:e.point}),i&&i.emit(t,{target:i,ray:e.ray,point:e.point})}var e=this.el.object3D,n=document.querySelector("a-cursor")||document.querySelector("a-entity[cursor]");n&&(n.setAttribute("material","transparent",!0),n.setAttribute("material","opacity",0));var i=null;e.addEventListener("cursordown",function(e){i=e.target,t("mousedown",e)}),e.addEventListener("cursorup",function(e){t("mouseup",e),e.target.uuid===i.uuid&&t("click",e),i=null}),e.addEventListener("cursorenter",function(e){e.target.el&&(e.target.el.addState("hovered"),n&&n.addState("hovering"),t("mouseenter",e))}),e.addEventListener("cursorleave",function(e){e.target.el&&(e.target.el.removeState("hovered"),n&&n.removeState("hovering"),t("mouseleave",e))})},e.prototype.initCollisionEvents=function(){function t(t,e){var n=e.target.el;n&&(e.target=n,e.other&&e.other.el&&(e.other=e.other.el),n.emit(t,e))}var e=this.el.object3D;e.addEventListener("collisionenter",function(e){t("collisionenter",e)}),e.addEventListener("collisionexit",function(e){t("collisionexit",e)}),e.addEventListener("triggerenter",function(e){t("triggerenter",e)}),e.addEventListener("triggerexit",function(e){t("triggerexit",e)})},Object.defineProperties(e.prototype,n),e}(M),N=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={dependencies:{}};return n.dependencies.get=function(){return["sync"]},e.prototype.init=function(){this.sync=this.el.components.sync,this.sync.isConnected?start():this.el.addEventListener("connected",this.start.bind(this))},e.prototype.start=function(){var t=this.sync.dataRef.child("material/color"),e=!1,n=!0,i=this;this.el.addEventListener("componentchanged",function(n){var r=n.detail.name,o=n.detail.oldData,a=n.detail.newData;"material"===r&&!e&&o.color!==a.color&&i.sync.isMine&&setTimeout(function(){return t.set(a.color)},0)}),t.on("value",function(t){if(!i.sync.isMine||n){var r=t.val();e=!0,i.el.setAttribute("material","color",r),e=!1,n=!1}})},Object.defineProperties(e.prototype,n),e}(M),B=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{mode:{"default":"link"},ownOn:{type:"string"}}},e.prototype.init=function(){var t=this;if(this.isMine=!1,this.scene=this.el.sceneEl,this.syncSys=this.scene.systems["sync-system"],this.isConnected=!1,this.syncSys.isConnected?this.start():this.scene.addEventListener("connected",this.start.bind(this)),this.data.ownOn){var e=this.data.ownOn.split(/[ ,]+/);e.forEach(function(e){t.el.addEventListener(e,function(){t.isConnected&&t.takeOwnership()}.bind(t))}.bind(this))}},e.prototype.takeOwnership=function(){this.ownerRef.set(this.syncSys.clientId),this.ownerRef.onDisconnect().set(null)},e.prototype.start=function(){var t=this;if(this.scene.addEventListener("clientleft",function(e){var n=(!t.ownerId||t.ownerId===e.detail.id)&&t.syncSys.isMasterClient;n&&t.takeOwnership()}.bind(this)),"link"!==this.data.mode)return void console.error("Unsupported sync mode: "+this.data.mode);var e=this.el.id;return e?(this.link(this.syncSys.sceneRef.child(e)),this.setupReceive(),this.isConnected=!0,void this.el.emit("connected",null,!1)):void console.error("Entities cannot be synced using link mode without an id.")},e.prototype.link=function(t){this.ref=t,this.key=this.ref.key(),this.dataRef=this.ref.child("data"),this.ownerRef=this.ref.child("owner")},e.prototype.setupReceive=function(){function t(t){var e=t.val(),n=e===this.syncSys.clientId&&!this.isMine;n&&this.el.emit("ownershipgained",null,!1);var i=e!==this.syncSys.clientId;i&&(this.el.emit("ownershiplost",null,!1),this.ownerRef.onDisconnect().cancel()),this.ownerId=e,this.isMine=e===this.syncSys.clientId}var e=this;this.ownerRef.transaction(function(t){return t?void 0:e.syncSys.clientId}.bind(this),function(n,i){i&&e.ownerRef.onDisconnect().set(null),e.ownerRef.on("value",t.bind(e))}.bind(this))},Object.defineProperties(e.prototype,n),e}(M),H=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{author:{type:"string"},app:{type:"string"},instance:{type:"string"},refUrl:{type:"string"}}},e.prototype.init=function(){return this.data&&this.data.app?(console.log(this.data),this.clientId=this.sceneEl.object3D.uuid,this.masterClientId=null,this.queuedInstantiations=[],this.isConnected=!1,void Promise.all([altspace.utilities.sync.connect({authorId:this.data.author,appId:this.data.app,instanceId:this.data.instance,baseRefUrl:this.data.refUrl}),altspace.getUser()]).then(this.connected.bind(this))):void console.warn("The sync-system must be present on the scene and configured with required data."); },e.prototype.connected=function(t){this.connection=t.shift(),this.userInfo=t.shift(),this.sceneRef=this.connection.instance.child("scene"),this.clientsRef=this.connection.instance.child("clients"),this.instantiatedElementsRef=this.connection.instance.child("instantiatedElements"),this.instantiatedElementsRef.on("child_added",this.listenToInstantiationGroup.bind(this)),this.instantiatedElementsRef.on("child_removed",this.stopListeningToInstantiationGroup.bind(this));var e=this;this.clientsRef.on("value",function(t){var n=t.val(),i=Object.keys(n)[0];e.masterClientId=n[i]}),this.clientsRef.on("child_added",function(t){var n=t.val();setTimeout(function(){e.sceneEl.emit("clientjoined",{id:n},!1)},0)}),this.clientsRef.on("child_removed",function(t){var n=t.val();setTimeout(function(){e.sceneEl.emit("clientleft",{id:n},!1)},0)}),this.clientsRef.push(this.clientId).onDisconnect().remove(),this.connection.instance.child("initialized").once("value",function(t){var n=!t.val();t.ref().set(!0),e.processQueuedInstantiations(),e.sceneEl.emit("connected",{shouldInitialize:n},!1),e.isConnected=!0})},e.prototype.isMasterClient=function(){return this.masterClientId===this.clientId},e.prototype.listenToInstantiationGroup=function(t){t.ref().on("child_added",this.createElement.bind(this)),t.ref().on("child_removed",this.removeElement.bind(this))},e.prototype.stopListeningToInstantiationGroup=function(t){t.ref().off("child_added"),t.ref().off("child_removed")},e.prototype.processQueuedInstantiations=function(){var t=this;this.queuedInstantiations.forEach(function(e){e.creatorUserId=t.userInfo.userId,e.clientId=t.clientId,t.instantiatedElementsRef.child(e.groupName).push(e).onDisconnect().remove()}.bind(this)),this.queuedInstantiations.length=0},e.prototype.instantiate=function(t,e,n,i,r){if(!t)return void console.error("AltspaceVR: Instantiation requires a mixin value.",n);var o=e&&e.id,a="A-SCENE"===e.nodeName;if(!o&&!a)return void console.error("AltspaceVR: Instantiation requires a parent with an id.",n);var s=o?"#"+e.id:"a-scene",c={instantiatorId:r||"",groupName:i||"main",mixin:t,parent:s};this.queuedInstantiations.push(c),this.isConnected&&this.processQueuedInstantiations()},e.prototype.removeLast=function(t){var e=this;return new Promise(function(n){e.instantiatedElementsRef.child(t).orderByKey().limitToLast(1).once("value",function(t){if(!t.hasChildren())return void n();var e=t.val(),i=Object.keys(e)[0];n(e[i].instantiatorId),t.ref().child(i).remove()})}.bind(this))},e.prototype.createElement=function(t){var e=t.val(),n=t.key(),i=document.createElement("a-entity");i.id=e.groupName+"-instance-"+n,document.querySelector(e.parent).appendChild(i),i.setAttribute("mixin",e.mixin),i.dataset.creatorUserId=e.creatorUserId,this.userInfo.userId===e.creatorUserId&&i.classList.add("mine")},e.prototype.removeElement=function(t){var e=t.val(),n=t.key(),i=e.groupName+"-instance-"+n,r=document.querySelector("#"+i);r.parentNode.removeChild(r)},Object.defineProperties(e.prototype,n),e}(L),q=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={dependencies:{}};return n.dependencies.get=function(){return["sync"]},e.prototype.init=function(){this.sync=this.el.components.sync,this.sync.isConnected?start():this.el.addEventListener("connected",this.start.bind(this))},e.prototype.start=function(){function t(t,e){if(!n.isMine){var r=t.val();r&&i.el.setAttribute(e,r)}}function e(t){if(n.isMine){var e=t.detail.name,i=t.detail.newData;"position"===e?u(i):"rotation"===e?h(i):"scale"===e&&l(i)}}var n=this.sync,i=this,r=n.dataRef.child("position"),o=n.dataRef.child("rotation"),a=n.dataRef.child("scale");i.updateRate=100;var c=[];i.el.addEventListener("ownershiplost",function(){Array.from(i.el.children).forEach(function(t){var e=t.tagName.toLowerCase();"a-animation"===e&&(c.push(t),t.stop())})}),i.el.addEventListener("ownershipgained",function(){c.forEach(function(t){return t.start()}),c=[]}),r.on("value",function(e){return t(e,"position")}),o.on("value",function(e){return t(e,"rotation")}),a.on("value",function(e){return t(e,"scale")});var u=s(function(t){r.set(t)},i.updateRate),h=s(function(t){o.set(t)},i.updateRate),l=s(function(t){a.set(t)},i.updateRate);i.el.addEventListener("componentchanged",e)},Object.defineProperties(e.prototype,n),e}(M),W=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={dependencies:{}};return n.dependencies.get=function(){return["sync"]},e.prototype.init=function(){this.sync=this.el.components.sync,this.scene=this.el.sceneEl,this.syncSys=this.scene.systems["sync-system"],this.soundStateRef=null,this.soundEventRef=null,this.sync.isConnected?this.start():this.el.addEventListener("connected",this.start.bind(this))},e.prototype.remove=function(){this.soundStateRef.off("value"),this.soundEventRef.off("value")},e.prototype.start=function(){function t(t){if(this.sync.isMine){var t={type:t.type,sender:this.syncSys.clientId,el:this.el.id,time:Firebase.ServerValue.TIMESTAMP};this.soundEventRef.set(t)}}var e=this;this.soundStateRef=this.sync.dataRef.child("sound/state"),this.soundEventRef=this.sync.dataRef.child("sound/event"),this.el.addEventListener("sound-played",t.bind(this)),this.el.addEventListener("sound-paused",t.bind(this)),this.soundEventRef.once("value",function(t){var n=t.val();e.soundEventRef.on("value",function(t){var i=t.val();if(!(!i||n&&i.time===n.time||e.sync.isMine)&&i.el===e.el.id){var r=e.el.components["n-sound"];"sound-played"===i.type?r.playSound():r.pauseSound()}})}),this.el.addEventListener("componentchanged",function(t){if(e.sync.isMine){var n=t.detail.name;"n-sound"===n&&e.soundStateRef.set(t.detail.newData)}}),this.soundStateRef.on("value",function(t){if(!e.sync.isMine){var n=t.val();n&&e.el.setAttribute("n-sound",n)}})},Object.defineProperties(e.prototype,n),e}(M),V=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={dependencies:{}};return n.dependencies.get=function(){return["sync"]},e.prototype.init=function(){var t=this.el.sceneEl;this.syncSys=t.systems["sync-system"],this.sync=this.el.components.sync,this.syncSys.isConnected?this._start():t.addEventListener("connected",this._start.bind(this))},e.prototype.getDataRef=function(t){return this.sync.dataRef.child("n-skeleton-parent/"+t)},e.prototype._start=function(){this.attributeRef=this.sync.dataRef.child("n-skeleton-parent"),this.attributeRef.on("value",function(t){var e=t.val();e&&this.el.setAttribute("n-skeleton-parent",e)}.bind(this)),this.el.dataset.creatorUserId&&this.attributeRef.set(Object.assign({},this.el.components["n-skeleton-parent"].data,{userId:this.el.dataset.creatorUserId})),this.el.addEventListener("componentchanged",function(t){if(this.sync.isMine){var e=t.detail.name;"n-skeleton-parent"===e&&this.attributeRef.set(t.detail.newData)}}.bind(this))},Object.defineProperties(e.prototype,n),e}(M),G=function(t){function e(){t.call(this),this.multiple=!0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{on:{type:"string"},emit:{type:"string"},gained:{type:"string"},lost:{type:"string"},gain:{type:"string"},lose:{type:"string"},targets:{type:"selectorAll"},target:{type:"selector"}}},e.prototype.init=function(){this.actOnTargets=function(){function t(t){this.data.emit&&t.emit(this.data.emit),this.data.gain&&t.addState(this.data.gain),this.data.lose&&t.removeState(this.data.lose)}this.updateProperties(this.attrValue),this.data.targets&&this.data.targets.forEach(t.bind(this)),this.data.target&&t.call(this,this.data.target),this.data.targets||this.data.target||t.call(this,this.el)}.bind(this),this.actOnTargetsIfStateMatches=function(t){var e=t.detail.state;(e===this.data.gained||e===this.data.lost)&&this.actOnTargets()}.bind(this)},e.prototype.update=function(t){t.on&&this.el.removeEventListener(t.on,this.actOnTargets),t.gained&&this.el.removeEventListener("stateadded",this.actOnTargetsIfStateMatches),t.lost&&this.el.removeEventListener("stateremoved",this.actOnTargetsIfStateMatches),this.data.on&&this.el.addEventListener(this.data.on,this.actOnTargets),this.data.gained&&this.el.addEventListener("stateadded",this.actOnTargetsIfStateMatches),this.data.lost&&this.el.addEventListener("stateremoved",this.actOnTargetsIfStateMatches)},e.prototype.remove=function(){this.el.removeEventListener(this.data.on,this.actOnTargets),this.el.removeEventListener("stateadded",this.actOnTargetsIfStateMatches),this.el.removeEventListener("stateremoved",this.actOnTargetsIfStateMatches)},Object.defineProperties(e.prototype,n),e}(M),K=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{mixin:{type:"string"},parent:{type:"selector"}}},e.prototype.init=function(){var t=this.el.sceneEl;this.syncSys=t.systems["sync-system"],this.syncSys.instantiate(this.data.mixin,this.data.parent||this.el.parentNode,this.el)},Object.defineProperties(e.prototype,n),e}(M),Q=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{on:{type:"string"},mixin:{type:"string"},parent:{type:"selector","default":"a-scene"},group:{type:"string","default":"main"},removeLast:{type:"boolean","default":!0}}},e.prototype.init=function(){this.onHandler=this.instantiateOrToggle.bind(this),this.el.addEventListener(this.data.on,this.onHandler),this.syncSys=this.el.sceneEl.systems["sync-system"]},e.prototype.instantiateOrToggle=function(){var t=this.data.group+"-"+this.syncSys.userInfo.userId;this.data.removeLast?this.syncSys.removeLast(t).then(function(e){e!==this.el.id&&this.syncSys.instantiate(this.data.mixin,this.data.parent,this.el,t,this.el.id)}.bind(this)):this.syncSys.instantiate(this.el.id,t,this.data.mixin,this.data.parent)},e.prototype.remove=function(){this.el.removeEventListener(this.data.on,this.onHandler)},Object.defineProperties(e.prototype,n),e}(M);if(!window.altspace||!altspace.inClient){var z=function(){};a(window,["altspace","addNativeComponent"],z),a(window,["altspace","updateNativeComponent"],z),a(window,["altspace","removeNativeComponent"],z)}var Y=new THREE.BoxGeometry(.001,.001,.001),X=new THREE.MeshBasicMaterial({color:0});X.visible=!1;var J=function(t){function e(){t.call(this,Y,X)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(THREE.Mesh),$=function(t){function e(e,n){void 0===n&&(n=!0),t.call(this),Object.assign(this,{name:e,sendUpdates:n})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(){var t=this,e=this.mesh||this.el.getOrCreateObject3D("mesh",J);this.currentMesh=e,a(e.userData,["altspace","collider","enabled"],!1),altspace.addNativeComponent(e,this.name),this.update(),this.mesh||this._dontRebind||this.el.addEventListener("object3dset",function(e){"mesh"===e.detail.type&&(altspace.removeNativeComponent(t.currentMesh,t.name),t._dontRebind=!0,t.init())}.bind(this))},e.prototype.update=function(){var t=this.mesh||this.el.object3DMap.mesh;this.sendUpdates&&altspace.updateNativeComponent(t,this.name,this.data)},e.prototype.remove=function(){var t=this.mesh||this.el.object3DMap.mesh;altspace.removeNativeComponent(t,this.name)},e.prototype.callComponent=function(t){for(var e=[],n=arguments.length-1;n-->0;)e[n]=arguments[n+1];var i=this.mesh||this.el.object3DMap.mesh;altspace.callNativeComponent(i,this.name,t,e)},e}(M),Z=function(t){function e(){t.call(this,"n-object")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{res:{type:"string"}}},Object.defineProperties(e.prototype,n),e}($),tt=function(t){function e(){t.call(this,"n-spawner")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{res:{type:"string"}}},Object.defineProperties(e.prototype,n),e}($),et=function(t){function e(){t.call(this,"n-billboard",!1)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}($),nt=function(t){function e(){t.call(this,"n-skeleton-parent")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{part:{type:"string"},side:{type:"string","default":"center"},index:{type:"int","default":0},userId:{type:"string"}}},Object.defineProperties(e.prototype,n),e}($),it=function(t){function e(){t.call(this,"n-cockpit-parent",!1)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}($),rt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{center:{type:"vec3"},type:{type:"string","default":"object"},isTrigger:{"default":!1,type:"boolean"}}},Object.defineProperties(e.prototype,n),e}($),ot=function(t){function e(){t.call(this,"n-sphere-collider")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{radius:{"default":1,type:"number"}}},Object.defineProperties(e.prototype,n),e}(rt),at=function(t){function e(){t.call(this,"n-box-collider")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{size:{type:"vec3","default":{x:1,y:1,z:1}}}},Object.defineProperties(e.prototype,n),e}(rt),st=function(t){function e(){t.call(this,"n-capsule-collider")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{radius:{"default":0,type:"number"},height:{"default":0,type:"number"},direction:{"default":"y"}}},Object.defineProperties(e.prototype,n),e}(rt),ct=function(t){function e(e,n){void 0===e&&(e=null),t.call(this,"n-mesh-collider"),this.mesh=e,this.subcomponents=[]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{convex:{type:"boolean","default":!0}}},e.prototype.init=function(){var n=this;if(this.mesh)t.prototype.init.call(this);else{this.subcomponents=[];var i=this.el.object3D;i.traverse(function(t){if(t instanceof THREE.Mesh){var i=new e(t);n.subcomponents.push(i),i.data=n.data,i.init()}}.bind(this)),this.el.addEventListener("model-loaded",this.init.bind(this))}},e.prototype.update=function(e){var n=this;this.mesh?t.prototype.update.call(this,e):this.subcomponents.forEach(function(t){t.data=n.data,t.update(e)}.bind(this))},e.prototype.remove=function(){this.mesh?t.prototype.remove.call(this):this.subcomponents.forEach(function(t){t.remove()}.bind(this))},Object.defineProperties(e.prototype,n),e}(rt),ut=function(t){function e(){t.call(this,"n-container")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{capacity:{"default":4,type:"number"}}},e.prototype.init=function(){t.prototype.init.call(this);var e=this.el,n=this;e.addEventListener("stateadded",function(t){"container-full"===t.detail.state&&e.emit("container-full"),"container-empty"===t.detail.state&&e.emit("container-empty")}),e.addEventListener("container-count-changed",function(t){n.count=t.detail.count})},Object.defineProperties(e.prototype,n),e}($),ht=function(t){function e(){t.call(this,"n-portal")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{targetSpace:{type:"string"},targetEvent:{type:"string"},targetEntity:{type:"selector"}}},e.prototype.update=function(){var t,e,n=this.el.object3DMap.mesh;if(this.data.targetEntity){this.el.sceneEl.object3D.updateMatrixWorld(!0),t=this.data.targetEntity.object3D.getWorldPosition();var i=this.data.targetEntity.object3D.getWorldQuaternion();e={x:i.x,y:i.y,z:i.z,w:i.w}}var r={targetSpace:this.data.targetSpace,targetEvent:this.data.targetEvent,targetPosition:t,targetQuaternion:e};altspace.updateNativeComponent(n,this.name,r)},Object.defineProperties(e.prototype,n),e}($);!function(){String.prototype.codePointAt||!function(){var t=function(){try{var t={},e=Object.defineProperty,n=e(t,t,t)&&e}catch(t){}return n}(),e=function(t){if(null==this)throw TypeError();var e=this+"",n=e.length,i=t?+t:0;if(i!=i&&(i=0),!(0>i||i>=n)){var r,o=e.charCodeAt(i);return o>=55296&&56319>=o&&n>i+1&&(r=e.charCodeAt(i+1),r>=56320&&57343>=r)?1024*(o-55296)+r-56320+65536:o}};t?t(String.prototype,"codePointAt",{value:e,configurable:!0,writable:!0}):String.prototype.codePointAt=e}(),String.prototype.repeat||!function(){var t=function(){try{var t={},e=Object.defineProperty,n=e(t,t,t)&&e}catch(t){}return n}(),e=function(t){if(null==this)throw TypeError();var e=this+"",n=t?+t:0;if(n!=n&&(n=0),0>n||n==1/0)throw RangeError();for(var i="";n;)n%2==1&&(i+=e),n>1&&(e+=e),n>>=1;return i};t?t(String.prototype,"repeat",{value:e,configurable:!0,writable:!0}):String.prototype.repeat=e}(),String.prototype.includes||!function(){var t={}.toString,e=function(){try{var t={},e=Object.defineProperty,n=e(t,t,t)&&e}catch(t){}return n}(),n="".indexOf,i=function(e){if(null==this)throw TypeError();var i=this+"";if(e&&"[object RegExp]"==t.call(e))throw TypeError();var r=i.length,o=e+"",a=o.length,s=arguments.length>1?arguments[1]:void 0,c=s?+s:0;return c!=c&&(c=0),!(a+Math.min(Math.max(c,0),r)>r)&&-1!=n.call(i,o,c)};e?e(String.prototype,"includes",{value:i,configurable:!0,writable:!0}):String.prototype.includes=i}(),String.prototype.startsWith||!function(){var t=function(){try{var t={},e=Object.defineProperty,n=e(t,t,t)&&e}catch(t){}return n}(),e={}.toString,n=function(t){if(null==this)throw TypeError();var n=this+"";if(t&&"[object RegExp]"==e.call(t))throw TypeError();var i=n.length,r=t+"",o=r.length,a=arguments.length>1?arguments[1]:void 0,s=a?+a:0;s!=s&&(s=0);var c=Math.min(Math.max(s,0),i);if(o+c>i)return!1;for(var u=-1;++u1){var s=arguments[1];void 0!==s&&(a=s?+s:0,a!=a&&(a=0))}var c=Math.min(Math.max(a,0),i),u=c-o;if(0>u)return!1;for(var h=-1;++hl||l>1114111||n(l)!=l)throw RangeError("Invalid code point: "+l);65535>=l?s.push(l):(l-=65536,i=(l>>10)+55296,r=l%1024+56320,s.push(i,r)),(c+1==u||s.length>a)&&(h+=e.apply(null,s),s.length=0)}return h};t?t(String,"fromCodePoint",{value:i,configurable:!0,writable:!0}):String.fromCodePoint=i}(),Object.defineProperty(String,"raw",{configurable:!0,enumerable:!1,writable:!0,value:function(t,e){var n;t=null!=t?t:{},e=arguments.length>1?i(arguments).slice(1):[];try{n=i(t.raw)}catch(i){throw new TypeError("Cannot convert undefined or null to object")}return n.map(function(n,i){return t.raw.length<=i?n:null!=e[i-1]?e[i-1]+n:n}).join("")}})}();var lt=function(t){function e(){t.call(this,"n-sound")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{res:{type:"string"},src:{type:"string"},on:{type:"string"},loop:{type:"boolean"},volume:{type:"number","default":1},autoplay:{type:"boolean"},oneshot:{type:"boolean"},spatialBlend:{type:"float","default":1},pitch:{type:"float","default":1},minDistance:{type:"float","default":1},maxDistance:{type:"float","default":12},rolloff:{type:"string","default":"logarithmic"}}},e.prototype.init=function(){var e=this.data.src;if(e&&!e.startsWith("http"))if(e.startsWith("/"))this.data.src=location.origin+e;else{var n=location.pathname;n.endsWith("/")||(n=location.pathname.split("/").slice(0,-1).join("/")+"/"),this.data.src=location.origin+n+e}t.prototype.init.call(this)},e.prototype.update=function(e){t.prototype.update.call(this,e),this.playHandler&&this.el.removeEventListener(e.on,this.playHandler),this.data.on&&(this.playHandler=this.playSound.bind(this),this.el.addEventListener(this.data.on,this.playHandler))},e.prototype.remove=function(){t.prototype.remove.call(this),this.playHandler&&this.el.removeEventListener(this.data.on,this.playHandler)},e.prototype.pauseSound=function(){this.callComponent("pause"),this.el.emit("sound-paused")},e.prototype.playSound=function(){this.callComponent("play"),this.el.emit("sound-played")},e.prototype.seek=function(t){this.callComponent("seek",{time:t})},Object.defineProperties(e.prototype,n),e}($),ft=function(t){function e(){t.call(this,"n-layout-browser")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{url:{"default":"about:blank"},isEnclosure:{"default":!1}}},Object.defineProperties(e.prototype,n),e}($),dt=function(t){function e(){t.call(this,"n-text")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{text:{"default":"",type:"string"},fontSize:{"default":10,type:"int"},width:{"default":10,type:"number"},height:{"default":1,type:"number"},horizontalAlign:{"default":"middle"},verticalAlign:{"default":"middle"}}},Object.defineProperties(e.prototype,n),e}($),pt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(){function t(e){return e.isMesh?e:0===e.children.length?null:e.children.reduce(function(e,n){return e||t(n)},null)}var e=this;this.el.addEventListener("model-loaded",function(){e.el.setObject3D("mesh",t(e.el.object3DMap.mesh))})},e}(M);delete AFRAME.components.visible;var gt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={schema:{}};return n.schema.get=function(){return{"default":!0}},e.prototype.init=function(){this.el.addEventListener("model-loaded",this.update.bind(this))},e.prototype.update=function(){var t=this;this.el.object3D.traverse(function(e){return e.visible=t.data})},Object.defineProperties(e.prototype,n),e}(M);window.AFRAME&&(r("altspace-cursor-collider",D),r("altspace-tracked-controls",P),r("altspace",U),o("sync-system",H),r("sync-color",N),r("sync-transform",q),r("sync",B),r("sync-n-sound",W),r("sync-n-skeleton-parent",V),r("wire",G),r("one-per-user",K),r("instantiator",Q),r("n-object",Z),r("n-portal",ht),r("n-spawner",tt),r("n-text",dt),r("n-billboard",et),r("n-skeleton-parent",nt),r("n-cockpit-parent",it),r("n-container",ut),r("n-sound",lt),r("n-sphere-collider",ot),r("n-box-collider",at),r("n-capsule-collider",st),r("n-mesh-collider",ct),r("n-layout-browser",ft),r("collapse-model",pt),r("visible",gt));var bt,yt,vt,mt,wt=Object.freeze({AltspaceComponent:U,AltspaceCursorCollider:D,AltspaceTrackedControls:P,SyncSystem:H,SyncComponent:B,SyncColor:N,SyncTransform:q,SyncNSound:W,Wire:G,OnePerUser:K,Instantiator:Q,SyncNSkeletonParent:V,NObject:Z,NPortal:ht,NSpawner:tt,NText:dt,NBillboard:et,NSkeletonParent:nt,NCockpitParent:it,NContainer:ut,NSound:lt,NSphereCollider:ot,NBoxCollider:at,NCapsuleCollider:st,NMeshCollider:ct,NLayoutBrowser:ft,CollapseModel:pt}),Et=altspace&&altspace.inClient,_t=u(),jt=Object.freeze({connect:l}),St=new THREE.Raycaster,Ft=Object.freeze({init:f}),Ot=function(t){void 0===t&&(t={auto:!0}),this._scene=null,this._renderer=null,this._camera=null;var e=window.AFRAME&&document.querySelector("a-scene");if(e){var n=document.querySelector("a-scene");this._scene=n.object3D,this._renderer=n.renderer;var i=document.querySelector("a-camera");i&&(this._camera=i.object3D)}else window.altspace&&altspace.inClient?(this._scene=new THREE.Scene,this._renderer=altspace.getThreeJSRenderer(),this._camera=new THREE.PerspectiveCamera):this._setupWebGL();t.auto&&!e&&this.loop()},Ct={scene:{},renderer:{},camera:{}};Ot.prototype._setupWebGL=function(){function t(){i.aspect=window.innerWidth/window.innerHeight,i.updateProjectionMatrix(),n.setSize(window.innerWidth,window.innerHeight)}var e=this._scene=new THREE.Scene,n=this._renderer=new THREE.WebGLRenderer({antialias:!0}),i=this._camera=new THREE.PerspectiveCamera;document.addEventListener("DOMContentLoaded",function(t){document.body.style.margin="0px",document.body.style.overflow="hidden",n.setClearColor("#035F72");var e=document.createElement("div");document.body.appendChild(e),e.appendChild(n.domElement)}),window.addEventListener("resize",t),t(),i.position.z=500,i.fov=45,i.near=1,i.far=2e3,e.add(i),e.add(new THREE.AmbientLight("white")),this.cursor=f(e,i)},Ot.prototype.loop=function(){window.requestAnimationFrame(this.loop.bind(this)),this.scene.updateAllBehaviors&&this.scene.updateAllBehaviors(),this.renderer.render(this.scene,this.camera)},Ct.scene.get=function(){return this._scene},Ct.renderer.get=function(){return this._renderer},Ct.camera.get=function(){return this._camera},Object.defineProperties(Ot.prototype,Ct);var At,kt,Tt="",Rt="",xt=function(){this.objUrls=[],this.mtlUrls=[],this.objects=[],this.error=null,this.objectsLoaded=0},Lt=Object.freeze({init:v,load:m,LoadRequest:xt}),It="VR CodePen",Mt=window.name&&"pen-"===window.name.slice(0,4),Dt=!!window.altspace.inClient,Pt=!!location.href.match("codepen.io/"),Ut=Object.freeze({inTile:Mt,inVR:Dt,inCodePen:Pt,ensureInVR:_,setName:j,getPenId:F,getAuthorId:O,printDebugInfo:E}),Nt=function(){};Nt.prototype.load=function(t,e,n){var i=new THREE.MTLLoader,r=e.split("/").slice(0,-1).join("/");i.setTexturePath(r+"/"),i.setCrossOrigin(this.crossOrigin),i.load(e,function(e){var i=new THREE.OBJLoader;i.setMaterials(e),i.load(t,n)})},THREE&&!altspace.inClient&&(THREE.EventDispatcher.prototype.dispatchEvent=C,THREE.Object3D.prototype.dispatchEvent=C),THREE.Scene.prototype.updateAllBehaviors=function(){var t=performance.now(),e=this.__lastNow||t,n=t-e,i=this,r=[];this.traverse(function(t){t.__behaviorList&&r.push(t)});for(var o=0,a=r.length;a>o;o++){var s=r[o];s.updateBehaviors(n,i)}this.__lastNow=t},THREE.Object3D.prototype.addBehavior=function(t){this.addBehaviors(t)},THREE.Object3D.prototype.addBehaviors=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];this.__behaviorList=this.__behaviorList||[],(n=this.__behaviorList).push.apply(n,t);var n},THREE.Object3D.prototype.removeBehavior=function(t){if(!this.__behaviorList||0===this.__behaviorList.length)return null;var e=this.__behaviorList.indexOf(t);if(-1!==e){this.__behaviorList.splice(e,1);try{t.dispose&&t.dispose.call(t,this)}catch(n){console.group(),(console.error||console.log).call(console,n.stack||n),console.log("[Behavior]"),console.log(t),console.log("[Object3D]"),console.log(this),console.groupEnd()}}},THREE.Object3D.prototype.removeAllBehaviors=function(){var t=this;if(!this.__behaviorList||0===this.__behaviorList.length)return null;for(var e=0,n=this.__behaviorList.length;n>e;e++){var i=t.__behaviorList[e];try{i.dispose&&i.dispose.call(i,t)}catch(r){console.group(),(console.error||console.log).call(console,r.stack||r),console.log("[Behavior]"),console.log(i),console.log("[Object3D]"),console.log(t),console.groupEnd()}}this.__behaviorList.length=0},THREE.Object3D.prototype.getBehaviorByType=function(t){var e=this;if(!this.__behaviorList||0===this.__behaviorList.length)return null;for(var n=0,i=this.__behaviorList.length;i>n;n++)if(e.__behaviorList[n].type===t)return e.__behaviorList[n]},THREE.Object3D.prototype.updateBehaviors=function(t,e){var n=this;if(this.__behaviorList&&0!==this.__behaviorList.length){for(var i=[],r=this.__behaviorList.slice(),o=0,a=this.__behaviorList.length;a>o;o++){var s=n.__behaviorList[o];s.__isInitialized||i.push(s)}for(var o=0,a=i.length;a>o;o++){var s=i[o];try{s.awake&&s.awake.call(s,n,e)}catch(c){console.group(),(console.error||console.log).call(console,c.stack||c),console.log("[Behavior]"),console.log(s),console.log("[Object3D]"),console.log(n),console.groupEnd()}}for(var o=0,a=i.length;a>o;o++){var s=i[o];try{s.start&&s.start.call(s)}catch(c){console.group(),(console.error||console.log).call(console,c.stack||c),console.log("[Behavior]"),console.log(s),console.log("[Object3D]"),console.log(n),console.groupEnd()}s.__isInitialized=!0}for(var o=0,a=r.length;a>o;o++){var s=r[o];try{s.update&&s.update.call(s,t)}catch(c){console.group(),(console.error||console.log).call(console,c.stack||c),console.log("[Behavior]"),console.log(s),console.log("[Object3D]"),console.log(n),console.groupEnd()}}}};var Bt=Object.freeze({OBJMTLLoader:Nt,cursor:Ft}),Ht=function(){},qt={type:{}};qt.type.get=function(){return this._typeWarning||(console.warn("Behavior",this,"does not expose type information!","It will not be queryable by getBehaviorByType, which will break","some built-in behaviors."),this._typeWarning=!0),null},Ht.prototype.awake=function(t,e){},Ht.prototype.start=function(){},Ht.prototype.update=function(t){},Ht.prototype.dispose=function(t){},Object.defineProperties(Ht.prototype,qt);var Wt=function(t){function e(e){t.call(this),this.config=Object.assign({x:3,y:5,shouldRotate:!0,shouldMove:!0},e),this.object3d=null,this.offsetPosition=null,this.lastBobPosition=new THREE.Vector3,this.nowOffset=1e4*Math.random()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"Bob"},e.prototype.awake=function(t){this.object3d=t,this.offsetPosition=this.object3d.position.clone()},e.prototype.update=function(t){var e=Math.floor(performance.now())+this.nowOffset;this.config.shouldMove&&(this.lastBobPosition.equals(this.object3d.position)||this.offsetPosition.copy(this.object3d.position),this.object3d.position.y=this.offsetPosition.y+Math.sin(e/800)*this.config.x,this.object3d.position.x=this.offsetPosition.x+Math.sin(e/500)*this.config.y,this.lastBobPosition.copy(this.object3d.position)),this.config.shouldRotate&&(this.object3d.rotation.x=Math.sin(e/500)/15)},Object.defineProperties(e.prototype,n),e}(Ht),Vt=function(t){function e(e){t.call(this),this.config=Object.assign({overBrightness:1.5,downBrightness:.5},e),this.object3d=null,this.scene=null,this.originalColor=null,this.modifiedColor=new THREE.Color,this._cbs={cursorenter:this.cursorEnter.bind(this),cursordown:this.cursorDown.bind(this),cursorup:this.cursorUp.bind(this),cursorleave:this.cursorLeave.bind(this)}}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"ButtonStateStyle"},e.prototype.awake=function(t,e){this.object3d=t,this.scene=e,this.originalColor=this.config.originalColor||this.object3d.material.color,this.object3d.addEventListener("cursorenter",this._cbs.cursorenter),this.object3d.addEventListener("cursordown",this._cbs.cursordown)},e.prototype.dispose=function(){ -this.object3d.removeEventListener("cursorenter",this._cbs.cursorenter),this.object3d.removeEventListener("cursorleave",this._cbs.cursorleave),this.object3d.removeEventListener("cursorup",this._cbs.cursorup),this.object3d.removeEventListener("cursordown",this._cbs.cursordown)},e.prototype.changeBrightness=function(t){this.modifiedColor.set(this.originalColor),this.modifiedColor.multiplyScalar(t),this.modifiedColor.r=THREE.Math.clamp(this.modifiedColor.r,0,1),this.modifiedColor.g=THREE.Math.clamp(this.modifiedColor.g,0,1),this.modifiedColor.b=THREE.Math.clamp(this.modifiedColor.b,0,1),this.object3d.material.color=this.modifiedColor},e.prototype.cursorLeave=function(){this.object3d.removeEventListener("cursorleave",this._cbs.cursorleave),this.changeBrightness(1)},e.prototype.cursorEnter=function(){this.changeBrightness(this.config.overBrightness),this.object3d.addEventListener("cursorleave",this._cbs.cursorleave)},e.prototype.cursorUp=function(t){this.scene.removeEventListener("cursorup",this._cbs.cursorup),this.object3d.addEventListener("cursorenter",this._cbs.cursorenter),t.target===this.object3d?(this.changeBrightness(this.config.overBrightness),this.object3d.addEventListener("cursorleave",this._cbs.cursorleave)):this.changeBrightness(1)},e.prototype.cursorDown=function(){this.scene.addEventListener("cursorup",this._cbs.cursorup),this.object3d.removeEventListener("cursorleave",this._cbs.cursorleave),this.object3d.removeEventListener("cursorenter",this._cbs.cursorenter),this.changeBrightness(this.config.downBrightness)},Object.defineProperties(e.prototype,n),e}(Ht),Gt=function(t){function e(e){t.call(this),this.config=e=Object.assign({space:"world",x:!1,y:!1,z:!1,cursorSnap:!0},e),this.min=new THREE.Vector3(void 0!==e.x.min?e.x.min:Number.NEGATIVE_INFINITY,void 0!==e.y.min?e.y.min:Number.NEGATIVE_INFINITY,void 0!==e.z.min?e.z.min:Number.NEGATIVE_INFINITY),this.max=new THREE.Vector3(void 0!==e.x.max?e.x.max:Number.POSITIVE_INFINITY,void 0!==e.y.max?e.y.max:Number.POSITIVE_INFINITY,void 0!==e.z.max?e.z.max:Number.POSITIVE_INFINITY),this.object3d=null,this.scene=null,this.sync=null,this.intersector=null,this.dragOffset=new THREE.Vector3,this.raycaster=new THREE.Raycaster,this.raycaster.linePrecision=3,this._cbs={startDrag:this.startDrag.bind(this),moveDrag:this.moveDrag.bind(this),stopDrag:this.stopDrag.bind(this)}}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"Drag"},e.prototype.awake=function(t,e){this.object3d=t,this.scene=e,this.sync=t.getBehaviorByType("Object3DSync"),this.makeIntersector(),this.scene.add(this.intersector)},e.prototype.start=function(){this.object3d.addEventListener("cursordown",this._cbs.startDrag)},e.prototype.dispose=function(){this.object3d.removeEventListener("cursordown",this._cbs.startDrag)},e.prototype.makeIntersector=function(){function t(){r.rotateY(Math.PI)}function e(){r.rotateX(Math.PI/2)}function n(){r.rotateY(Math.PI/2)}var i=1e4,r=new THREE.PlaneGeometry(i,i),o=!!this.config.x,a=!!this.config.y,s=!!this.config.z,c=o+a+s;if(3===c)throw new Error("Arbitrary dragging currently unsupported. Please lock at least one axis.");if(2!==c)throw 1===c?new Error("Single axis dragging currently unsupported."):new Error("Invalid axis configuration");o&&a?t():o&&s?e():a&&s&&n();var u=new THREE.MeshBasicMaterial({color:"purple"});u.side=THREE.DoubleSide,this.intersector=new THREE.Mesh(r,u),this.intersector.visible=!1,this.intersector.material.visible=!1},e.prototype.startDrag=function(t){this.scene.addEventListener("cursorup",this._cbs.stopDrag),this.scene.addEventListener("cursormove",this._cbs.moveDrag),this.raycaster.set(t.ray.origin,t.ray.direction);var e=this.raycaster.intersectObject(this.object3d,!0)[0];if(e){var n=e.point.clone(),i=A(this.object3d).clone();this.dragOffset.copy(n).sub(i),this.intersector.position.copy(this.intersector.parent.worldToLocal(n)),this.intersector.quaternion.copy(this.object3d.parent.quaternion),this.intersector.updateMatrixWorld();var r=this.createDragEvent("dragstart");this.object3d.dispatchEvent(r)}},e.prototype.moveDrag=function(t){this.sync&&!this.sync.isMine&&this.sync.takeOwnership(),this.intersector.visible=!0,this.raycaster.set(t.ray.origin,t.ray.direction);var e=this.raycaster.intersectObject(this.intersector,!0)[0];if(this.intersector.visible=!1,e){var n=new THREE.Vector3;n.copy(e.point).sub(this.dragOffset);var i=this,r=A(this.object3d);["x","y","z"].filter(function(t){return!i.config[t]}).forEach(function(t){n[t]=r[t]}),n.clamp(this.min,this.max),this.object3d.parent.updateMatrixWorld();var o=this.object3d.parent.worldToLocal(n);this.object3d.position.set(this.config.x?o.x:this.object3d.position.x,this.config.y?o.y:this.object3d.position.y,this.config.z?o.z:this.object3d.position.z)}},e.prototype.stopDrag=function(){this.scene.removeEventListener("cursorup",this._cbs.stopDrag),this.scene.removeEventListener("cursormove",this._cbs.moveDrag);var t=this.createDragEvent("dragstop");this.object3d.dispatchEvent(t)},e.prototype.createDragEvent=function(t){return{type:t,bubbles:!0,target:this.object3d,ray:this.raycaster.ray.clone()}},Object.defineProperties(e.prototype,n),e}(Ht),Kt=.2,Qt=function(t){function e(e){t.call(this),this.config=Object.assign({position:!0,rotation:!0,scale:!0},e),this.object3d=null,this.gamepad=null,this.scene=null,this.sync=null,this.isAltModeR=!1,this.isAltModeL=!1,this.prevAltButtonR=!1,this.prevAltButtonL=!1,this.isInitialized=!1,this.originalObj=null}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"GamepadControls"},e.prototype.awake=function(t,e){var n=this;if(this.object3d=t,this.scene=e,this.sync=this.object3d.getBehaviorByType("Object3DSync"),this.originalObj=this.object3d.clone(),this.gamepad=this.getGamepad(),this.gamepad)console.log("Gamepad detected: "+this.gamepad.id);else var i=setInterval(function(){n.gamepad=n.getGamepad(),n.gamepad&&(console.log("Gamepad connected: "+n.gamepad.id),clearInterval(i))}.bind(this),500);this.scene.addEventListener("cursordown",function(t){n.gamepad&&!n.isInitialized&&(n.preventDefault(n.gamepad),n.isInitialized=!0)}.bind(this))},e.prototype.getGamepad=function(){var t=this,e=[];if(e=altspace&&altspace.inClient?altspace.getGamepads():navigator.getGamepads(),e.length>0)for(var n=0;nKt||Math.abs(r)>Kt;o&&!this.sync.isMine&&this.sync.takeOwnership();var a=200*(t/1e3);Math.abs(i)>Kt&&(this.object3d.position.x+=a*i),Math.abs(r)>Kt&&(this.isAltModeL?this.object3d.position.y+=a*-r:this.object3d.position.z+=a*r)}if(this.config.rotation){var s=this.gamepad.buttons[11].pressed;this.prevAltButtonR&&!s&&(this.isAltModeR=!this.isAltModeR),this.prevAltButtonR=s;var c=this.gamepad.axes[2],u=this.gamepad.axes[3],h=Math.abs(c)>Kt||Math.abs(u)>Kt;h&&!this.sync.isMine&&this.sync.takeOwnership();var l=Math.PI*(t/1e3);!this.isAltModeR&&Math.abs(u)>Kt&&(this.object3d.rotation.x+=l*u),Math.abs(c)>Kt&&(this.isAltModeR?this.object3d.rotation.z+=l*-c:this.object3d.rotation.y+=l*c)}if(this.config.scale){var f=10*(t/1e3),d=this.gamepad.buttons[12].pressed,p=this.gamepad.buttons[13].pressed,g=this.gamepad.buttons[12].pressed||this.gamepad.buttons[13].pressed;g&&!this.sync.isMine&&this.sync.takeOwnership();var b=this.object3d.scale,y=new THREE.Vector3(1,1,1);y.multiplyScalar(f),d&&this.object3d.scale.add(y),p&&b.x>y.x&&b.y>y.y&&b.z>y.z&&this.object3d.scale.sub(y)}}},Object.defineProperties(e.prototype,n),e}(Ht),zt=function(t){function e(e){var n=this;if(t.call(this),this.config=Object.assign({event:"cursorenter",color:new THREE.Color("yellow")},e),"cursorenter"!==this.config.event&&"cursordown"!==this.config.event)throw Error('Expected config.event "cursorenter" or "cursordown"');this.object3d=null,this.cursordownObject=null,this.cursorenterObject=null,this.scene=null,this.cursordown=function(t){n.cursordownObject=n.object3d,"cursordown"===n.config.event&&n.setColor(n.cursordownObject)}.bind(this),this.cursorenter=function(t){n.cursordownObject&&n.cursordownObject!==n.object3d||(n.cursorenterObject&&n.unsetColor(n.cursorenterObject),n.cursorenterObject=n.object3d,n.setColor(n.object3d))}.bind(this),this.cursorleave=function(t){n.cursorenterObject===n.object3d&&(n.cursorenterObject=null,n.unsetColor(n.object3d))}.bind(this),this.cursorupScene=function(t){"cursordown"===n.config.event&&n.cursordownObject&&n.unsetColor(n.cursordownObject),n.cursordownObject=null}.bind(this)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"HoverColor"},e.prototype.awake=function(t,e){this.object3d=t,this.scene=e,this.object3d.addEventListener("cursordown",this.cursordown),this.scene.addEventListener("cursorup",this.cursorupScene),"cursorenter"===this.config.event&&(this.object3d.addEventListener("cursorenter",this.cursorenter),this.object3d.addEventListener("cursorleave",this.cursorleave))},e.prototype.dispose=function(){this.object3d.removeEventListener("cursordown",this.cursordown),this.scene.removeEventListener("cursorup",this.cursorupScene),this.object3d.removeEventListener("cursorenter",this.cursorenter),this.object3d.removeEventListener("cursorleave",this.cursorleave)},e.prototype.setColor=function(t){t.material&&t.material.color&&(t.userData.origColor=t.material.color,t.material.color=this.config.color,t.material&&(t.material.needsUpdate=!0)),t.children.forEach(this.setColor.bind(this))},e.prototype.unsetColor=function(t){if(t.material&&t.material.color){if(!t.userData.origColor)return void console.error("Cannot unsetColor, no userData.origColor for object",t);t.material.color=t.userData.origColor,t.material&&(t.material.needsUpdate=!0)}t.children.forEach(this.unsetColor.bind(this))},Object.defineProperties(e.prototype,n),e}(Ht),Yt=function(t){function e(e){var n=this;t.call(this),this.config=Object.assign({scale:1.15,duration:75,revertOnDispose:!0},e),this.object3d=null,this.originalScale=null,this.elapsedTime=this.config.duration,this.progress=1,this.srcScale=null,this.destScale=null,this.onHoverStateChange=function(){var t;t=[n.destScale,n.srcScale],n.srcScale=t[0],n.destScale=t[1],n.progress=1-n.progress,n.elapsedTime=n.config.duration-n.elapsedTime}.bind(this)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"HoverScale"},e.prototype.awake=function(t,e){this.object3d=t,this.originalScale=this.object3d.scale.clone(),this.srcScale=this.object3d.scale.clone(),this.srcScale.multiplyScalar(this.config.scale),this.destScale=new THREE.Vector3,this.destScale.copy(this.originalScale),this.progress=1,this.elapsedTime=this.config.duration,this.object3d.addEventListener("cursorenter",this.onHoverStateChange),this.object3d.addEventListener("cursorleave",this.onHoverStateChange)},e.prototype.update=function(t){this.progress<1&&(this.elapsedTime=THREE.Math.clamp(this.elapsedTime+t,0,this.config.duration),this.progress=THREE.Math.clamp(this.elapsedTime/this.config.duration,0,1),this.object3d.scale.lerpVectors(this.srcScale,this.destScale,this.progress))},e.prototype.dispose=function(){this.object3d.removeEventListener("cursorenter",this.onHoverStateChange),this.object3d.removeEventListener("cursorleave",this.onHoverStateChange),this.config.revertOnDispose&&this.object3d.scale.copy(this.originalScale),this.originalScale=null,this.srcScale=null,this.destScale=null,this.object3d=null},Object.defineProperties(e.prototype,n),e}(Ht),Xt=function(t){function e(n){t.call(this),this.config=Object.assign({jointCubeSize:15,joints:e.HAND_JOINTS},n),this.object3d=null,this.skeleton=null,this.jointCube=null,this.hasCollided=!1,this.collidedJoints=[],this.jointIntersectUnion=null}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"JointCollisionEvents"},e.prototype.awake=function(t,e){this.object3d=t;var n=this;k(e).then(function(t){n.skeleton=t,n.jointCube=new THREE.Vector3(n.config.jointCubeSize,n.config.jointCubeSize,n.config.jointCubeSize)})["catch"](function(t){console.log("Failed to get tracking skeleton",t)})},e.prototype.update=function(t){var e=this;if(this.skeleton){for(var n=[],i=0;iNumber.EPSILON&&this.object3d.scale.y>Number.EPSILON&&this.object3d.scale.z>Number.EPSILON)for(var c=0;c0){if(T(t,this.lastTransform))return;this.transformRef.set(t),this.lastTransform=t}}},e.prototype.takeOwnership=function(){this.ownerRef.set(this.sceneSync.clientId)},Object.defineProperties(e.prototype,n),e}(Ht),fe=[],de={},pe={},ge=function(t){function e(e,n){t.call(this),this.config=Object.assign({instantiators:{},destroyers:{},ready:null,autoSendRateMS:100},n),this.instanceRef=e,this.sceneRef=e.child("scene"),this.clientsRef=e.child("clients"),this.clientId=null,this.masterClientId=null}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{},isMasterClient:{}};return n.type.get=function(){return"SceneSync"},e.prototype.awake=function(t,e){var n=this;setInterval(R,this.config.autoSendRateMS);var i=e;this.clientId=i.uuid,this.clientsRef.on("value",function(t){var e=t.val();if(e){var i=Object.keys(e)[0];n.masterClientId=e[i]}}.bind(this)),this.clientsRef.push(this.clientId).onDisconnect().remove(),this.instanceRef.child("initialized").once("value",function(t){var e=!t.val();t.ref().set(!0),n.config.ready&&n.config.ready(e)}.bind(this)),this.sceneRef.on("child_added",this.onInstantiate.bind(this)),this.sceneRef.on("child_removed",this.onDestroy.bind(this))},e.prototype.instantiate=function(t,e,n){void 0===e&&(e={});var i=this.sceneRef.push({syncType:t,initData:e},function(t){if(t)throw Error("Failed to save to Firebase",t)});n&&i.onDisconnect().remove();var r=de[i.key()];return r.getBehaviorByType("Object3DSync").takeOwnership(),r},e.prototype.onInstantiate=function(t){var e=t.val(),n=t.key(),i=this.config.instantiators[e.syncType];if(!i)return void console.warn("No instantiator found for syncType: "+e.syncType);var r=i(e.initData,e.syncType);if(!r)return void console.error(e.syncType+".create must return an Object3D");de[n]=r,pe[r.uuid]=n;var o=r.getBehaviorByType("Object3DSync");return o?(fe.push(o),void o.link(t.ref(),this)):void console.error(e.syncType+" instantiator must return an Object3D with an Object3DSync behavior")},e.prototype.destroy=function(t){var e=pe[t.uuid];return e?(this.sceneRef.child(e).remove(function(t){t&&console.warn("Failed to remove from Firebase",t)}),void this.sceneRef.child(e).off()):void console.warn("Failed to find key for object3d to be destroyed",t)},e.prototype.onDestroy=function(t){function e(t){t.removeAllBehaviors(),t.parent&&t.parent.remove(t),t.geometry&&t.geometry.dispose(),t.material&&(t.material.map&&t.material.map.dispose(),t.material.dispose())}var n=t.val(),i=t.key(),r=de[i];if(!r)return void console.warn("Failed to find object matching deleted key",i);var o=n.syncType;if(!o)return void console.warn("No syncType found for object being destroyed",r);var a=this.config.destroyers[o],s=!a;a&&(s=a(r)),s&&e(r),delete de[i],delete pe[r.uuid]},n.isMasterClient.get=function(){return this.masterClientId===this.clientId},Object.defineProperties(e.prototype,n),e}(Ht),be=function(t){function e(e){t.call(this),this.config=Object.assign({speed:1e-4,axis:new THREE.Vector3(0,1,0)},e),this.config.axis.normalize(),this.object3d=null}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"Spin"},e.prototype.awake=function(t){this.object3d=t},e.prototype.update=function(t){this.object3d.rotateOnAxis(this.config.axis,this.config.speed*t)},Object.defineProperties(e.prototype,n),e}(Ht),ye=function(t){function e(e){t.call(this),this.config=Object.assign({logging:!1},e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"SteamVRInput"},e.prototype.awake=function(){var t=this;this.leftControllerPromise=x(e.LEFT_CONTROLLER,this.config),this.rightControllerPromise=x(e.RIGHT_CONTROLLER,this.config),this.firstControllerPromise=Promise.race([this.leftControllerPromise,this.rightControllerPromise]),this.leftControllerPromise.then(function(e){t.leftController=e}),this.rightControllerPromise.then(function(e){t.rightController=e}),this.firstControllerPromise.then(function(n){t.firstController=n;var i=n.axes.map(function(){return!1}),r=n.buttons.map(function(){return!1});r[e.BUTTON_TRIGGER]=!0,r[e.BUTTON_TOUCHPAD]=!0,n.preventDefault(i,r)})},Object.defineProperties(e.prototype,n),e}(Ht);Object.assign(ye,{BUTTON_TRIGGER:0,BUTTON_GRIP:1,BUTTON_TOUCHPAD:2,BUTTON_DPAD_UP:3,BUTTON_DPAD_RIGHT:4,BUTTON_DPAD_DOWN:5,BUTTON_DPAD_LEFT:6,AXIS_TOUCHPAD_X:0,AXIS_TOUCHPAD_Y:1,FIRST_CONTROLLER:"first",LEFT_CONTROLLER:"left",RIGHT_CONTROLLER:"right"});var ve=function(t){function e(e){var n=e.hand;void 0===n&&(n="first"),t.call(this),this._hand=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"SteamVRTrackedObject"},e.prototype.awake=function(t,e){this._object3d=t,this._scene=e,this._steamVRInput=this._scene.getBehaviorByType("SteamVRInput")},e.prototype.update=function(){var t=this._steamVRInput[this._hand+"Controller"],e=this._object3d;if(t){var n=t.position,i=n.x,r=n.y,o=n.z;e.position.set(i,r,o);var a=t.rotation,i=a.x,r=a.y,o=a.z,s=a.w;e.quaternion.set(i,r,o,s)}},Object.defineProperties(e.prototype,n),e}(Ht),me=function(t){function e(e){void 0===e&&(e={}),t.call(this),this.object3d=null,this.scene=null,this.startingRotation=null,this.activelyRotating=!1,this.lastDisplacementX=0,this.runningCount=5,this.runningAverageVelocityX=0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"TouchpadRotate"},e.prototype.awake=function(t,e){this.object3d=t,this.scene=e,altspace.addEventListener("touchpadup",this.onTouchpadUp.bind(this)),altspace.addEventListener("touchpaddown",this.onTouchpadDown.bind(this)),altspace.addEventListener("touchpadmove",this.onTouchpadMove.bind(this))},e.prototype.update=function(t){!this.activelyRotating&&Math.abs(this.runningAverageVelocityX)>.01&&(this.object3d.rotation.y+=this.runningAverageVelocityX,this.runningAverageVelocityX*=.97)},e.prototype.onTouchpadUp=function(t){this.activelyRotating=!1},e.prototype.onTouchpadDown=function(t){this.activelyRotating=!0,this.startingRotation=this.object3d.rotation.clone()},e.prototype.onTouchpadMove=function(t){var e=t.displacementX-this.lastDisplacementX;this.object3d.rotation.set(this.startingRotation.x,this.startingRotation.y+t.displacementX/300,this.startingRotation.z),this.runningAverageVelocityX=(this.runningAverageVelocityX*this.runningCount+e/300)/(this.runningCount+1),this.lastDisplacementX=t.displacementX},Object.defineProperties(e.prototype,n),e}(Ht),we=Object.freeze({Behavior:Ht,Bob:Wt,ButtonStateStyle:Vt,Drag:Gt,GamepadControls:Qt,HoverColor:zt,HoverScale:Yt,JointCollisionEvents:Xt,Layout:he,Object3DSync:le,SceneSync:ge,Spin:be,SteamVRInput:ye,SteamVRTrackedObject:ve,TouchpadRotate:me}),Ee=Object.freeze({sync:jt,Simulation:Ot,multiloader:Lt,codePen:Ut,shims:Bt,behaviors:we});Object.isFrozen(window.altspace)||Object.assign(window.altspace,{components:{},utilities:{},inClient:!1});var _e="2.6.2";window.altspace.requestVersion&&window.altspace.requestVersion(_e),window.AFRAME&&!window.THREE&&(window.THREE=window.AFRAME.THREE),Object.assign(window.altspace.components||{},wt),Object.assign(window.altspace.utilities||{},Ee)}(Firebase,Url,Please); \ No newline at end of file +this.object3d.removeEventListener("cursorenter",this._cbs.cursorenter),this.object3d.removeEventListener("cursorleave",this._cbs.cursorleave),this.object3d.removeEventListener("cursorup",this._cbs.cursorup),this.object3d.removeEventListener("cursordown",this._cbs.cursordown)},e.prototype.changeBrightness=function(t){this.modifiedColor.set(this.originalColor),this.modifiedColor.multiplyScalar(t),this.modifiedColor.r=THREE.Math.clamp(this.modifiedColor.r,0,1),this.modifiedColor.g=THREE.Math.clamp(this.modifiedColor.g,0,1),this.modifiedColor.b=THREE.Math.clamp(this.modifiedColor.b,0,1),this.object3d.material.color=this.modifiedColor},e.prototype.cursorLeave=function(){this.object3d.removeEventListener("cursorleave",this._cbs.cursorleave),this.changeBrightness(1)},e.prototype.cursorEnter=function(){this.changeBrightness(this.config.overBrightness),this.object3d.addEventListener("cursorleave",this._cbs.cursorleave)},e.prototype.cursorUp=function(t){this.scene.removeEventListener("cursorup",this._cbs.cursorup),this.object3d.addEventListener("cursorenter",this._cbs.cursorenter),t.target===this.object3d?(this.changeBrightness(this.config.overBrightness),this.object3d.addEventListener("cursorleave",this._cbs.cursorleave)):this.changeBrightness(1)},e.prototype.cursorDown=function(){this.scene.addEventListener("cursorup",this._cbs.cursorup),this.object3d.removeEventListener("cursorleave",this._cbs.cursorleave),this.object3d.removeEventListener("cursorenter",this._cbs.cursorenter),this.changeBrightness(this.config.downBrightness)},Object.defineProperties(e.prototype,n),e}(Ht),Gt=function(t){function e(e){t.call(this),this.config=e=Object.assign({space:"world",x:!1,y:!1,z:!1,cursorSnap:!0},e),this.min=new THREE.Vector3(void 0!==e.x.min?e.x.min:Number.NEGATIVE_INFINITY,void 0!==e.y.min?e.y.min:Number.NEGATIVE_INFINITY,void 0!==e.z.min?e.z.min:Number.NEGATIVE_INFINITY),this.max=new THREE.Vector3(void 0!==e.x.max?e.x.max:Number.POSITIVE_INFINITY,void 0!==e.y.max?e.y.max:Number.POSITIVE_INFINITY,void 0!==e.z.max?e.z.max:Number.POSITIVE_INFINITY),this.object3d=null,this.scene=null,this.sync=null,this.intersector=null,this.dragOffset=new THREE.Vector3,this.raycaster=new THREE.Raycaster,this.raycaster.linePrecision=3,this._cbs={startDrag:this.startDrag.bind(this),moveDrag:this.moveDrag.bind(this),stopDrag:this.stopDrag.bind(this)}}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"Drag"},e.prototype.awake=function(t,e){this.object3d=t,this.scene=e,this.sync=t.getBehaviorByType("Object3DSync"),this.makeIntersector(),this.scene.add(this.intersector)},e.prototype.start=function(){this.object3d.addEventListener("cursordown",this._cbs.startDrag)},e.prototype.dispose=function(){this.object3d.removeEventListener("cursordown",this._cbs.startDrag)},e.prototype.makeIntersector=function(){function t(){r.rotateY(Math.PI)}function e(){r.rotateX(Math.PI/2)}function n(){r.rotateY(Math.PI/2)}var i=1e4,r=new THREE.PlaneGeometry(i,i),o=!!this.config.x,a=!!this.config.y,s=!!this.config.z,c=o+a+s;if(3===c)throw new Error("Arbitrary dragging currently unsupported. Please lock at least one axis.");if(2!==c)throw 1===c?new Error("Single axis dragging currently unsupported."):new Error("Invalid axis configuration");o&&a?t():o&&s?e():a&&s&&n();var u=new THREE.MeshBasicMaterial({color:"purple"});u.side=THREE.DoubleSide,this.intersector=new THREE.Mesh(r,u),this.intersector.visible=!1,this.intersector.material.visible=!1},e.prototype.startDrag=function(t){this.scene.addEventListener("cursorup",this._cbs.stopDrag),this.scene.addEventListener("cursormove",this._cbs.moveDrag),this.raycaster.set(t.ray.origin,t.ray.direction);var e=this.raycaster.intersectObject(this.object3d,!0)[0];if(e){var n=e.point.clone(),i=A(this.object3d).clone();this.dragOffset.copy(n).sub(i),this.intersector.position.copy(this.intersector.parent.worldToLocal(n)),this.intersector.quaternion.copy(this.object3d.parent.quaternion),this.intersector.updateMatrixWorld();var r=this.createDragEvent("dragstart");this.object3d.dispatchEvent(r)}},e.prototype.moveDrag=function(t){this.sync&&!this.sync.isMine&&this.sync.takeOwnership(),this.intersector.visible=!0,this.raycaster.set(t.ray.origin,t.ray.direction);var e=this.raycaster.intersectObject(this.intersector,!0)[0];if(this.intersector.visible=!1,e){var n=new THREE.Vector3;n.copy(e.point).sub(this.dragOffset);var i=this,r=A(this.object3d);["x","y","z"].filter(function(t){return!i.config[t]}).forEach(function(t){n[t]=r[t]}),n.clamp(this.min,this.max),this.object3d.parent.updateMatrixWorld();var o=this.object3d.parent.worldToLocal(n);this.object3d.position.set(this.config.x?o.x:this.object3d.position.x,this.config.y?o.y:this.object3d.position.y,this.config.z?o.z:this.object3d.position.z)}},e.prototype.stopDrag=function(){this.scene.removeEventListener("cursorup",this._cbs.stopDrag),this.scene.removeEventListener("cursormove",this._cbs.moveDrag);var t=this.createDragEvent("dragstop");this.object3d.dispatchEvent(t)},e.prototype.createDragEvent=function(t){return{type:t,bubbles:!0,target:this.object3d,ray:this.raycaster.ray.clone()}},Object.defineProperties(e.prototype,n),e}(Ht),Kt=.2,Qt=function(t){function e(e){t.call(this),this.config=Object.assign({position:!0,rotation:!0,scale:!0},e),this.object3d=null,this.gamepad=null,this.scene=null,this.sync=null,this.isAltModeR=!1,this.isAltModeL=!1,this.prevAltButtonR=!1,this.prevAltButtonL=!1,this.isInitialized=!1,this.originalObj=null}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"GamepadControls"},e.prototype.awake=function(t,e){var n=this;if(this.object3d=t,this.scene=e,this.sync=this.object3d.getBehaviorByType("Object3DSync"),this.originalObj=this.object3d.clone(),this.gamepad=this.getGamepad(),this.gamepad)console.log("Gamepad detected: "+this.gamepad.id);else var i=setInterval(function(){n.gamepad=n.getGamepad(),n.gamepad&&(console.log("Gamepad connected: "+n.gamepad.id),clearInterval(i))}.bind(this),500);this.scene.addEventListener("cursordown",function(t){n.gamepad&&!n.isInitialized&&(n.preventDefault(n.gamepad),n.isInitialized=!0)}.bind(this))},e.prototype.getGamepad=function(){var t=this,e=[];if(e=altspace&&altspace.inClient?altspace.getGamepads():navigator.getGamepads(),e.length>0)for(var n=0;nKt||Math.abs(r)>Kt;o&&!this.sync.isMine&&this.sync.takeOwnership();var a=200*(t/1e3);Math.abs(i)>Kt&&(this.object3d.position.x+=a*i),Math.abs(r)>Kt&&(this.isAltModeL?this.object3d.position.y+=a*-r:this.object3d.position.z+=a*r)}if(this.config.rotation){var s=this.gamepad.buttons[11].pressed;this.prevAltButtonR&&!s&&(this.isAltModeR=!this.isAltModeR),this.prevAltButtonR=s;var c=this.gamepad.axes[2],u=this.gamepad.axes[3],h=Math.abs(c)>Kt||Math.abs(u)>Kt;h&&!this.sync.isMine&&this.sync.takeOwnership();var l=Math.PI*(t/1e3);!this.isAltModeR&&Math.abs(u)>Kt&&(this.object3d.rotation.x+=l*u),Math.abs(c)>Kt&&(this.isAltModeR?this.object3d.rotation.z+=l*-c:this.object3d.rotation.y+=l*c)}if(this.config.scale){var f=10*(t/1e3),d=this.gamepad.buttons[12].pressed,p=this.gamepad.buttons[13].pressed,g=this.gamepad.buttons[12].pressed||this.gamepad.buttons[13].pressed;g&&!this.sync.isMine&&this.sync.takeOwnership();var b=this.object3d.scale,y=new THREE.Vector3(1,1,1);y.multiplyScalar(f),d&&this.object3d.scale.add(y),p&&b.x>y.x&&b.y>y.y&&b.z>y.z&&this.object3d.scale.sub(y)}}},Object.defineProperties(e.prototype,n),e}(Ht),zt=function(t){function e(e){var n=this;if(t.call(this),this.config=Object.assign({event:"cursorenter",color:new THREE.Color("yellow")},e),"cursorenter"!==this.config.event&&"cursordown"!==this.config.event)throw Error('Expected config.event "cursorenter" or "cursordown"');this.object3d=null,this.cursordownObject=null,this.cursorenterObject=null,this.scene=null,this.cursordown=function(t){n.cursordownObject=n.object3d,"cursordown"===n.config.event&&n.setColor(n.cursordownObject)}.bind(this),this.cursorenter=function(t){n.cursordownObject&&n.cursordownObject!==n.object3d||(n.cursorenterObject&&n.unsetColor(n.cursorenterObject),n.cursorenterObject=n.object3d,n.setColor(n.object3d))}.bind(this),this.cursorleave=function(t){n.cursorenterObject===n.object3d&&(n.cursorenterObject=null,n.unsetColor(n.object3d))}.bind(this),this.cursorupScene=function(t){"cursordown"===n.config.event&&n.cursordownObject&&n.unsetColor(n.cursordownObject),n.cursordownObject=null}.bind(this)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"HoverColor"},e.prototype.awake=function(t,e){this.object3d=t,this.scene=e,this.object3d.addEventListener("cursordown",this.cursordown),this.scene.addEventListener("cursorup",this.cursorupScene),"cursorenter"===this.config.event&&(this.object3d.addEventListener("cursorenter",this.cursorenter),this.object3d.addEventListener("cursorleave",this.cursorleave))},e.prototype.dispose=function(){this.object3d.removeEventListener("cursordown",this.cursordown),this.scene.removeEventListener("cursorup",this.cursorupScene),this.object3d.removeEventListener("cursorenter",this.cursorenter),this.object3d.removeEventListener("cursorleave",this.cursorleave)},e.prototype.setColor=function(t){t.material&&t.material.color&&(t.userData.origColor=t.material.color,t.material.color=this.config.color,t.material&&(t.material.needsUpdate=!0)),t.children.forEach(this.setColor.bind(this))},e.prototype.unsetColor=function(t){if(t.material&&t.material.color){if(!t.userData.origColor)return void console.error("Cannot unsetColor, no userData.origColor for object",t);t.material.color=t.userData.origColor,t.material&&(t.material.needsUpdate=!0)}t.children.forEach(this.unsetColor.bind(this))},Object.defineProperties(e.prototype,n),e}(Ht),Yt=function(t){function e(e){var n=this;t.call(this),this.config=Object.assign({scale:1.15,duration:75,revertOnDispose:!0},e),this.object3d=null,this.originalScale=null,this.elapsedTime=this.config.duration,this.progress=1,this.srcScale=null,this.destScale=null,this.onHoverStateChange=function(){var t;t=[n.destScale,n.srcScale],n.srcScale=t[0],n.destScale=t[1],n.progress=1-n.progress,n.elapsedTime=n.config.duration-n.elapsedTime}.bind(this)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"HoverScale"},e.prototype.awake=function(t,e){this.object3d=t,this.originalScale=this.object3d.scale.clone(),this.srcScale=this.object3d.scale.clone(),this.srcScale.multiplyScalar(this.config.scale),this.destScale=new THREE.Vector3,this.destScale.copy(this.originalScale),this.progress=1,this.elapsedTime=this.config.duration,this.object3d.addEventListener("cursorenter",this.onHoverStateChange),this.object3d.addEventListener("cursorleave",this.onHoverStateChange)},e.prototype.update=function(t){this.progress<1&&(this.elapsedTime=THREE.Math.clamp(this.elapsedTime+t,0,this.config.duration),this.progress=THREE.Math.clamp(this.elapsedTime/this.config.duration,0,1),this.object3d.scale.lerpVectors(this.srcScale,this.destScale,this.progress))},e.prototype.dispose=function(){this.object3d.removeEventListener("cursorenter",this.onHoverStateChange),this.object3d.removeEventListener("cursorleave",this.onHoverStateChange),this.config.revertOnDispose&&this.object3d.scale.copy(this.originalScale),this.originalScale=null,this.srcScale=null,this.destScale=null,this.object3d=null},Object.defineProperties(e.prototype,n),e}(Ht),Xt=function(t){function e(n){t.call(this),this.config=Object.assign({jointCubeSize:15,joints:e.HAND_JOINTS},n),this.object3d=null,this.skeleton=null,this.jointCube=null,this.hasCollided=!1,this.collidedJoints=[],this.jointIntersectUnion=null}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"JointCollisionEvents"},e.prototype.awake=function(t,e){this.object3d=t;var n=this;k(e).then(function(t){n.skeleton=t,n.jointCube=new THREE.Vector3(n.config.jointCubeSize,n.config.jointCubeSize,n.config.jointCubeSize)})["catch"](function(t){console.log("Failed to get tracking skeleton",t)})},e.prototype.update=function(t){var e=this;if(this.skeleton){for(var n=[],i=0;iNumber.EPSILON&&this.object3d.scale.y>Number.EPSILON&&this.object3d.scale.z>Number.EPSILON)for(var c=0;c0){if(T(t,this.lastTransform))return;this.transformRef.set(t),this.lastTransform=t}}},e.prototype.takeOwnership=function(){this.ownerRef.set(this.sceneSync.clientId)},Object.defineProperties(e.prototype,n),e}(Ht),fe=[],de={},pe={},ge=function(t){function e(e,n){t.call(this),this.config=Object.assign({instantiators:{},destroyers:{},ready:null,autoSendRateMS:100},n),this.instanceRef=e,this.sceneRef=e.child("scene"),this.clientsRef=e.child("clients"),this.clientId=null,this.masterClientId=null}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{},isMasterClient:{}};return n.type.get=function(){return"SceneSync"},e.prototype.awake=function(t,e){var n=this;setInterval(R,this.config.autoSendRateMS);var i=e;this.clientId=i.uuid,this.clientsRef.on("value",function(t){var e=t.val();if(e){var i=Object.keys(e)[0];n.masterClientId=e[i]}}.bind(this)),this.clientsRef.push(this.clientId).onDisconnect().remove(),this.instanceRef.child("initialized").once("value",function(t){var e=!t.val();t.ref().set(!0),n.config.ready&&n.config.ready(e)}.bind(this)),this.sceneRef.on("child_added",this.onInstantiate.bind(this)),this.sceneRef.on("child_removed",this.onDestroy.bind(this))},e.prototype.instantiate=function(t,e,n){void 0===e&&(e={});var i=this.sceneRef.push({syncType:t,initData:e},function(t){if(t)throw Error("Failed to save to Firebase",t)});n&&i.onDisconnect().remove();var r=de[i.key()];return r.getBehaviorByType("Object3DSync").takeOwnership(),r},e.prototype.onInstantiate=function(t){var e=t.val(),n=t.key(),i=this.config.instantiators[e.syncType];if(!i)return void console.warn("No instantiator found for syncType: "+e.syncType);var r=i(e.initData,e.syncType);if(!r)return void console.error(e.syncType+".create must return an Object3D");de[n]=r,pe[r.uuid]=n;var o=r.getBehaviorByType("Object3DSync");return o?(fe.push(o),void o.link(t.ref(),this)):void console.error(e.syncType+" instantiator must return an Object3D with an Object3DSync behavior")},e.prototype.destroy=function(t){var e=pe[t.uuid];return e?(this.sceneRef.child(e).remove(function(t){t&&console.warn("Failed to remove from Firebase",t)}),void this.sceneRef.child(e).off()):void console.warn("Failed to find key for object3d to be destroyed",t)},e.prototype.onDestroy=function(t){function e(t){t.removeAllBehaviors(),t.parent&&t.parent.remove(t),t.geometry&&t.geometry.dispose(),t.material&&(t.material.map&&t.material.map.dispose(),t.material.dispose())}var n=t.val(),i=t.key(),r=de[i];if(!r)return void console.warn("Failed to find object matching deleted key",i);var o=n.syncType;if(!o)return void console.warn("No syncType found for object being destroyed",r);var a=this.config.destroyers[o],s=!a;a&&(s=a(r)),s&&e(r),delete de[i],delete pe[r.uuid]},n.isMasterClient.get=function(){return this.masterClientId===this.clientId},Object.defineProperties(e.prototype,n),e}(Ht),be=function(t){function e(e){t.call(this),this.config=Object.assign({speed:1e-4,axis:new THREE.Vector3(0,1,0)},e),this.config.axis.normalize(),this.object3d=null}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"Spin"},e.prototype.awake=function(t){this.object3d=t},e.prototype.update=function(t){this.object3d.rotateOnAxis(this.config.axis,this.config.speed*t)},Object.defineProperties(e.prototype,n),e}(Ht),ye=function(t){function e(e){t.call(this),this.config=Object.assign({logging:!1},e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"SteamVRInput"},e.prototype.awake=function(){var t=this;this.leftControllerPromise=x(e.LEFT_CONTROLLER,this.config),this.rightControllerPromise=x(e.RIGHT_CONTROLLER,this.config),this.firstControllerPromise=Promise.race([this.leftControllerPromise,this.rightControllerPromise]),this.leftControllerPromise.then(function(e){t.leftController=e}),this.rightControllerPromise.then(function(e){t.rightController=e}),this.firstControllerPromise.then(function(n){t.firstController=n;var i=n.axes.map(function(){return!1}),r=n.buttons.map(function(){return!1});r[e.BUTTON_TRIGGER]=!0,r[e.BUTTON_TOUCHPAD]=!0,n.preventDefault(i,r)})},Object.defineProperties(e.prototype,n),e}(Ht);Object.assign(ye,{BUTTON_TRIGGER:0,BUTTON_GRIP:1,BUTTON_TOUCHPAD:2,BUTTON_DPAD_UP:3,BUTTON_DPAD_RIGHT:4,BUTTON_DPAD_DOWN:5,BUTTON_DPAD_LEFT:6,AXIS_TOUCHPAD_X:0,AXIS_TOUCHPAD_Y:1,FIRST_CONTROLLER:"first",LEFT_CONTROLLER:"left",RIGHT_CONTROLLER:"right"});var ve=function(t){function e(e){var n=e.hand;void 0===n&&(n="first"),t.call(this),this._hand=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"SteamVRTrackedObject"},e.prototype.awake=function(t,e){this._object3d=t,this._scene=e,this._steamVRInput=this._scene.getBehaviorByType("SteamVRInput")},e.prototype.update=function(){var t=this._steamVRInput[this._hand+"Controller"],e=this._object3d;if(t){var n=t.position,i=n.x,r=n.y,o=n.z;e.position.set(i,r,o);var a=t.rotation,i=a.x,r=a.y,o=a.z,s=a.w;e.quaternion.set(i,r,o,s)}},Object.defineProperties(e.prototype,n),e}(Ht),me=function(t){function e(e){void 0===e&&(e={}),t.call(this),this.object3d=null,this.scene=null,this.startingRotation=null,this.activelyRotating=!1,this.lastDisplacementX=0,this.runningCount=5,this.runningAverageVelocityX=0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={type:{}};return n.type.get=function(){return"TouchpadRotate"},e.prototype.awake=function(t,e){this.object3d=t,this.scene=e,altspace.addEventListener("touchpadup",this.onTouchpadUp.bind(this)),altspace.addEventListener("touchpaddown",this.onTouchpadDown.bind(this)),altspace.addEventListener("touchpadmove",this.onTouchpadMove.bind(this))},e.prototype.update=function(t){!this.activelyRotating&&Math.abs(this.runningAverageVelocityX)>.01&&(this.object3d.rotation.y+=this.runningAverageVelocityX,this.runningAverageVelocityX*=.97)},e.prototype.onTouchpadUp=function(t){this.activelyRotating=!1},e.prototype.onTouchpadDown=function(t){this.activelyRotating=!0,this.startingRotation=this.object3d.rotation.clone()},e.prototype.onTouchpadMove=function(t){var e=t.displacementX-this.lastDisplacementX;this.object3d.rotation.set(this.startingRotation.x,this.startingRotation.y+t.displacementX/300,this.startingRotation.z),this.runningAverageVelocityX=(this.runningAverageVelocityX*this.runningCount+e/300)/(this.runningCount+1),this.lastDisplacementX=t.displacementX},Object.defineProperties(e.prototype,n),e}(Ht),we=Object.freeze({Behavior:Ht,Bob:Wt,ButtonStateStyle:Vt,Drag:Gt,GamepadControls:Qt,HoverColor:zt,HoverScale:Yt,JointCollisionEvents:Xt,Layout:he,Object3DSync:le,SceneSync:ge,Spin:be,SteamVRInput:ye,SteamVRTrackedObject:ve,TouchpadRotate:me}),Ee=Object.freeze({sync:jt,Simulation:Ot,multiloader:Lt,codePen:Ut,shims:Bt,behaviors:we});Object.isFrozen(window.altspace)||Object.assign(window.altspace,{components:{},utilities:{},inClient:!1});var _e="2.7.0";window.altspace.requestVersion&&window.altspace.requestVersion(_e),window.AFRAME&&!window.THREE&&(window.THREE=window.AFRAME.THREE),Object.assign(window.altspace.components||{},wt),Object.assign(window.altspace.utilities||{},Ee)}(Firebase,Url,Please); \ No newline at end of file diff --git a/doc/aframe/index.html b/doc/aframe/index.html index 4b1a818a..3f1932f0 100644 --- a/doc/aframe/index.html +++ b/doc/aframe/index.html @@ -73,7 +73,7 @@

Quick Start

This is a fully functional example of what A-Frame code l

<!DOCTYPE html>
 <html><head>
 <script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
-<script src="https://sdk.altvr.com/libs/altspace.js/2.6.2/altspace.min.js"></script>
+<script src="https://sdk.altvr.com/libs/altspace.js/2.7.0/altspace.min.js"></script>
 <script>
 
 // an example custom component, that will change the color when clicked
diff --git a/doc/aframe/module-altspace_components.altspace-cursor-collider.html b/doc/aframe/module-altspace_components.altspace-cursor-collider.html
index 4c3402fb..b92b7897 100644
--- a/doc/aframe/module-altspace_components.altspace-cursor-collider.html
+++ b/doc/aframe/module-altspace_components.altspace-cursor-collider.html
@@ -57,7 +57,7 @@ 

altspace-cursor-collider

-

Enable or disable cursor collision on the object.

+

Enable or disable cursor collision on the object.

diff --git a/doc/aframe/module-altspace_components.altspace-tracked-controls.html b/doc/aframe/module-altspace_components.altspace-tracked-controls.html index 2b22ab08..f8a220bc 100644 --- a/doc/aframe/module-altspace_components.altspace-tracked-controls.html +++ b/doc/aframe/module-altspace_components.altspace-tracked-controls.html @@ -58,7 +58,7 @@

Enables tracked control support for A-Frame applications that use the built-in -tracked-controls, vive-controls or hand-controls components.

+tracked-controls, vive-controls or hand-controls components.

diff --git a/doc/aframe/module-altspace_components.altspace.html b/doc/aframe/module-altspace_components.altspace.html index 5d655df1..bc9dd8d6 100644 --- a/doc/aframe/module-altspace_components.altspace.html +++ b/doc/aframe/module-altspace_components.altspace.html @@ -59,7 +59,7 @@

The altspace component makes A-Frame apps compatible with AltspaceVR.

Note: This component can have side-effects on some default components. To be -safe, this component should be specified last.

+safe, this component should be specified last.

@@ -134,7 +134,7 @@

Example
-
<head>
  <title>My A-Frame Scene</title>
  <script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
  <script src="https://cdn.rawgit.com/AltspaceVR/AltspaceSDK/v2.6.2/dist/altspace.min.js"></script>
</head>
<body>
  <a-scene altspace>
    <a-entity geometry="primitive: box" material="color: #C03546"></a-entity>
  </a-scene>
</body>
+
<head>
  <title>My A-Frame Scene</title>
  <script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
  <script src="https://cdn.rawgit.com/AltspaceVR/AltspaceSDK/v2.7.0/dist/altspace.min.js"></script>
</head>
<body>
  <a-scene altspace>
    <a-entity geometry="primitive: box" material="color: #C03546"></a-entity>
  </a-scene>
</body>
diff --git a/doc/aframe/module-altspace_components.collapse-model.html b/doc/aframe/module-altspace_components.collapse-model.html index e74d86e3..4a4820ac 100644 --- a/doc/aframe/module-altspace_components.collapse-model.html +++ b/doc/aframe/module-altspace_components.collapse-model.html @@ -59,7 +59,7 @@

Reaches into a model's hierarchy and directly assigns the first mesh found to the containing entity. This is mostly necessary for use alongside native -components like n-skeleton-parent.

+components like n-skeleton-parent.

diff --git a/doc/aframe/module-altspace_components.html b/doc/aframe/module-altspace_components.html index be7e4f8e..122848dc 100644 --- a/doc/aframe/module-altspace_components.html +++ b/doc/aframe/module-altspace_components.html @@ -136,7 +136,7 @@

altspace/components

Example
-
<html>
  <head>
    <title>My A-Frame Scene</title>
    <script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
    <script src="https://cdn.rawgit.com/AltspaceVR/AltspaceSDK/v2.6.2/dist/altspace.min.js"></script>
  </head>
  <body>
    <a-scene altspace>
      <a-entity geometry="primitive: box" material="color: #C03546"></a-entity>
    </a-scene>
  </body>
</html>
+
<html>
  <head>
    <title>My A-Frame Scene</title>
    <script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
    <script src="https://cdn.rawgit.com/AltspaceVR/AltspaceSDK/v2.7.0/dist/altspace.min.js"></script>
  </head>
  <body>
    <a-scene altspace>
      <a-entity geometry="primitive: box" material="color: #C03546"></a-entity>
    </a-scene>
  </body>
</html>
diff --git a/doc/aframe/module-altspace_components.instantiator.html b/doc/aframe/module-altspace_components.instantiator.html index 9bdde258..bec4733a 100644 --- a/doc/aframe/module-altspace_components.instantiator.html +++ b/doc/aframe/module-altspace_components.instantiator.html @@ -58,7 +58,7 @@

Instantiates objects on an event trigger, adds them to the scene and syncs their creation across clients. -The instantiated objects are built using the specified mixins.

+The instantiated objects are built using the specified mixins.

diff --git a/doc/aframe/module-altspace_components.n-billboard.html b/doc/aframe/module-altspace_components.n-billboard.html index cf45ac08..c6914036 100644 --- a/doc/aframe/module-altspace_components.n-billboard.html +++ b/doc/aframe/module-altspace_components.n-billboard.html @@ -58,7 +58,7 @@

Make the object's +Z always face the viewer. Currently will only directly apply -to main mesh or native component on the attached entity, not any children or submeshes.

+to main mesh or native component on the attached entity, not any children or submeshes.

diff --git a/doc/aframe/module-altspace_components.n-box-collider.html b/doc/aframe/module-altspace_components.n-box-collider.html index f897e40a..ebfa7d99 100644 --- a/doc/aframe/module-altspace_components.n-box-collider.html +++ b/doc/aframe/module-altspace_components.n-box-collider.html @@ -58,7 +58,7 @@

Creates a box-shaped collider with the given dimensions. Collides with -the cursor or avatars depending on the type property.

+the cursor or avatars depending on the type property.

diff --git a/doc/aframe/module-altspace_components.n-capsule-collider.html b/doc/aframe/module-altspace_components.n-capsule-collider.html index d78ae540..79c8bb9a 100644 --- a/doc/aframe/module-altspace_components.n-capsule-collider.html +++ b/doc/aframe/module-altspace_components.n-capsule-collider.html @@ -59,7 +59,7 @@

Create a capsule-shaped collider on this entity. Capsules are a union of a cylinder and two hemispheres on top and bottom. Collides with -the cursor or avatars depending on the type property.

+the cursor or avatars depending on the type property.

diff --git a/doc/aframe/module-altspace_components.n-cockpit-parent.html b/doc/aframe/module-altspace_components.n-cockpit-parent.html index 2cf968cb..831c84b9 100644 --- a/doc/aframe/module-altspace_components.n-cockpit-parent.html +++ b/doc/aframe/module-altspace_components.n-cockpit-parent.html @@ -58,7 +58,7 @@

Parents an entity to the cockpit, i.e. the player's HUD. This is primarily used for UI elements. -Note that this does not dock the items to the radial menu. If you want that, use altspace.open.

+Note that this does not dock the items to the radial menu. If you want that, use altspace.open.

diff --git a/doc/aframe/module-altspace_components.n-collider.html b/doc/aframe/module-altspace_components.n-collider.html index 5f2b91a9..5df54a69 100644 --- a/doc/aframe/module-altspace_components.n-collider.html +++ b/doc/aframe/module-altspace_components.n-collider.html @@ -62,7 +62,7 @@

n-capsule-collider, and n-mesh-collider. You cannot use this class directly, but instead you should add one of those components -to your objects.

+to your objects.

diff --git a/doc/aframe/module-altspace_components.n-container.html b/doc/aframe/module-altspace_components.n-container.html index e7758749..874a8bdd 100644 --- a/doc/aframe/module-altspace_components.n-container.html +++ b/doc/aframe/module-altspace_components.n-container.html @@ -60,7 +60,7 @@

A container keeps a running tally of how many objects are within its bounds, and adds and removes the states container-full and container-empty based on the current count of objects. Requires a native -collider component set to trigger mode.

+collider component set to trigger mode.

diff --git a/doc/aframe/module-altspace_components.n-mesh-collider.html b/doc/aframe/module-altspace_components.n-mesh-collider.html index ef2e6214..450d5927 100644 --- a/doc/aframe/module-altspace_components.n-mesh-collider.html +++ b/doc/aframe/module-altspace_components.n-mesh-collider.html @@ -59,7 +59,7 @@

Enable collision for the entire attached mesh. This is expensive to evaluate, so should only be used on low-poly meshes. If using this alongside the geometry component, make sure that -geometry comes before this component.

+geometry comes before this component.

diff --git a/doc/aframe/module-altspace_components.n-object.html b/doc/aframe/module-altspace_components.n-object.html index 13e7b10d..acdfa761 100644 --- a/doc/aframe/module-altspace_components.n-object.html +++ b/doc/aframe/module-altspace_components.n-object.html @@ -57,7 +57,7 @@

n-object

-

Attach a given native object to this entity.

+

Attach a given native object to this entity.

diff --git a/doc/aframe/module-altspace_components.n-portal.html b/doc/aframe/module-altspace_components.n-portal.html index aaa14aa6..0ae1c0cf 100644 --- a/doc/aframe/module-altspace_components.n-portal.html +++ b/doc/aframe/module-altspace_components.n-portal.html @@ -57,7 +57,7 @@

n-portal

-

Spawn a portal that allows you to travel to a different space or a different location in the current space.

+

Spawn a portal that allows you to travel to a different space or a different location in the current space.

diff --git a/doc/aframe/module-altspace_components.n-skeleton-parent.html b/doc/aframe/module-altspace_components.n-skeleton-parent.html index 85977ca3..b3a7cf08 100644 --- a/doc/aframe/module-altspace_components.n-skeleton-parent.html +++ b/doc/aframe/module-altspace_components.n-skeleton-parent.html @@ -57,7 +57,7 @@

n-skeleton-parent

-

Parents an entity to a joint on the avatar skeleton.

+

Parents an entity to a joint on the avatar skeleton.

diff --git a/doc/aframe/module-altspace_components.n-sound.html b/doc/aframe/module-altspace_components.n-sound.html index 4cee9e53..c9c192d5 100644 --- a/doc/aframe/module-altspace_components.n-sound.html +++ b/doc/aframe/module-altspace_components.n-sound.html @@ -58,7 +58,7 @@

Play a sound from a particular location. Limiting sound duration to 5 seconds -or less is recommended to prevent hitching when the sound loads.

+or less is recommended to prevent hitching when the sound loads.

diff --git a/doc/aframe/module-altspace_components.n-spawner.html b/doc/aframe/module-altspace_components.n-spawner.html index cfd159c6..e3c5beaf 100644 --- a/doc/aframe/module-altspace_components.n-spawner.html +++ b/doc/aframe/module-altspace_components.n-spawner.html @@ -59,7 +59,7 @@

Create an object that spawns additional copies of itself when grabbed by a user (the copies are not spawners themselves). These copies will be physically interactive and automatically synchronized -between users.

+between users.

diff --git a/doc/aframe/module-altspace_components.n-sphere-collider.html b/doc/aframe/module-altspace_components.n-sphere-collider.html index e2003ea9..d791bf2f 100644 --- a/doc/aframe/module-altspace_components.n-sphere-collider.html +++ b/doc/aframe/module-altspace_components.n-sphere-collider.html @@ -58,7 +58,7 @@

Creates a sphere-shaped collider of the given radius. Collides with -the cursor or avatars depending on the type property.

+the cursor or avatars depending on the type property.

diff --git a/doc/aframe/module-altspace_components.n-text.html b/doc/aframe/module-altspace_components.n-text.html index a267fd76..9c0b8cd3 100644 --- a/doc/aframe/module-altspace_components.n-text.html +++ b/doc/aframe/module-altspace_components.n-text.html @@ -58,7 +58,7 @@

Creates dynamic 2D text on the entity. The text will wrap automatically based on the width and height provided. -This text will be clearer than texture-based text and more performant than geometry-based text.

+This text will be clearer than texture-based text and more performant than geometry-based text.

diff --git a/doc/aframe/module-altspace_components.one-per-user.html b/doc/aframe/module-altspace_components.one-per-user.html index 96bb6cbe..94cdbbd4 100644 --- a/doc/aframe/module-altspace_components.one-per-user.html +++ b/doc/aframe/module-altspace_components.one-per-user.html @@ -57,7 +57,7 @@

one-per-user

-

Instantiates an entity for every user in the space using sync-system.

+

Instantiates an entity for every user in the space using sync-system.

diff --git a/doc/aframe/module-altspace_components.sync-color.html b/doc/aframe/module-altspace_components.sync-color.html index 04fc0d9e..1eb2fcfc 100644 --- a/doc/aframe/module-altspace_components.sync-color.html +++ b/doc/aframe/module-altspace_components.sync-color.html @@ -59,7 +59,7 @@

Sync the color property of the object between clients. Requires both a sync-system component on the a-scene, and a -sync component on the target entity.

+sync component on the target entity.

diff --git a/doc/aframe/module-altspace_components.sync-n-skeleton-parent.html b/doc/aframe/module-altspace_components.sync-n-skeleton-parent.html index 92bb33e1..3e4e2963 100644 --- a/doc/aframe/module-altspace_components.sync-n-skeleton-parent.html +++ b/doc/aframe/module-altspace_components.sync-n-skeleton-parent.html @@ -59,7 +59,7 @@

Syncs the attributes of an n-skeleton-parent component across clients. Requires the sync component be present -on the entity.

+on the entity.

diff --git a/doc/aframe/module-altspace_components.sync-n-sound.html b/doc/aframe/module-altspace_components.sync-n-sound.html index 66ae8f9b..2f592769 100644 --- a/doc/aframe/module-altspace_components.sync-n-sound.html +++ b/doc/aframe/module-altspace_components.sync-n-sound.html @@ -59,7 +59,7 @@

Synchronize the playback state of an n-sound component between clients. Requires both a sync-system component on the a-scene, and a -sync component on the target entity.

+sync component on the target entity.

diff --git a/doc/aframe/module-altspace_components.sync-system.html b/doc/aframe/module-altspace_components.sync-system.html index 5d6b3927..f6faa1bd 100644 --- a/doc/aframe/module-altspace_components.sync-system.html +++ b/doc/aframe/module-altspace_components.sync-system.html @@ -60,7 +60,7 @@

Connect to a remote Firebase server, and facilitate synchronization. These options correspond exactly with the configuration options for altspace.utilities.sync.connect. -This component must be present on a-scene for any other sync components to work.

+This component must be present on a-scene for any other sync components to work.

diff --git a/doc/aframe/module-altspace_components.sync-transform.html b/doc/aframe/module-altspace_components.sync-transform.html index fbff65e6..88afdf22 100644 --- a/doc/aframe/module-altspace_components.sync-transform.html +++ b/doc/aframe/module-altspace_components.sync-transform.html @@ -59,7 +59,7 @@

Synchronize the position, rotation, and scale of this object with all clients. Requires both a sync-system component on the a-scene, and a -sync component on the target entity.

+sync component on the target entity.

diff --git a/doc/aframe/module-altspace_components.sync.html b/doc/aframe/module-altspace_components.sync.html index 6e017564..24978952 100644 --- a/doc/aframe/module-altspace_components.sync.html +++ b/doc/aframe/module-altspace_components.sync.html @@ -59,7 +59,7 @@

Enables the synchronization of properties of the entity. Must be used in conjuction with the sync-system component and a component for a -specific property (e.g. sync-transform).

+specific property (e.g. sync-transform).

diff --git a/doc/aframe/module-altspace_components.wire.html b/doc/aframe/module-altspace_components.wire.html index 29be3908..3308e27a 100644 --- a/doc/aframe/module-altspace_components.wire.html +++ b/doc/aframe/module-altspace_components.wire.html @@ -58,7 +58,7 @@

The wire component allows you to trigger an event on one entity when an event -occurs on the another entity. If no targets are selected, it will target itself.

+occurs on the another entity. If no targets are selected, it will target itself.

diff --git a/doc/index.html b/doc/index.html index e2db3a0d..08973787 100644 --- a/doc/index.html +++ b/doc/index.html @@ -23,9 +23,9 @@

altspace.js

altspace.js should be included whenever you use the SDK. It contains core utilities and APIs, and is useful both inside and outside of the client.

Many APIs are present in the client without loading altspace.js, but please still include it, as this may change in the future.

The version baked into the altspace.js script will determine which version of the entire SDK the client will provide your app. This means that if we make any breaking internal changes to things like rendering or cursor events, and you are using an older version of altspace.js, we will try to return legacy behavior appropriate to your version of altspace.js. Versioning will follow SEMVER as closely as possible. Details for each version can be found in the Release Notes.

-

Latest Version: v2.6.2 -- See Changes

+

Latest Version: v2.7.0 -- See Changes

Include the latest version of the SDK in your app with:

-

<script src="https://sdk.altvr.com/libs/altspace.js/2.6.2/altspace.min.js"></script>

+

<script src="https://sdk.altvr.com/libs/altspace.js/2.7.0/altspace.min.js"></script>

If you use npm, you can install altspace.js with:

npm install altspace

SDK Feature Overview

diff --git a/doc/js/index.html b/doc/js/index.html index 714fe6d6..c85c85ef 100644 --- a/doc/js/index.html +++ b/doc/js/index.html @@ -85,7 +85,7 @@

Quick Start

This is a fully functional example of what Three.js code <html lang=en> <head> <script src="https://cdn.rawgit.com/mrdoob/three.js/r84/build/three.js"></script> - <script src="https://sdk.altvr.com/libs/altspace.js/2.6.2/altspace.min.js"></script> + <script src="https://sdk.altvr.com/libs/altspace.js/2.7.0/altspace.min.js"></script> </head> <body> <script> diff --git a/package.json b/package.json index 8f70f07e..c21c85e1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "altspace", "author": "AltspaceVR", - "version": "2.6.2", + "version": "2.7.0", "repository": { "type": "git", "url": "git+https://github.com/AltspaceVR/AltspaceSDK.git"