From c147ad29bc17eb706d51824c8557589fe858a8b4 Mon Sep 17 00:00:00 2001 From: Kieran Farr Date: Wed, 6 Mar 2024 22:08:06 -0800 Subject: [PATCH] 0.4.11 --- dist/aframe-street-component.js | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/aframe-street-component.js b/dist/aframe-street-component.js index fed1781d8..3d62b710b 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","street-vendor"].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{"use strict";t.exports=JSON.parse('{"sidewalk":["empty","sparse","normal","dense"],"bus-lane":["inbound|colored|typical","outbound|colored|typical","inbound|regular|typical","outbound|regular|typical"],"drive-lane":["inbound|car","outbound|car","inbound|truck","outbound|truck","outbound|av","inbound|av","outbound|pedestrian","inbound|pedestrian","inbound|sharrow","outbound|sharrow"],"light-rail":["inbound|regular","inbound|colored","inbound|grass","outbound|regular","outbound|colored","outbound|grass"],"streetcar":["inbound|regular","inbound|colored","inbound|grass","outbound|regular","outbound|colored","outbound|grass"],"turn-lane":["inbound|left","inbound|right","inbound|left-right-straight","inbound|shared","inbound|both","inbound|left-straight","inbound|right-straight","inbound|straight","outbound|left","outbound|right","outbound|left-right-straight","outbound|shared","outbound|both","outbound|left-straight","outbound|right-straight","outbound|straight"],"divider":["buffer","flowers","planting-strip","planter-box","palm-tree","big-tree","bush","dome","bollard","striped-buffer"],"temporary":["barricade","traffic-cone","jersey-barrier-plastic","jersey-barrier-concrete"],"food-truck":["left","right"],"flex-zone":["taxi|inbound|right","taxi|inbound|left","taxi|outbound|right","taxi|outbound|left","rideshare|outbound|right","rideshare|outbound|right","rideshare|inbound|right","rideshare|inbound|left"],"sidewalk-wayfinding":["large"],"sidewalk-bench":["left","right","center"],"sidewalk-bike-rack":["left|sidewalk-parallel","right|sidewalk-parallel","left|sidewalk","right|sidewalk"],"magic-carpet":["aladdin"],"outdoor-dining":["empty"],"parklet":["left","right"],"bikeshare":["left|road","right|road","left|sidewalk","right|sidewalk"],"utilities":["left","right"],"sidewalk-tree":["big","palm-tree"],"sidewalk-lamp":["right|modern","both|modern","left|modern","right|traditional","both|traditional","left|traditional","right|pride","both|pride","left|pride"],"transit-shelter":["left|street-level","right|street-level","right|light-rail","left|light-rail"],"brt-station":["center"],"parking-lane":["sideways|right","sideways|left","inbound|right","inbound|left","outbound|left","outbound|right","angled-front-left|left","angled-front-right|left","angled-rear-left|left","angled-rear-right|left","angled-front-left|right","angled-front-right|right","angled-rear-left|right","angled-rear-right|right"],"bike-lane":["inbound|green|sidewalk","inbound|green|road","outbound|green|sidewalk","outbound|green|road","inbound|regular|sidewalk","inbound|regular|road","outbound|regular|sidewalk","outbound|regular|road","inbound|red|sidewalk","inbound|red|road","outbound|red|sidewalk","outbound|red|road"],"scooter":["inbound|regular","inbound|green","inbound|red","outbound|regular","outbound|green","outbound|red"]}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.nmd=t=>(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),a=i.convertStreetValues(n.data.street),o=a.segments,s=n.name;console.log("streetmixName",s),r.setAttribute("streetmix-loader","name",s),AFRAME.scenes[0]&&AFRAME.scenes[0].getAttribute("metadata")&&(t=AFRAME.scenes[0].getAttribute("metadata").sceneTitle),t||(AFRAME.scenes[0].setAttribute("metadata","sceneTitle",s),console.log("therefore setting metadata sceneTitle as streetmixName",s)),r.setAttribute("data-layer-name","Streetmix • "+s),e.showBuildings&&(r.setAttribute("street","right",a.rightBuildingVariant),r.setAttribute("street","left",a.leftBuildingVariant)),r.setAttribute("street","type","streetmixSegmentsMetric"),r.setAttribute("street","JSON",JSON.stringify({streetmixSegmentsMetric:o})),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 g={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(g).filter((function(t,e){return a[e]})).forEach((function(t,e){m(g[t])}));for(var v={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(v);y{t.exports.isSidewalk=function(t){return t.startsWith("sidewalk")||["utilities","scooter-drop-zone","bikeshare","flex-zone-curb","transit-shelter","brt-station","street-vendor"].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{"use strict";t.exports=JSON.parse('{"sidewalk":["empty","sparse","normal","dense"],"bus-lane":["inbound|colored|typical","outbound|colored|typical","inbound|regular|typical","outbound|regular|typical"],"drive-lane":["inbound|car","outbound|car","inbound|truck","outbound|truck","outbound|av","inbound|av","outbound|pedestrian","inbound|pedestrian","inbound|sharrow","outbound|sharrow"],"light-rail":["inbound|regular","inbound|colored","inbound|grass","outbound|regular","outbound|colored","outbound|grass"],"streetcar":["inbound|regular","inbound|colored","inbound|grass","outbound|regular","outbound|colored","outbound|grass"],"turn-lane":["inbound|left","inbound|right","inbound|left-right-straight","inbound|shared","inbound|both","inbound|left-straight","inbound|right-straight","inbound|straight","outbound|left","outbound|right","outbound|left-right-straight","outbound|shared","outbound|both","outbound|left-straight","outbound|right-straight","outbound|straight"],"divider":["buffer","flowers","planting-strip","planter-box","palm-tree","big-tree","bush","dome","bollard","striped-buffer"],"temporary":["barricade","traffic-cone","jersey-barrier-plastic","jersey-barrier-concrete"],"food-truck":["left","right"],"flex-zone":["taxi|inbound|right","taxi|inbound|left","taxi|outbound|right","taxi|outbound|left","rideshare|outbound|right","rideshare|outbound|right","rideshare|inbound|right","rideshare|inbound|left"],"sidewalk-wayfinding":["large"],"sidewalk-bench":["left","right","center"],"sidewalk-bike-rack":["left|sidewalk-parallel","right|sidewalk-parallel","left|sidewalk","right|sidewalk"],"magic-carpet":["aladdin"],"outdoor-dining":["empty"],"parklet":["left","right"],"bikeshare":["left|road","right|road","left|sidewalk","right|sidewalk"],"utilities":["left","right"],"sidewalk-tree":["big","palm-tree"],"sidewalk-lamp":["right|modern","both|modern","left|modern","right|traditional","both|traditional","left|traditional","right|pride","both|pride","left|pride"],"transit-shelter":["left|street-level","right|street-level","right|light-rail","left|light-rail"],"brt-station":["center"],"parking-lane":["sideways|right","sideways|left","inbound|right","inbound|left","outbound|left","outbound|right","angled-front-left|left","angled-front-right|left","angled-rear-left|left","angled-rear-right|left","angled-front-left|right","angled-front-right|right","angled-rear-left|right","angled-rear-right|right"],"bike-lane":["inbound|green|sidewalk","inbound|green|road","outbound|green|sidewalk","outbound|green|road","inbound|regular|sidewalk","inbound|regular|road","outbound|regular|sidewalk","outbound|regular|road","inbound|red|sidewalk","inbound|red|road","outbound|red|sidewalk","outbound|red|road"],"scooter":["inbound|regular","inbound|green","inbound|red","outbound|regular","outbound|green","outbound|red"]}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.nmd=t=>(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),a=i.convertStreetValues(n.data.street),o=a.segments,s=n.name;console.log("streetmixName",s),r.setAttribute("streetmix-loader","name",s),AFRAME.scenes[0]&&AFRAME.scenes[0].getAttribute("metadata")&&(t=AFRAME.scenes[0].getAttribute("metadata").sceneTitle),t||(AFRAME.scenes[0].setAttribute("metadata","sceneTitle",s),console.log("therefore setting metadata sceneTitle as streetmixName",s)),r.setAttribute("data-layer-name","Streetmix • "+s),e.showBuildings&&(r.setAttribute("street","right",a.rightBuildingVariant),r.setAttribute("street","left",a.leftBuildingVariant)),r.setAttribute("street","type","streetmixSegmentsMetric"),r.setAttribute("street","JSON",JSON.stringify({streetmixSegmentsMetric:o})),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 g={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(g).filter((function(t,e){return a[e]})).forEach((function(t,e){m(g[t])}));for(var v={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(v);y