diff --git a/macrovision.js b/macrovision.js
index dcc1afd9..abe16a44 100644
--- a/macrovision.js
+++ b/macrovision.js
@@ -483,6 +483,11 @@ function testClick(event) {
}
}
+function removeAllEntities() {
+ Object.keys(entities).forEach(key => {
+ removeEntity(document.querySelector("#entity-" + key));
+ });
+}
function removeEntity(element) {
delete entities[element.dataset.key];
const bottomName = document.querySelector("#bottom-name-" + element.dataset.key);
@@ -590,6 +595,9 @@ document.addEventListener("DOMContentLoaded", () => {
clearViewList();
+ document.querySelector("#menu-clear").addEventListener("click", e => {
+ removeAllEntities();
+ });
prepareEntities();
});
diff --git a/media/LICENSES.md b/media/LICENSES.md
index befb4cdc..a830bbae 100644
--- a/media/LICENSES.md
+++ b/media/LICENSES.md
@@ -22,4 +22,13 @@ https://commons.wikimedia.org/wiki/File:TallestBuildings.svg
https://www.furaffinity.net/view/13680521/
-* back.svg
\ No newline at end of file
+* back.svg
+
+## Sofia
+
+https://www.furaffinity.net/user/fauxlacine
+
+https://www.furaffinity.net/view/16704878/
+
+* front.svg
+* back.svg
diff --git a/media/characters/fen/back.png b/media/characters/fen/back.png
deleted file mode 100644
index a545d399..00000000
Binary files a/media/characters/fen/back.png and /dev/null differ
diff --git a/media/characters/sofia/back.svg b/media/characters/sofia/back.svg
new file mode 100644
index 00000000..48c2c47a
--- /dev/null
+++ b/media/characters/sofia/back.svg
@@ -0,0 +1,183 @@
+
+
+
diff --git a/media/characters/sofia/front.svg b/media/characters/sofia/front.svg
new file mode 100644
index 00000000..6c4af52c
--- /dev/null
+++ b/media/characters/sofia/front.svg
@@ -0,0 +1,126 @@
+
+
+
diff --git a/presets/characters.js b/presets/characters.js
index 1dadea9e..1c724605 100644
--- a/presets/characters.js
+++ b/presets/characters.js
@@ -57,6 +57,56 @@ function makeFen() {
return entity;
}
+function makeSofia() {
+ const views = {
+ front: {
+ attributes: {
+ height: {
+ name: "Height",
+ power: 1,
+ type: "length",
+ base: math.unit(183, "cm")
+ },
+ weight: {
+ name: "Weight",
+ power: 3,
+ type: "mass",
+ base: math.unit(80, "kg")
+ }
+ },
+ image: {
+ source: "./media/characters/sofia/front.svg"
+ },
+ name: "Front"
+ },
+ back: {
+ attributes: {
+ height: {
+ name: "Height",
+ power: 1,
+ type: "length",
+ base: math.unit(183, "cm")
+ },
+ weight: {
+ name: "Weight",
+ power: 3,
+ type: "mass",
+ base: math.unit(80, "kg")
+ }
+ },
+ image: {
+ source: "./media/characters/sofia/back.svg"
+ },
+ name: "Back"
+ }
+
+ };
+
+ const entity = makeEntity("Sofia", "ZakuraTech", views);
+ entity.views.front.height = math.unit(96, "feet");
+ return entity;
+}
+
function makeMan() {
const views = {
body: {
@@ -90,6 +140,10 @@ function makeCharacters() {
name: "Fen",
constructor: makeFen
});
+ results.push({
+ name: "Sofia",
+ constructor: makeSofia
+ });
results.push({
name: "Normal man",
constructor: makeMan