From 3b91c883ce638aa3808db8ba1babfb6e592669c1 Mon Sep 17 00:00:00 2001 From: Kieran Farr Date: Thu, 30 Nov 2023 14:18:42 -0800 Subject: [PATCH] dist bump --- dist/aframe-street-component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/aframe-street-component.js b/dist/aframe-street-component.js index da9eec133..943a5b5a7 100644 --- a/dist/aframe-street-component.js +++ b/dist/aframe-street-component.js @@ -13,4 +13,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -var a,n=function(){return n=Object.assign||function(t){for(var e,i=1,a=arguments.length;i{t.exports.isSidewalk=function(t){return t.startsWith("sidewalk")||["utilities","scooter-drop-zone","bikeshare","flex-zone-curb","transit-shelter","brt-station"].includes(t)},t.exports.createBuildingsArray=function(){var t,e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:150,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"narrow";if("narrow"===a||"wide"===a)t=[{id:"SM3D_Bld_Mixed_4fl",width:5.251},{id:"SM3D_Bld_Mixed_Double_5fl",width:10.9041},{id:"SM3D_Bld_Mixed_4fl_2",width:5.309},{id:"SM3D_Bld_Mixed_5fl",width:5.903},{id:"SM3D_Bld_Mixed_Corner_4fl",width:5.644}],e="41431323432402434130303230234102402341";else if("residential"===a)t=[{id:"SM_Bld_House_Preset_03_1800",width:20},{id:"SM_Bld_House_Preset_08_1809",width:20},{id:"SM_Bld_House_Preset_09_1845",width:20}],e="12021201210101212021201012012021201210";else{if("arcade"!==a)return[];t=[{id:"arched-building-01",width:9.191},{id:"arched-building-02",width:11.19},{id:"arched-building-03",width:13.191},{id:"arched-building-04",width:15.191}],e="03120223130210321203123023103201232013"}for(var n=0,r=0,s=[];r{function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],a=!0,n=!1,r=void 0;try{for(var s,o=t[Symbol.iterator]();!(a=(s=o.next()).done)&&(i.push(s.value),!e||i.length!==e);a=!0);}catch(t){n=!0,r=t}finally{try{a||null==o.return||o.return()}finally{if(n)throw r}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:{},i=document.createElement(t.tag);delete t.tag;for(var a=0,n=Object.entries(t);a1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(e,i){t.appendChild(a(e))})),t}},394:t=>{t.exports.streetmixUserToAPI=function(t){var e=new URL(t).pathname.split("/"),i=e[1],a=e[2];return"-"===i?"https://streetmix.net/api/v1/streets?namespacedId="+a:"https://streetmix.net/api/v1/streets?namespacedId="+a+"&creatorId="+i},t.exports.pathStartsWithAPI=function(t){var e=document.createElement("a");return e.href=t,"api"===e.pathname.split("/")[1]},t.exports.streetmixAPIToUser=function(t){function e(t,e){for(var i=t.split("&"),a=0;a(t.paths=[],t.children||(t.children=[]),t);return(()=>{function t(t,i){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],a=!0,n=!1,r=void 0;try{for(var s,o=t[Symbol.iterator]();!(a=(s=o.next()).done)&&(i.push(s.value),!e||i.length!==e);a=!0);}catch(t){n=!0,r=t}finally{try{a||null==o.return||o.return()}finally{if(n)throw r}}return i}(t,i)||function(t,i){if(!t)return;if("string"==typeof t)return e(t,i);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return e(t,i)}(t,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i=200&&this.status<400){var t,a=JSON.parse(this.response),n=a.data.street.segments,r=a.name;console.log("streetmixName",r),i.setAttribute("streetmix-loader","name",r),AFRAME.scenes[0]&&AFRAME.scenes[0].getAttribute("metadata")&&(t=AFRAME.scenes[0].getAttribute("metadata").sceneTitle),t||(AFRAME.scenes[0].setAttribute("metadata","sceneTitle",r),console.log("therefore setting metadata sceneTitle as streetmixName",r)),i.setAttribute("data-layer-name","Streetmix: "+r),e.showBuildings&&(i.setAttribute("street","right",a.data.street.rightBuildingVariant),i.setAttribute("street","left",a.data.street.leftBuildingVariant)),i.setAttribute("street","type","streetmixSegmentsFeet"),i.setAttribute("street","JSON",JSON.stringify({streetmixSegmentsFeet:n})),i.emit("streetmix-loader-street-loaded")}else console.log("[streetmix-loader]","Loading Error: We reached the target server, but it returned an error")},a.onerror=function(){console.log("[streetmix-loader]","Loading Error: There was a connection error of some sort")},a.send()}else{if(e.streetmixStreetURL.length>0){var r=n.streetmixUserToAPI(e.streetmixStreetURL);return console.log("[streetmix-loader]","setting `streetmixAPIURL` to",r),void i.setAttribute("streetmix-loader","streetmixAPIURL",r)}console.log("[streetmix-loader]","Neither `streetmixAPIURL` nor `streetmixStreetURL` properties provided, please provide at least one.")}}}),AFRAME.registerComponent("intersection",{schema:{dimensions:{type:"string",default:"20 20"},sidewalk:{type:"string",default:"0 0 0 0"},northeastcurb:{type:"string",default:"0 0"},southwestcurb:{type:"string",default:"0 0"},southeastcurb:{type:"string",default:"0 0"},northwestcurb:{type:"string",default:"0 0"},stopsign:{type:"string",default:"0 0 0 0"},trafficsignal:{type:"string",default:"0 0 0 0"},crosswalk:{type:"string",default:"0 0 0 0"}},init:function(){for(var e=this.data,i=this.el;i.firstChild;)i.removeChild(i.lastChild);var a=e.dimensions.split(" ").map((function(t){return Number(t)})),n=[this.el.getAttribute("position").x,this.el.getAttribute("position").y,this.el.getAttribute("position").z],r=e.sidewalk.split(" ").map((function(t){return Number(t)})),s=e.northeastcurb.split(" ").map((function(t){return Number(t)})),o=e.southwestcurb.split(" ").map((function(t){return Number(t)})),l=e.southeastcurb.split(" ").map((function(t){return Number(t)})),c=e.northwestcurb.split(" ").map((function(t){return Number(t)})),d=e.stopsign.split(" ").map((function(t){return Number(t)})),u=e.trafficsignal.split(" ").map((function(t){return Number(t)})),m=e.crosswalk.split(" ").map((function(t){return Number(t)})),p=a[0],h=a[1];function f(t){var e=t.length,a=t.width,n=t.positionVec,r=t.scaleVec,s=void 0===r?{x:1,y:1,z:1}:r,o=t.rotationVec,l=document.createElement("a-entity"),c=[];c[0]=a/2,c[1]=parseInt(e/2),l.setAttribute("geometry","primitive","box"),l.setAttribute("geometry","height: 0.4"),l.setAttribute("position",n),l.setAttribute("scale",s),l.setAttribute("geometry","depth",e),l.setAttribute("geometry","width",a),l.setAttribute("rotation",o),l.setAttribute("mixin","sidewalk"),l.setAttribute("material","repeat: ".concat(c[0]," ").concat(c[1])),i.appendChild(l)}this.el.setAttribute("geometry","primitive:box; width: ".concat(p,"; height: ").concat(h,"; depth:0.2")),this.el.setAttribute("position",{x:n[0],y:-.1,z:n[2]}),this.el.setAttribute("rotation","-90 0 0"),this.el.setAttribute("material","src: #asphalt-texture; repeat:5 5; roughness:1");var g={west:{positionVec:{x:p/2-r[0]/2,z:.1},rotationVec:{x:90,y:0,z:0},length:h,width:r[0]},east:{positionVec:{x:-p/2+r[1]/2,z:.1},rotationVec:{x:90,y:0,z:0},length:h,width:r[1]},north:{positionVec:{y:-h/2+r[2]/2,x:r[1]/2-r[0]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:p-r[1]-r[0],width:r[2]},south:{positionVec:{y:h/2-r[3]/2,x:r[1]/2-r[0]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:p-r[1]-r[0],width:r[3]}};Object.keys(g).filter((function(t,e){return r[e]})).forEach((function(t,e){f(g[t])}));for(var y={northeast:{positionVec:{x:p/2-s[0]/2,y:h/2-s[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:s[0],width:s[1]},southwest:{positionVec:{x:-p/2+o[0]/2,y:-h/2+o[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:o[0],width:o[1]},southeast:{positionVec:{x:p/2-l[0]/2,y:-h/2+l[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:l[0],width:l[1]},northwest:{positionVec:{x:-p/2+c[0]/2,y:h/2-c[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:c[0],width:c[1]}},b=0,x=Object.entries(y);b{t.exports.isSidewalk=function(t){return t.startsWith("sidewalk")||["utilities","scooter-drop-zone","bikeshare","flex-zone-curb","transit-shelter","brt-station"].includes(t)},t.exports.createBuildingsArray=function(){var t,e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:150,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"narrow";if("narrow"===a||"wide"===a)t=[{id:"SM3D_Bld_Mixed_4fl",width:5.251},{id:"SM3D_Bld_Mixed_Double_5fl",width:10.9041},{id:"SM3D_Bld_Mixed_4fl_2",width:5.309},{id:"SM3D_Bld_Mixed_5fl",width:5.903},{id:"SM3D_Bld_Mixed_Corner_4fl",width:5.644}],e="41431323432402434130303230234102402341";else if("residential"===a)t=[{id:"SM_Bld_House_Preset_03_1800",width:20},{id:"SM_Bld_House_Preset_08_1809",width:20},{id:"SM_Bld_House_Preset_09_1845",width:20}],e="12021201210101212021201012012021201210";else{if("arcade"!==a)return[];t=[{id:"arched-building-01",width:9.191},{id:"arched-building-02",width:11.19},{id:"arched-building-03",width:13.191},{id:"arched-building-04",width:15.191}],e="03120223130210321203123023103201232013"}for(var n=0,r=0,s=[];r{function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],a=!0,n=!1,r=void 0;try{for(var s,o=t[Symbol.iterator]();!(a=(s=o.next()).done)&&(i.push(s.value),!e||i.length!==e);a=!0);}catch(t){n=!0,r=t}finally{try{a||null==o.return||o.return()}finally{if(n)throw r}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:{},i=document.createElement(t.tag);delete t.tag;for(var a=0,n=Object.entries(t);a1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(e,i){t.appendChild(a(e))})),t}},394:t=>{t.exports.streetmixUserToAPI=function(t){var e=new URL(t).pathname.split("/"),i=e[1],a=e[2];return"-"===i?"https://streetmix.net/api/v1/streets?namespacedId="+a:"https://streetmix.net/api/v1/streets?namespacedId="+a+"&creatorId="+i},t.exports.pathStartsWithAPI=function(t){var e=document.createElement("a");return e.href=t,"api"===e.pathname.split("/")[1]},t.exports.streetmixAPIToUser=function(t){function e(t,e){for(var i=t.split("&"),a=0;a(t.paths=[],t.children||(t.children=[]),t);return(()=>{function t(t,i){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],a=!0,n=!1,r=void 0;try{for(var s,o=t[Symbol.iterator]();!(a=(s=o.next()).done)&&(i.push(s.value),!e||i.length!==e);a=!0);}catch(t){n=!0,r=t}finally{try{a||null==o.return||o.return()}finally{if(n)throw r}}return i}(t,i)||function(t,i){if(!t)return;if("string"==typeof t)return e(t,i);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return e(t,i)}(t,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i=200&&this.status<400){var t,a=JSON.parse(this.response),n=a.data.street.segments,r=a.name;console.log("streetmixName",r),i.setAttribute("streetmix-loader","name",r),AFRAME.scenes[0]&&AFRAME.scenes[0].getAttribute("metadata")&&(t=AFRAME.scenes[0].getAttribute("metadata").sceneTitle),t||(AFRAME.scenes[0].setAttribute("metadata","sceneTitle",r),console.log("therefore setting metadata sceneTitle as streetmixName",r)),i.setAttribute("data-layer-name","Streetmix: "+r),e.showBuildings&&(i.setAttribute("street","right",a.data.street.rightBuildingVariant),i.setAttribute("street","left",a.data.street.leftBuildingVariant)),i.setAttribute("street","type","streetmixSegmentsFeet"),i.setAttribute("street","JSON",JSON.stringify({streetmixSegmentsFeet:n})),i.emit("streetmix-loader-street-loaded")}else console.log("[streetmix-loader]","Loading Error: We reached the target server, but it returned an error")},a.onerror=function(){console.log("[streetmix-loader]","Loading Error: There was a connection error of some sort")},a.send()}else{if(e.streetmixStreetURL.length>0){var r=n.streetmixUserToAPI(e.streetmixStreetURL);return console.log("[streetmix-loader]","setting `streetmixAPIURL` to",r),void i.setAttribute("streetmix-loader","streetmixAPIURL",r)}console.log("[streetmix-loader]","Neither `streetmixAPIURL` nor `streetmixStreetURL` properties provided, please provide at least one.")}}}),AFRAME.registerComponent("intersection",{schema:{dimensions:{type:"string",default:"20 20"},sidewalk:{type:"string",default:"0 0 0 0"},northeastcurb:{type:"string",default:"0 0"},southwestcurb:{type:"string",default:"0 0"},southeastcurb:{type:"string",default:"0 0"},northwestcurb:{type:"string",default:"0 0"},stopsign:{type:"string",default:"0 0 0 0"},trafficsignal:{type:"string",default:"0 0 0 0"},crosswalk:{type:"string",default:"0 0 0 0"}},init:function(){for(var e=this.data,i=this.el;i.firstChild;)i.removeChild(i.lastChild);var a=e.dimensions.split(" ").map((function(t){return Number(t)})),n=[this.el.getAttribute("position").x,this.el.getAttribute("position").y,this.el.getAttribute("position").z],r=e.sidewalk.split(" ").map((function(t){return Number(t)})),s=e.northeastcurb.split(" ").map((function(t){return Number(t)})),o=e.southwestcurb.split(" ").map((function(t){return Number(t)})),l=e.southeastcurb.split(" ").map((function(t){return Number(t)})),c=e.northwestcurb.split(" ").map((function(t){return Number(t)})),d=e.stopsign.split(" ").map((function(t){return Number(t)})),u=e.trafficsignal.split(" ").map((function(t){return Number(t)})),m=e.crosswalk.split(" ").map((function(t){return Number(t)})),p=a[0],h=a[1];function f(t){var e=t.length,a=t.width,n=t.positionVec,r=t.scaleVec,s=void 0===r?{x:1,y:1,z:1}:r,o=t.rotationVec,l=document.createElement("a-entity"),c=[];c[0]=a/2,c[1]=parseInt(e/2),l.setAttribute("geometry","primitive","box"),l.setAttribute("geometry","height: 0.4"),l.setAttribute("position",n),l.setAttribute("scale",s),l.setAttribute("geometry","depth",e),l.setAttribute("geometry","width",a),l.setAttribute("rotation",o),l.setAttribute("mixin","sidewalk"),l.setAttribute("material","repeat: ".concat(c[0]," ").concat(c[1])),i.appendChild(l)}this.el.setAttribute("geometry","primitive:box; width: ".concat(p,"; height: ").concat(h,"; depth:0.2")),this.el.setAttribute("position",{x:n[0],y:-.1,z:n[2]}),this.el.setAttribute("rotation","-90 0 0"),this.el.setAttribute("material","src: #asphalt-texture; repeat:5 5; roughness:1");var g={west:{positionVec:{x:p/2-r[0]/2,z:.1},rotationVec:{x:90,y:0,z:0},length:h,width:r[0]},east:{positionVec:{x:-p/2+r[1]/2,z:.1},rotationVec:{x:90,y:0,z:0},length:h,width:r[1]},north:{positionVec:{y:-h/2+r[2]/2,x:r[1]/2-r[0]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:p-r[1]-r[0],width:r[2]},south:{positionVec:{y:h/2-r[3]/2,x:r[1]/2-r[0]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:p-r[1]-r[0],width:r[3]}};Object.keys(g).filter((function(t,e){return r[e]})).forEach((function(t,e){f(g[t])}));for(var y={northeast:{positionVec:{x:p/2-s[0]/2,y:h/2-s[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:s[0],width:s[1]},southwest:{positionVec:{x:-p/2+o[0]/2,y:-h/2+o[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:o[0],width:o[1]},southeast:{positionVec:{x:p/2-l[0]/2,y:-h/2+l[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:l[0],width:l[1]},northwest:{positionVec:{x:-p/2+c[0]/2,y:h/2-c[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:c[0],width:c[1]}},b=0,x=Object.entries(y);b