diff --git a/macrovision.html b/macrovision.html index 2ce26b02..dddc9daf 100644 --- a/macrovision.html +++ b/macrovision.html @@ -7,8 +7,9 @@ - + + diff --git a/macrovision.js b/macrovision.js index f3ac8ae1..81815b85 100644 --- a/macrovision.js +++ b/macrovision.js @@ -709,6 +709,7 @@ document.addEventListener("DOMContentLoaded", () => { function prepareEntities() { availableEntities["buildings"] = makeBuildings(); availableEntities["characters"] = makeCharacters(); + availableEntities["objects"] = makeObjects(); availableEntities["vehicles"] = makeVehicles(); const holder = document.querySelector("#spawners"); diff --git a/media/LICENSES.md b/media/LICENSES.md index 2cef2f9d..67620ed3 100644 --- a/media/LICENSES.md +++ b/media/LICENSES.md @@ -161,6 +161,11 @@ https://www.furaffinity.net/view/22413650/ * peek.svg +# Objects + +**Self-created** + +* soda-can.svg # Vehicles diff --git a/media/objects/soda-can.svg b/media/objects/soda-can.svg new file mode 100644 index 00000000..f7b121ab --- /dev/null +++ b/media/objects/soda-can.svg @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/presets/objects.js b/presets/objects.js new file mode 100644 index 00000000..9a119474 --- /dev/null +++ b/presets/objects.js @@ -0,0 +1,40 @@ +function makeObject(name, height, mass, image) { + views = { + object: { + attributes: { + height: { + name: "Height", + power: 1, + type: "length", + base: height + }, + mass: { + name: "Mass", + power: 3, + type: "mass", + base: mass + } + }, + image: image, + name: "Object" + } + }; + + return makeEntity(name, "Object", views); +} + +function makeObjects() { + const results = []; + + results.push({ + name: "Soda Can", + constructor: () => makeObject( + "Soda Can", + math.unit(4.83, "inches"), + math.unit(15, "grams"), + { source: "./media/objects/soda-can.svg" } + ) + }); + + return results; +} \ No newline at end of file