|
-
-
- function makeBuilding(name, height, image) {
- views = {
- building: {
- attributes: {
- height: {
- name: "Height",
- power: 1,
- type: "length",
- base: height
- }
- },
- image: image,
- name: "building"
- },
- };
-
- return makeEntity({ name: name }, views);
- }
-
-
- function makeSkyscraper(name, image) {
- views = {
- building: {
- attributes: {
- height: {
- name: "Height",
- power: 1,
- type: "length",
- base: math.unit(1, "meter")
- }
- },
- image: image,
- name: "building"
- },
- };
-
- const sizes = [];
-
- sizes.push({
- name: "Short",
- height: math.unit(15, "stories")
- });
- sizes.push({
- name: "Medium",
- height: math.unit(40, "stories"),
- default: true
- });
- sizes.push({
- name: "Supertall",
- height: math.unit(350, "meters")
- });
- sizes.push({
- name: "Megatall",
- height: math.unit(650, "meters")
- });
-
- const entity = makeEntity({ name: name }, views, sizes);
-
- return entity;
- }
-
- function makeBuildings() {
- const results = [];
-
- results.push({
- name: "Two-Story Home",
- constructor: () => makeBuilding(
- "Two-Story Home",
- math.unit(25, "feet"),
- { source: "./media/buildings/house.svg" }
- )
- });
-
- results.push({
- name: "Mobile Home",
- constructor: () => makeBuilding(
- "Mobile Home",
- math.unit(10, "feet"),
- { source: "./media/buildings/mobile-home.svg" }
- )
- });
-
- results.push({
- name: "Mailbox",
- constructor: () => makeBuilding(
- "Mailbox",
- math.unit(5.1, "feet"),
- { source: "./media/buildings/mailbox.svg" }
- )
- });
-
- results.push({
- name: "Bus Stop",
- constructor: () => makeBuilding(
- "Bus Stop",
- math.unit(8, "feet"),
- { source: "./media/buildings/bus-stop.svg" }
- )
- });
-
- results.push(
- {
- name: "Wide Skyscraper",
- constructor: () => makeSkyscraper(
- "Wide Skyscraper",
- { source: "./media/buildings/skyscrapers/wide.svg" }
- )
- }
- );
-
- results.push(
- {
- name: "Skyscraper",
- constructor: () => makeSkyscraper(
- "Skyscraper",
- { source: "./media/buildings/skyscrapers/medium.svg" }
- )
- }
- );
-
- results.push(
- {
- name: "Slender Skyscraper",
- constructor: () => makeSkyscraper(
- "Slender Skyscraper",
- { source: "./media/buildings/skyscrapers/slender.svg" }
- )
- }
- );
-
- results.push(
- {
- name: "Narrow Skyscraper",
- constructor: () => makeSkyscraper(
- "Narrow Skyscraper",
- { source: "./media/buildings/skyscrapers/narrow.svg" }
- )
- }
- );
-
- results.push(
- makeHeight(
- [
- ["four-lane-highway", 27.432, "meters"],
- ["sidewalk", 24, "feet"]
- ],
- "Roads",
- "",
- "buildings"
- )
- )
-
- results.push(
- makeHeight(
- [
- ["compact-parking-space", 16 + 4/12, "feet"],
- ["crosswalk", 26.25, "feet"],
- ["line", 26.25, "feet"],
- ["broken-line", 50, "feet"],
- ["dotted-line", 39, "feet"],
- ],
- "Road Markings",
- "",
- "buildings"
- )
- )
-
- results.push(
- makeHeight(
- [
- ["residential", 12, "feet"],
- ["freeway", 50, "feet"]
- ],
- "Street Lamps",
- "",
- "buildings"
- )
- )
-
- results.push(
- makeHeight(
- [
- ["badminton-court", 13.4, "meters"],
- ["basketball-court", 28, "meters"],
- ["bocce-court", 27.5, "meters"],
- ["bowling-lane", 23.8, "meters"],
- ["football-field", 160, "feet"],
- ["ice-hockey", 30, "meters"],
- ["netball-court", 30.5, "meters"],
- ["olympic-swimming-pool", 25, "meters"],
- ["snooker-table", 3.7, "meters"],
- ["squash-court", 9.8, "meters"],
- ["table-tennis", 2.79, "meters"],
- ["tennis-court", 23.8, "meters"],
- ["volleyball-court", 21.6, "meters"],
- ],
- "Sports Fields",
- "",
- "buildings"
- )
- )
-
- results.push(
- makeHeight(
- [
- ["small", 51.8, "meters"],
- ["medium", 108.1, "meters"],
- ["large", 141.7, "meters"],
- ["extra-large", 190.2, "meters"]
- ],
- "Wind Turbines",
- "",
- "buildings"
- )
- )
-
- results.push({
- name: "Gas Station",
- constructor: () => makeBuilding(
- "Gas Station",
- math.unit(6.78, "meters"),
- { source: "./media/buildings/gas-station.svg" }
- )
- });
-
- results.push({
- name: "Staircase",
- constructor: () => makeBuilding(
- "Staircase",
- math.unit(12.956, "feet"),
- { source: "./media/buildings/staircase.svg" }
- )
- });
-
- results.push(
- makeHeight(
- [
- ["residential", 83, "inches"],
- ["garage-door", 7.5, "feet"],
- ["double-garage-door", 7.5, "feet"],
- ["small-private-hangar", 10.5, "feet"],
- ],
- "Doorways",
- "",
- "buildings"
- )
- )
-
- results.push(
- makeHeight(
- [
- ["akashi-kaikyō-bridge", 283, "meters"],
- ["chaotianmen-bridge", 160, "meters"],
- ["forth-bridge", 100, "meters"],
- ["golden-gate-bridge", 230, "meters"],
- ["millau-viaduct", 421, "meters"],
- ["rialto-bridge", 17, "meters"],
- ["russky-bridge", 306, "meters"],
- ["sydney-harbour-bridge", 129, "meters"],
- ["tower-bridge", 65, "meters"],
- ["trajan's-bridge", 40, "meters"],
- ],
- "Bridges",
- "",
- "buildings"
- )
- )
-
- results.push(
- makeHeight(
- [
- ["channel-tunnel", 6.23, "meters"],
- ["crossrail", 5.08, "meters"],
- ["victoria-line", 3.24, "meters"],
- ],
- "Tunnels",
- "",
- "buildings"
- ),
- )
-
- const dataHouses = [
- {
- name: "Shotgun House",
- sides: {
- "Front": { height: math.unit(3.968526840209961, "meters") },
- "Angled": { height: math.unit(3.968526840209961, "meters") },
- "Side": { height: math.unit(3.968526840209961, "meters") },
- "Top": { height: math.unit(9.709759712219238, "meters") },
- }
- },
- {
- name: "Two-Story House",
- sides: {
- "Front": { height: math.unit(8.241991996765137, "meters") },
- "Angled": { height: math.unit(8.241991996765137, "meters") },
- "Side": { height: math.unit(8.241991996765137, "meters") },
- "Top": { height: math.unit(6.589994430541992, "meters") },
- }
- },
- {
- name: "Groverhaus",
- sides: {
- "Front": { height: math.unit(7.607376575469971, "meters") },
- "Angled": { height: math.unit(7.607376575469971, "meters") },
- "Side": { height: math.unit(7.607376575469971, "meters") },
- "Top": { height: math.unit(15.512463569641113, "meters") },
- }
- }
-
- ]
-
- const dataRooms = [
- {
- name: "Kitchen",
- sides: {
- "Front": { height: math.unit(2.621997833251953, "meters") },
- "Top": { height: math.unit(2.6049766540527344, "meters") }
- }
- }
- ]
-
- results.push({
- name: "Houses",
- constructor: () => makeAutoVehicleGroup(
- dataHouses,
- "Houses",
- "buildings"
- )
- })
-
- results.push({
- name: "Rooms",
- constructor: () => makeAutoVehicleGroup(
- dataRooms,
- "Rooms",
- "buildings"
- )
- })
-
- /* ***Billboards*** */ results.push(makeModel({"name": "Billboards", "kind": "buildings", "forms": [{"name": "Bulletin 14x48", "views": [{"name": "Front", "height": 4.267199993133545}]}, {"name": "Mounted Bulletin", "views": [{"name": "Front", "height": 14.325600624084473}, {"name": "Angled", "height": 14.325600624084473}, {"name": "Side", "height": 14.325600624084473}, {"name": "Back", "height": 14.325600624084473}, {"name": "Top", "height": 8.992412567138672}]}, {"name": "Bulletin 10.5x36", "views": [{"name": "Front", "height": 3.2004001140594482}]}, {"name": "Bulletin 10x40", "views": [{"name": "Front", "height": 3.0480000972747803}]}, {"name": "Poster", "views": [{"name": "Front", "height": 3.174999952316284}]}, {"name": "Junior Poster", "views": [{"name": "Front", "height": 1.8287999629974365}]}]}));
- /* ***Utility Poles*** */ results.push(makeModel({"name": "Utility Poles", "kind": "buildings", "forms": [{"name": "Utility Pole", "views": [{"name": "Front", "height": 10.825987815856934, "extra": 1.0017812424969987, "bottom": 0.001774919373365673}, {"name": "Angled", "height": 10.825987815856934, "extra": 1.0016084333733493, "bottom": 0.0016032758485862602}, {"name": "Side", "height": 10.825987815856934, "extra": 1.0016086734693879, "bottom": 0.001603514407218507}, {"name": "Top", "height": 0.7558963298797607, "extra": 1.008390140625, "bottom": 0.00825167519445341}]}]}));
- /* ***Transmission Towers*** */ results.push(makeModel({"name": "Transmission Towers", "kind": "buildings", "forms": [{"name": "Lattice Tower", "views": [{"name": "Front", "height": 46.617923736572266, "extra": 1.0011498212012875, "bottom": 0.0011471830904092298}, {"name": "Angled", "height": 46.617923736572266, "extra": 1.0010523109243699, "bottom": 0.0010501008591581864}, {"name": "Side", "height": 46.617923736572266, "extra": 1.001149673061723, "bottom": 0.0011470356297943348}, {"name": "Top", "height": 8.258213996887207, "extra": 1.0025463078703705, "bottom": 0.0025334062060477845}]}, {"name": "Concrete Tower", "views": [{"name": "Front", "height": 24.613733291625977, "extra": 1.0011611044417765, "bottom": 0.0011584143616551604}, {"name": "Angled", "height": 24.613733291625977, "extra": 1.0011987954902433, "bottom": 0.0011959281437125874}, {"name": "Side", "height": 24.613733291625977, "extra": 1.0012004801920769, "bottom": 0.0011976047904191617}, {"name": "Top", "height": 2.0, "extra": 1.0047247101394032, "bottom": 0.004680482295089333}]}]}));
- /* ***Fences*** */ results.push(makeModel({"name": "Fences", "kind": "buildings", "forms": [{"name": "Picket", "views": [{"name": "Front", "height": 1.198826789855957, "extra": 1.0032463354037267, "bottom": 0.003225393982374819}, {"name": "Angled", "height": 1.198826789855957, "extra": 1.0030113600426571, "bottom": 0.0029933320416477963}, {"name": "Corner", "height": 1.198826789855957, "extra": 1.0043504818571962, "bottom": 0.004312954992306321}, {"name": "Side", "height": 1.198826789855957, "extra": 1.0012004801920769, "bottom": 0.0011976047904191617}, {"name": "Top", "height": 0.12314067780971527, "extra": 1.0294348106917595, "bottom": 0.027798333333333345}]}, {"name": "Wrought Iron", "views": [{"name": "Front", "height": 0.9687931537628174, "extra": 1.0031269052863436, "bottom": 0.003107471746679822}, {"name": "Angled", "height": 0.9687931537628174, "extra": 1.0039823942771011, "bottom": 0.003950925987021264}, {"name": "Corner", "height": 0.9687931537628174, "extra": 1.0022842993630574, "bottom": 0.002273910777177546}, {"name": "Side", "height": 0.9687931537628174, "extra": 1.0009630172676205, "bottom": 0.0009611660286552252}, {"name": "Top", "height": 0.07901737093925476, "extra": 1.0543478819116272, "bottom": 0.049019653258358886}]}]}));
- /* ***Doors*** */ results.push(makeModel({"name": "Doors", "kind": "buildings", "forms": [{"name": "6 Panel Door", "views": [{"name": "Front", "height": 2.0320000648498535, "mass": 11.793399810791016}, {"name": "Angled", "height": 2.0320000648498535, "mass": 11.793399810791016}, {"name": "Side", "height": 2.0320000648498535, "mass": 11.793399810791016}, {"name": "Top", "height": 0.03492499887943268, "mass": 11.793399810791016}]}, {"name": "French Door", "views": [{"name": "Front", "height": 2.0320000648498535, "mass": 31.75149917602539}, {"name": "Angled", "height": 2.0320000648498535, "mass": 31.75149917602539}, {"name": "Side", "height": 2.0320000648498535, "mass": 31.75149917602539}, {"name": "Top", "height": 0.03492499887943268, "mass": 31.75149917602539}]}, {"name": "Fire Door", "views": [{"name": "Front", "height": 2.0320000648498535, "mass": 54.54545593261719}, {"name": "Angled", "height": 2.0320000648498535, "mass": 54.54545593261719}, {"name": "Side", "height": 2.0320000648498535, "mass": 54.54545593261719}, {"name": "Top", "height": 0.10518216341733932, "mass": 54.54545593261719}]}]}));
- /* ***Times Square NYE*** */ results.push(makeModel({"name": "Times Square NYE", "kind": "buildings", "forms": [{"name": "Ball", "views": [{"name": "Front", "height": 3.4989547729492188, "mass": 5397.72705078125, "extra": 1.0016937456872217, "bottom": 0.0016880275085964648}, {"name": "Angled", "height": 3.4989547729492188, "mass": 5397.72705078125, "extra": 1.0025409836065575, "bottom": 0.00252813570380047}, {"name": "Corner", "height": 3.4989547729492188, "mass": 5397.72705078125, "extra": 1.0018165582086815, "bottom": 0.00180998233215548}, {"name": "Side", "height": 3.4989547729492188, "mass": 5397.72705078125, "extra": 1.001850383633639, "bottom": 0.001843561043274757}, {"name": "Back", "height": 3.4989547729492188, "mass": 5397.72705078125, "extra": 1.0016623910180016, "bottom": 0.0016568822456753673}, {"name": "Top", "height": 3.657600164413452, "mass": 5397.72705078125, "extra": 1.001771054685155, "bottom": 0.001764803557935817}]}, {"name": "Tower", "views": [{"name": "Front", "height": 23.458213806152344, "extra": 1.0016112545018008, "bottom": 0.0016060788980911244}, {"name": "Angled", "height": 23.458213806152344, "extra": 1.0016112545018008, "bottom": 0.0016060788980911244}, {"name": "Corner", "height": 23.458213806152344, "extra": 1.0016112545018008, "bottom": 0.0016060788980911244}, {"name": "Side", "height": 23.458213806152344, "extra": 1.0016112545018008, "bottom": 0.0016060788980911244}, {"name": "Back", "height": 23.458213806152344, "extra": 1.0016112545018008, "bottom": 0.0016060788980911244}, {"name": "Top", "height": 1.5605759620666504, "extra": 1.0015567074184117, "bottom": 0.0015518757853168342}]}, {"name": "2022", "views": [{"name": "Front", "height": 2.1339330673217773, "extra": 1.003530708012506, "bottom": 0.0035059510336938327}, {"name": "Angled", "height": 2.1339330673217773, "extra": 1.0047998012242747, "bottom": 0.004754163148077668}, {"name": "Corner", "height": 2.1339330673217773, "extra": 1.0028325, "bottom": 0.002816544276672584}, {"name": "Side", "height": 2.1339330673217773, "extra": 1.001694837935174, "bottom": 0.0016891123916577266}, {"name": "Back", "height": 2.1339330673217773, "extra": 1.003530708012506, "bottom": 0.0035059510336938327}, {"name": "Top", "height": 0.4862631559371948, "extra": 1.0157526272448099, "bottom": 0.01527149491119562}]}]}));
- /* ***INSERT HERE*** */
-
- results.sort((b1, b2) => {
- e1 = b1.constructor();
- e2 = b2.constructor();
- return e1.name.localeCompare(e2.name)
- });
-
- return results;
- }
|