From a86207dd89af130efb4d900f0e3e725d2e4acd3d Mon Sep 17 00:00:00 2001 From: Kieran Farr Date: Mon, 26 Feb 2024 21:56:50 -0800 Subject: [PATCH] remove date and hash from console log close #484 --- dist/aframe-street-component.js | 2 +- src/index.js | 2 +- webpack.config.js | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/dist/aframe-street-component.js b/dist/aframe-street-component.js index 67d0541d1..ea9d6559b 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 n,i=function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r{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,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:150,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"narrow";if("narrow"===n||"wide"===n)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"===n)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"!==n)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 i=0,a=0,o=[];a{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 r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(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 r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{},r=document.createElement(t.tag);delete t.tag;for(var n=0,i=Object.entries(t);n1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(e,r){t.appendChild(n(e))})),t}},5394:t=>{t.exports.streetmixUserToAPI=function(t){var e=new URL(t).pathname.split("/"),r=e[1],n=e[2];return"-"===r?"https://streetmix.net/api/v1/streets?namespacedId="+n:"https://streetmix.net/api/v1/streets?namespacedId="+n+"&creatorId="+r},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 r=t.split("&"),n=0;n(t.paths=[],t.children||(t.children=[]),t);return(()=>{function t(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(t,r)||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 r=0,n=new Array(e);r=200&&this.status<400){var t,n=JSON.parse(this.response),i=n.data.street.segments,a=n.name;console.log("streetmixName",a),r.setAttribute("streetmix-loader","name",a),AFRAME.scenes[0]&&AFRAME.scenes[0].getAttribute("metadata")&&(t=AFRAME.scenes[0].getAttribute("metadata").sceneTitle),t||(AFRAME.scenes[0].setAttribute("metadata","sceneTitle",a),console.log("therefore setting metadata sceneTitle as streetmixName",a)),r.setAttribute("data-layer-name","Streetmix • "+a),e.showBuildings&&(r.setAttribute("street","right",n.data.street.rightBuildingVariant),r.setAttribute("street","left",n.data.street.leftBuildingVariant)),r.setAttribute("street","type","streetmixSegmentsFeet"),r.setAttribute("street","JSON",JSON.stringify({streetmixSegmentsFeet:i})),r.emit("streetmix-loader-street-loaded")}else console.log("[streetmix-loader]","Loading Error: We reached the target server, but it returned an error")},n.onerror=function(){console.log("[streetmix-loader]","Loading Error: There was a connection error of some sort")},n.send()}else{if(e.streetmixStreetURL.length>0){var a=i.streetmixUserToAPI(e.streetmixStreetURL);return console.log("[streetmix-loader]","setting `streetmixAPIURL` to",a),void r.setAttribute("streetmix-loader","streetmixAPIURL",a)}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,r=this.el;r.firstChild;)r.removeChild(r.lastChild);var n=e.dimensions.split(" ").map((function(t){return Number(t)})),i=[this.el.getAttribute("position").x,this.el.getAttribute("position").y,this.el.getAttribute("position").z],a=e.sidewalk.split(" ").map((function(t){return Number(t)})),o=e.northeastcurb.split(" ").map((function(t){return Number(t)})),s=e.southwestcurb.split(" ").map((function(t){return Number(t)})),c=e.southeastcurb.split(" ").map((function(t){return Number(t)})),u=e.northwestcurb.split(" ").map((function(t){return Number(t)})),l=e.stopsign.split(" ").map((function(t){return Number(t)})),f=e.trafficsignal.split(" ").map((function(t){return Number(t)})),d=e.crosswalk.split(" ").map((function(t){return Number(t)})),h=n[0],p=n[1];function m(t){var e=t.length,n=t.width,i=t.positionVec,a=t.scaleVec,o=void 0===a?{x:1,y:1,z:1}:a,s=t.rotationVec,c=document.createElement("a-entity"),u=[];u[0]=n/2,u[1]=parseInt(e/2),c.setAttribute("geometry","primitive","box"),c.setAttribute("geometry","height: 0.4"),c.setAttribute("position",i),c.setAttribute("scale",o),c.setAttribute("geometry","depth",e),c.setAttribute("geometry","width",n),c.setAttribute("rotation",s),c.setAttribute("mixin","sidewalk"),c.setAttribute("material","repeat: ".concat(u[0]," ").concat(u[1])),r.appendChild(c)}this.el.setAttribute("geometry","primitive:box; width: ".concat(h,"; height: ").concat(p,"; depth:0.2")),this.el.setAttribute("position",{x:i[0],y:-.1,z:i[2]}),this.el.setAttribute("rotation","-90 0 0"),this.el.setAttribute("material","src: #asphalt-texture; repeat:5 5; roughness:1");var v={west:{positionVec:{x:h/2-a[0]/2,z:.1},rotationVec:{x:90,y:0,z:0},length:p,width:a[0]},east:{positionVec:{x:-h/2+a[1]/2,z:.1},rotationVec:{x:90,y:0,z:0},length:p,width:a[1]},north:{positionVec:{y:-p/2+a[2]/2,x:a[1]/2-a[0]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:h-a[1]-a[0],width:a[2]},south:{positionVec:{y:p/2-a[3]/2,x:a[1]/2-a[0]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:h-a[1]-a[0],width:a[3]}};Object.keys(v).filter((function(t,e){return a[e]})).forEach((function(t,e){m(v[t])}));for(var g={northeast:{positionVec:{x:h/2-o[0]/2,y:p/2-o[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:o[0],width:o[1]},southwest:{positionVec:{x:-h/2+s[0]/2,y:-p/2+s[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:s[0],width:s[1]},southeast:{positionVec:{x:h/2-c[0]/2,y:-p/2+c[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:c[0],width:c[1]},northwest:{positionVec:{x:-h/2+u[0]/2,y:p/2-u[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:u[0],width:u[1]}},y=0,b=Object.entries(g);y{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,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:150,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"narrow";if("narrow"===n||"wide"===n)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"===n)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"!==n)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 i=0,a=0,o=[];a{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 r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(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 r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{},r=document.createElement(t.tag);delete t.tag;for(var n=0,i=Object.entries(t);n1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(e,r){t.appendChild(n(e))})),t}},5394:t=>{t.exports.streetmixUserToAPI=function(t){var e=new URL(t).pathname.split("/"),r=e[1],n=e[2];return"-"===r?"https://streetmix.net/api/v1/streets?namespacedId="+n:"https://streetmix.net/api/v1/streets?namespacedId="+n+"&creatorId="+r},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 r=t.split("&"),n=0;n(t.paths=[],t.children||(t.children=[]),t);return(()=>{function t(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(t,r)||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 r=0,n=new Array(e);r=200&&this.status<400){var t,n=JSON.parse(this.response),i=n.data.street.segments,a=n.name;console.log("streetmixName",a),r.setAttribute("streetmix-loader","name",a),AFRAME.scenes[0]&&AFRAME.scenes[0].getAttribute("metadata")&&(t=AFRAME.scenes[0].getAttribute("metadata").sceneTitle),t||(AFRAME.scenes[0].setAttribute("metadata","sceneTitle",a),console.log("therefore setting metadata sceneTitle as streetmixName",a)),r.setAttribute("data-layer-name","Streetmix • "+a),e.showBuildings&&(r.setAttribute("street","right",n.data.street.rightBuildingVariant),r.setAttribute("street","left",n.data.street.leftBuildingVariant)),r.setAttribute("street","type","streetmixSegmentsFeet"),r.setAttribute("street","JSON",JSON.stringify({streetmixSegmentsFeet:i})),r.emit("streetmix-loader-street-loaded")}else console.log("[streetmix-loader]","Loading Error: We reached the target server, but it returned an error")},n.onerror=function(){console.log("[streetmix-loader]","Loading Error: There was a connection error of some sort")},n.send()}else{if(e.streetmixStreetURL.length>0){var a=i.streetmixUserToAPI(e.streetmixStreetURL);return console.log("[streetmix-loader]","setting `streetmixAPIURL` to",a),void r.setAttribute("streetmix-loader","streetmixAPIURL",a)}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,r=this.el;r.firstChild;)r.removeChild(r.lastChild);var n=e.dimensions.split(" ").map((function(t){return Number(t)})),i=[this.el.getAttribute("position").x,this.el.getAttribute("position").y,this.el.getAttribute("position").z],a=e.sidewalk.split(" ").map((function(t){return Number(t)})),o=e.northeastcurb.split(" ").map((function(t){return Number(t)})),s=e.southwestcurb.split(" ").map((function(t){return Number(t)})),c=e.southeastcurb.split(" ").map((function(t){return Number(t)})),u=e.northwestcurb.split(" ").map((function(t){return Number(t)})),l=e.stopsign.split(" ").map((function(t){return Number(t)})),f=e.trafficsignal.split(" ").map((function(t){return Number(t)})),d=e.crosswalk.split(" ").map((function(t){return Number(t)})),h=n[0],p=n[1];function m(t){var e=t.length,n=t.width,i=t.positionVec,a=t.scaleVec,o=void 0===a?{x:1,y:1,z:1}:a,s=t.rotationVec,c=document.createElement("a-entity"),u=[];u[0]=n/2,u[1]=parseInt(e/2),c.setAttribute("geometry","primitive","box"),c.setAttribute("geometry","height: 0.4"),c.setAttribute("position",i),c.setAttribute("scale",o),c.setAttribute("geometry","depth",e),c.setAttribute("geometry","width",n),c.setAttribute("rotation",s),c.setAttribute("mixin","sidewalk"),c.setAttribute("material","repeat: ".concat(u[0]," ").concat(u[1])),r.appendChild(c)}this.el.setAttribute("geometry","primitive:box; width: ".concat(h,"; height: ").concat(p,"; depth:0.2")),this.el.setAttribute("position",{x:i[0],y:-.1,z:i[2]}),this.el.setAttribute("rotation","-90 0 0"),this.el.setAttribute("material","src: #asphalt-texture; repeat:5 5; roughness:1");var v={west:{positionVec:{x:h/2-a[0]/2,z:.1},rotationVec:{x:90,y:0,z:0},length:p,width:a[0]},east:{positionVec:{x:-h/2+a[1]/2,z:.1},rotationVec:{x:90,y:0,z:0},length:p,width:a[1]},north:{positionVec:{y:-p/2+a[2]/2,x:a[1]/2-a[0]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:h-a[1]-a[0],width:a[2]},south:{positionVec:{y:p/2-a[3]/2,x:a[1]/2-a[0]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:h-a[1]-a[0],width:a[3]}};Object.keys(v).filter((function(t,e){return a[e]})).forEach((function(t,e){m(v[t])}));for(var g={northeast:{positionVec:{x:h/2-o[0]/2,y:p/2-o[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:o[0],width:o[1]},southwest:{positionVec:{x:-h/2+s[0]/2,y:-p/2+s[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:s[0],width:s[1]},southeast:{positionVec:{x:h/2-c[0]/2,y:-p/2+c[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:c[0],width:c[1]},northwest:{positionVec:{x:-h/2+u[0]/2,y:p/2-u[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:u[0],width:u[1]}},y=0,b=Object.entries(g);y