| @@ -9,6 +9,7 @@ | |||||
| <script src="math.min.js"></script> | <script src="math.min.js"></script> | ||||
| <script src="presets/characters.js"></script> | <script src="presets/characters.js"></script> | ||||
| <script src="presets/buildings.js"></script> | <script src="presets/buildings.js"></script> | ||||
| <script src="presets/vehicles.js"></script> | |||||
| <script src="macrovision.js"></script> | <script src="macrovision.js"></script> | ||||
| <meta name="theme-color" content="#000000" /> | <meta name="theme-color" content="#000000" /> | ||||
| <meta name="description" content="How big are they anyway?" /> | <meta name="description" content="How big are they anyway?" /> | ||||
| @@ -567,8 +567,6 @@ function displayEntity(entity, view, x, y) { | |||||
| img.style.setProperty("--offset", ((-1 + image.bottom) * 100) + "%") | img.style.setProperty("--offset", ((-1 + image.bottom) * 100) + "%") | ||||
| } | } | ||||
| box.dataset.x = x; | box.dataset.x = x; | ||||
| box.dataset.y = y; | box.dataset.y = y; | ||||
| @@ -711,6 +709,7 @@ document.addEventListener("DOMContentLoaded", () => { | |||||
| function prepareEntities() { | function prepareEntities() { | ||||
| availableEntities["buildings"] = makeBuildings(); | availableEntities["buildings"] = makeBuildings(); | ||||
| availableEntities["characters"] = makeCharacters(); | availableEntities["characters"] = makeCharacters(); | ||||
| availableEntities["vehicles"] = makeVehicles(); | |||||
| const holder = document.querySelector("#spawners"); | const holder = document.querySelector("#spawners"); | ||||
| Object.entries(availableEntities).forEach(([category, entityList]) => { | Object.entries(availableEntities).forEach(([category, entityList]) => { | ||||
| @@ -96,4 +96,11 @@ https://www.furaffinity.net/view/26253324/ | |||||
| https://www.furaffinity.net/view/34269979/ | https://www.furaffinity.net/view/34269979/ | ||||
| * foot.svg | |||||
| * foot.svg | |||||
| # Vehicles | |||||
| **Self-created** | |||||
| * bus.svg | |||||
| * vertical-bus.svg | |||||
| @@ -0,0 +1,8 @@ | |||||
| <?xml version="1.0" encoding="utf-8"?> | |||||
| <!-- Generator: Adobe Illustrator 23.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | |||||
| <svg version="1.1" id="Layer_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | |||||
| viewBox="0 0 459.14 125" style="enable-background:new 0 0 459.14 125;" xml:space="preserve"> | |||||
| <path d="M10.14,12v17h-6c-2,2-2,17-2,17h4c0,0-3,27-3,38s-1,20-1,20h-2c0,0-2,11,9,11s79,0,79,0v-2h4c0,0,4,12,17,12s16-11,16-11 | |||||
| h191c0,0,2,11,15,11c14,0,17-11,17-11h5c0,0,94-1,106-9V46l-2-31c0,0-3-5-9-5s-184,0-184,0s-3-4-7-4c-4,0-23,0-23,0l0,0l-4,3h-23 | |||||
| l-1-9c0,0-118,0-123,0s-8,8-8,8l-53,1L10.14,12z"/> | |||||
| </svg> | |||||
| @@ -0,0 +1,8 @@ | |||||
| <?xml version="1.0" encoding="utf-8"?> | |||||
| <!-- Generator: Adobe Illustrator 23.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | |||||
| <svg version="1.1" id="Layer_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | |||||
| viewBox="0 0 125 459.14" style="enable-background:new 0 0 125 459.14;" xml:space="preserve"> | |||||
| <path d="M113,10.14H96v-6c-2-2-17-2-17-2v4c0,0-27-3-38-3s-20-1-20-1v-2c0,0-11-2-11,9s0,79,0,79h2v4c0,0-12,4-12,17 | |||||
| c0,13,11,16,11,16v191c0,0-11,2-11,15c0,14,11,17,11,17v5c0,0,1,94,9,106h59l31-2c0,0,5-3,5-9s0-184,0-184s4-3,4-7c0-4,0-23,0-23 | |||||
| l0,0l-3-4v-23l9-1c0,0,0-118,0-123s-8-8-8-8l-1-53L113,10.14z"/> | |||||
| </svg> | |||||
| @@ -0,0 +1,60 @@ | |||||
| function makeVehicle(name, horizHeight, horizImage, vertHeight, vertImage, mass) { | |||||
| views = { | |||||
| horizontal: { | |||||
| attributes: { | |||||
| height: { | |||||
| name: "Height", | |||||
| power: 1, | |||||
| type: "length", | |||||
| base: horizHeight | |||||
| }, | |||||
| mass: { | |||||
| name: "Mass", | |||||
| power: 3, | |||||
| type: "mass", | |||||
| base: mass | |||||
| } | |||||
| }, | |||||
| image: horizImage, | |||||
| name: "Horizontal" | |||||
| }, | |||||
| vertical: { | |||||
| attributes: { | |||||
| height: { | |||||
| name: "Height", | |||||
| power: 1, | |||||
| type: "length", | |||||
| base: vertHeight | |||||
| }, | |||||
| mass: { | |||||
| name: "Mass", | |||||
| power: 3, | |||||
| type: "mass", | |||||
| base: mass | |||||
| } | |||||
| }, | |||||
| image: vertImage, | |||||
| name: "Vertical" | |||||
| } | |||||
| }; | |||||
| return makeEntity(name, "Vehicle", views); | |||||
| } | |||||
| function makeVehicles() { | |||||
| const results = []; | |||||
| results.push({ | |||||
| name: "Bus", | |||||
| constructor: () => makeVehicle( | |||||
| "Bus", | |||||
| math.unit(10.5, "feet"), | |||||
| { source: "./media/vehicles/bus.svg" }, | |||||
| math.unit(38.556, "feet"), | |||||
| { source: "./media/vehicles/vertical-bus.svg" }, | |||||
| math.unit(30000, "lb"), | |||||
| ) | |||||
| }); | |||||
| return results; | |||||
| } | |||||