Browse Source

Reformat the source files

tags/v0.1.0
Fen Dweller 5 years ago
parent
commit
086917084d
9 changed files with 94 additions and 94 deletions
  1. +17
    -17
      macrovision.js
  2. +2
    -2
      presets/buildings.js
  3. +66
    -66
      presets/characters.js
  4. +2
    -2
      presets/cities.js
  5. +1
    -1
      presets/landmarks.js
  6. +1
    -1
      presets/naturals.js
  7. +1
    -1
      presets/objects.js
  8. +1
    -1
      presets/scenes.js
  9. +3
    -3
      presets/vehicles.js

+ 17
- 17
macrovision.js View File

@@ -118,7 +118,7 @@ function updateSizes() {
drawScale(); drawScale();


let ordered = Object.entries(entities); let ordered = Object.entries(entities);
ordered.sort((e1, e2) => { ordered.sort((e1, e2) => {
return e1[1].views[e1[1].view].height.toNumber("meters") - e2[1].views[e2[1].view].height.toNumber("meters") return e1[1].views[e1[1].view].height.toNumber("meters") - e2[1].views[e2[1].view].height.toNumber("meters")
}); });
@@ -131,7 +131,7 @@ function updateSizes() {
zIndex -= 1; zIndex -= 1;
}); });


} }


function drawScale() { function drawScale() {
@@ -408,7 +408,7 @@ function configEntityOptions(entity, view) {
entity.sizes.forEach(defaultInfo => { entity.sizes.forEach(defaultInfo => {
const button = document.createElement("button"); const button = document.createElement("button");
button.classList.add("options-button"); button.classList.add("options-button");
button.innerText = defaultInfo.name; button.innerText = defaultInfo.name;


button.addEventListener("click", e => { button.addEventListener("click", e => {
@@ -483,12 +483,12 @@ function configViewOptions(entity, view) {
}); });


select.setAttribute("oldUnit", select.value); select.setAttribute("oldUnit", select.value);
select.addEventListener("input", e => { select.addEventListener("input", e => {
const value = input.value == 0 ? 1 : input.value; const value = input.value == 0 ? 1 : input.value;
const oldUnit = select.getAttribute("oldUnit"); const oldUnit = select.getAttribute("oldUnit");
entity.views[view][key] = math.unit(value, oldUnit).to(select.value); entity.views[view][key] = math.unit(value, oldUnit).to(select.value);
input.value = entity.views[view][key].toNumber(select.value);
input.value = entity.views[view][key].toNumber(select.value);


select.setAttribute("oldUnit", select.value); select.setAttribute("oldUnit", select.value);


@@ -543,7 +543,7 @@ function testClick(event) {
clickDown(target.parentElement, event.clientX, event.clientY); clickDown(target.parentElement, event.clientX, event.clientY);
return; return;
} }
// Get click coordinates // Get click coordinates


let w = target.width; let w = target.width;
@@ -567,8 +567,8 @@ function testClick(event) {
var x = event.clientX - target.getBoundingClientRect().x, var x = event.clientX - target.getBoundingClientRect().x,
y = event.clientY - target.getBoundingClientRect().y, y = event.clientY - target.getBoundingClientRect().y,
alpha; alpha;
testCtx.canvas.width = w;
testCtx.canvas.height = h;
testCtx.canvas.width = w;
testCtx.canvas.height = h;


// Draw image to canvas // Draw image to canvas
// and read Alpha channel value // and read Alpha channel value
@@ -703,7 +703,7 @@ document.addEventListener("DOMContentLoaded", () => {


option.innerText = lengthOption; option.innerText = lengthOption;
option.value = lengthOption; option.value = lengthOption;
if (lengthOption === "meters") { if (lengthOption === "meters") {
option.selected = true; option.selected = true;
} }
@@ -722,7 +722,7 @@ document.addEventListener("DOMContentLoaded", () => {
x += 0.7 / stuff.length; x += 0.7 / stuff.length;
}) })




const order = Object.keys(entities).sort((a, b) => { const order = Object.keys(entities).sort((a, b) => {
const entA = entities[a]; const entA = entities[a];
@@ -784,7 +784,7 @@ document.addEventListener("DOMContentLoaded", () => {
entities[selected.dataset.key].view = e.target.value; entities[selected.dataset.key].view = e.target.value;
const image = entities[selected.dataset.key].views[e.target.value].image; const image = entities[selected.dataset.key].views[e.target.value].image;
selected.querySelector(".entity-image").src = image.source; selected.querySelector(".entity-image").src = image.source;
if (image.bottom !== undefined) { if (image.bottom !== undefined) {
selected.querySelector(".entity-image").style.setProperty("--offset", ((-1 + image.bottom) * 100) + "%") selected.querySelector(".entity-image").style.setProperty("--offset", ((-1 + image.bottom) * 100) + "%")
} else { } else {
@@ -819,7 +819,7 @@ document.addEventListener("DOMContentLoaded", () => {


document.querySelector("#options-world-autofit").addEventListener("input", e => { document.querySelector("#options-world-autofit").addEventListener("input", e => {
config.autoFit = e.target.checked; config.autoFit = e.target.checked;


if (config.autoFit) { if (config.autoFit) {
fitWorld(); fitWorld();
@@ -828,7 +828,7 @@ document.addEventListener("DOMContentLoaded", () => {


document.querySelector("#options-world-autofit-mode").addEventListener("input", e => { document.querySelector("#options-world-autofit-mode").addEventListener("input", e => {
config.autoFitMode = e.target.value; config.autoFitMode = e.target.value;
if (config.autoFit) { if (config.autoFit) {
fitWorld(); fitWorld();
} }
@@ -863,7 +863,7 @@ document.addEventListener("DOMContentLoaded", () => {
} }


}); });
document.addEventListener("paste", e => { document.addEventListener("paste", e => {
try { try {
const data = JSON.parse(e.clipboardData.getData("text")); const data = JSON.parse(e.clipboardData.getData("text"));
@@ -875,9 +875,9 @@ document.addEventListener("DOMContentLoaded", () => {
} }


importScene(data); importScene(data);
} catch(err) {
} catch (err) {
console.error(err); console.error(err);
// probably wasn't valid data // probably wasn't valid data
} }
}); });
@@ -904,7 +904,7 @@ function prepareEntities() {
availableEntities["vehicles"] = makeVehicles(); availableEntities["vehicles"] = makeVehicles();
availableEntities["cities"] = makeCities(); availableEntities["cities"] = makeCities();


availableEntities["characters"].sort((x,y) => {
availableEntities["characters"].sort((x, y) => {
return x.name < y.name ? -1 : 1 return x.name < y.name ? -1 : 1
}); });
const holder = document.querySelector("#spawners"); const holder = document.querySelector("#spawners");


+ 2
- 2
presets/buildings.js View File

@@ -24,7 +24,7 @@ function makeBuilding(name, height, image) {
}, },
}; };


return makeEntity({name: name}, views);
return makeEntity({ name: name }, views);
} }




@@ -63,7 +63,7 @@ function makeSkyscraper(name, image, startingSize) {
height: math.unit(650, "meters") height: math.unit(650, "meters")
}); });


const entity = makeEntity({name: name}, views, sizes);
const entity = makeEntity({ name: name }, views, sizes);


entity.views[entity.defaultView].height = startingSize; entity.views[entity.defaultView].height = startingSize;
return entity; return entity;


+ 66
- 66
presets/characters.js View File

@@ -35,7 +35,7 @@ function makeCharacter(name, author, viewInfo, defaultSizes, defaultSize) {
} }
}); });


const entity = makeEntity({name: name}, views, defaultSizes);
const entity = makeEntity({ name: name }, views, defaultSizes);


if (defaultSize) { if (defaultSize) {
entity.views[entity.defaultView].height = defaultSize; entity.views[entity.defaultView].height = defaultSize;
@@ -180,7 +180,7 @@ function makeMarch() {
} }
}; };


const entity = makeEntity({name: "March", author: "March-Dragon"}, views, []);
const entity = makeEntity({ name: "March", author: "March-Dragon" }, views, []);


entity.sizes.push({ entity.sizes.push({
name: "Normal", name: "Normal",
@@ -241,7 +241,7 @@ function makeNoir() {
} }
}; };


const entity = makeEntity({name: "Noir", author: "March-Dragon"}, views, []);
const entity = makeEntity({ name: "Noir", author: "March-Dragon" }, views, []);


entity.sizes.push({ entity.sizes.push({
name: "Normal", name: "Normal",
@@ -321,7 +321,7 @@ function makeOkuri() {
} }
}; };


const entity = makeEntity({name: "Okuri", author: "OrionMechadragon"}, views, []);
const entity = makeEntity({ name: "Okuri", author: "OrionMechadragon" }, views, []);
entity.views.front.height = math.unit(100, "miles"); entity.views.front.height = math.unit(100, "miles");
return entity; return entity;
} }
@@ -370,7 +370,7 @@ function makeManny() {
} }
}; };


const entity = makeEntity({name: "Manny", author: "Dialuca01"}, views, []);
const entity = makeEntity({ name: "Manny", author: "Dialuca01" }, views, []);


entity.sizes.push({ entity.sizes.push({
name: "Normal", name: "Normal",
@@ -392,7 +392,7 @@ function makeManny() {
name: "Gigamacro", name: "Gigamacro",
height: math.unit(41769, "miles") height: math.unit(41769, "miles")
}); });
entity.views.front.height = math.unit(78, "feet"); entity.views.front.height = math.unit(78, "feet");
return entity; return entity;
} }
@@ -483,8 +483,8 @@ function makeAdake() {
}, },
}; };


const entity = makeEntity({name: "Adake", author: "Dialuca01"}, views, []);
const entity = makeEntity({ name: "Adake", author: "Dialuca01" }, views, []);
entity.sizes.push({ entity.sizes.push({
name: "Normal", name: "Normal",
height: math.unit(7, "feet") height: math.unit(7, "feet")
@@ -548,7 +548,7 @@ function makeElijah() {
} }
}; };


const entity = makeEntity({name: "Elijah", author: "Elijah"}, views, []);
const entity = makeEntity({ name: "Elijah", author: "Elijah" }, views, []);


entity.sizes.push({ entity.sizes.push({
name: "Normal", name: "Normal",
@@ -633,7 +633,7 @@ function makeRai() {
} }
}; };


const entity = makeEntity({name: "Rai", author: "shadowblade945"}, views, []);
const entity = makeEntity({ name: "Rai", author: "shadowblade945" }, views, []);
entity.views.front.height = math.unit(302, "feet"); entity.views.front.height = math.unit(302, "feet");
return entity; return entity;
} }
@@ -683,7 +683,7 @@ function makeJazzy() {
} }
}; };


const entity = makeEntity({name: "Jazzy", author: "Jazzywolf"}, views, []);
const entity = makeEntity({ name: "Jazzy", author: "Jazzywolf" }, views, []);
entity.views.front.height = math.unit(216, "feet"); entity.views.front.height = math.unit(216, "feet");
return entity; return entity;
} }
@@ -712,7 +712,7 @@ function makeFlamm() {
} }
}; };


const entity = makeEntity({name: "Flamm", author: "Flamm"}, views, []);
const entity = makeEntity({ name: "Flamm", author: "Flamm" }, views, []);


entity.sizes.push({ entity.sizes.push({
name: "Normal", name: "Normal",
@@ -792,8 +792,8 @@ function makeZephiro() {
} }
}; };


const entity = makeEntity({name: "Zephiro", author: "Zephiro"}, views, []);
entity.views.front.height = math.unit(118, "feet");
const entity = makeEntity({ name: "Zephiro", author: "Zephiro" }, views, []);
entity.views.front.height = math.unit(118, "feet");


entity.sizes.push({ entity.sizes.push({
name: "Micro", name: "Micro",
@@ -802,7 +802,7 @@ function makeZephiro() {


entity.sizes.push({ entity.sizes.push({
name: "Normal", name: "Normal",
height: math.unit(5 + 3/12, "feet")
height: math.unit(5 + 3 / 12, "feet")
}); });


entity.sizes.push({ entity.sizes.push({
@@ -837,8 +837,8 @@ function makeFory() {
} }
}; };


const entity = makeEntity({name: "Fory", author: "Manny"}, views, []);
const entity = makeEntity({ name: "Fory", author: "Manny" }, views, []);


entity.sizes.push({ entity.sizes.push({
name: "Normal", name: "Normal",
@@ -941,7 +941,7 @@ function makeKurrikage() {
} }
}; };


const entity = makeEntity({name: "Kurrikage", author: "Kurrikage"}, views, []);
const entity = makeEntity({ name: "Kurrikage", author: "Kurrikage" }, views, []);
entity.views.front.height = math.unit(12, "feet"); entity.views.front.height = math.unit(12, "feet");
return entity; return entity;
} }
@@ -970,7 +970,7 @@ function makeShingo() {
} }
}; };


const entity = makeEntity({name: "Shingo", author: "Threes"}, views, []);
const entity = makeEntity({ name: "Shingo", author: "Threes" }, views, []);


entity.sizes.push({ entity.sizes.push({
name: "Micro", name: "Micro",
@@ -1013,7 +1013,7 @@ function makeAigey() {
} }
}; };


const entity = makeEntity({name: "Aigey", author: "Aigey"}, views, []);
const entity = makeEntity({ name: "Aigey", author: "Aigey" }, views, []);


entity.sizes.push({ entity.sizes.push({
name: "Macro", name: "Macro",
@@ -1024,9 +1024,9 @@ function makeAigey() {
name: "Megamacro", name: "Megamacro",
height: math.unit(100, "miles") height: math.unit(100, "miles")
}); });
entity.views[entity.defaultView].height = math.unit(200, "feet"); entity.views[entity.defaultView].height = math.unit(200, "feet");
return entity; return entity;
} }


@@ -1054,11 +1054,11 @@ function makeNatasha() {
} }
}; };


const entity = makeEntity({name: "Natasha", author: "Natasha"}, views, []);
const entity = makeEntity({ name: "Natasha", author: "Natasha" }, views, []);


entity.sizes.push({ entity.sizes.push({
name: "Normal", name: "Normal",
height: math.unit(5 + 5/12, "feet")
height: math.unit(5 + 5 / 12, "feet")
}); });


entity.sizes.push({ entity.sizes.push({
@@ -1079,9 +1079,9 @@ function makeNatasha() {
name: "Macro++", name: "Macro++",
height: math.unit(1, "mile") height: math.unit(1, "mile")
}); });
entity.views[entity.defaultView].height = math.unit(100, "feet"); entity.views[entity.defaultView].height = math.unit(100, "feet");
return entity; return entity;
} }


@@ -1150,7 +1150,7 @@ function makeMalik() {
}, },
}; };


const entity = makeEntity({name: "Malik", author: "Fuzzypaws"}, views, []);
const entity = makeEntity({ name: "Malik", author: "Fuzzypaws" }, views, []);


entity.sizes.push({ entity.sizes.push({
name: "Macro", name: "Macro",
@@ -1163,7 +1163,7 @@ function makeMalik() {
}); });


entity.views[entity.defaultView].height = math.unit(156, "feet"); entity.views[entity.defaultView].height = math.unit(156, "feet");
return entity; return entity;
} }


@@ -1211,10 +1211,10 @@ function makeSefer() {
}, },
}; };


const entity = makeEntity({name: "Sefer", author: "Fuzzypaws"}, views, []);
const entity = makeEntity({ name: "Sefer", author: "Fuzzypaws" }, views, []);


entity.views[entity.defaultView].height = math.unit(6, "feet"); entity.views[entity.defaultView].height = math.unit(6, "feet");
return entity; return entity;
} }


@@ -1228,7 +1228,7 @@ characterMakers["North"] = () => {
weight: math.unit(124.738, "kg"), weight: math.unit(124.738, "kg"),
name: "Body", name: "Body",
image: { image: {
extra: 1225/1050,
extra: 1225 / 1050,
source: "./media/characters/north/front.svg" source: "./media/characters/north/front.svg"
} }
} }
@@ -1721,7 +1721,7 @@ characterMakers["GiantGrowingVixen"] = () => {
[ [
{ {
name: "Extremely Puny", name: "Extremely Puny",
height: math.unit(9 + 5/12, "feet")
height: math.unit(9 + 5 / 12, "feet")
}, },
{ {
name: "Horribly Small", name: "Horribly Small",
@@ -1774,28 +1774,28 @@ characterMakers["Asana"] = () => {
"Asana", "Asana",
{ {
front: { front: {
height: math.unit(7 + 5/6, "feet"),
height: math.unit(7 + 5 / 6, "feet"),
weight: math.unit(325, "lb"), weight: math.unit(325, "lb"),
name: "Front", name: "Front",
image: { image: {
source: "./media/characters/asana/front.svg", source: "./media/characters/asana/front.svg",
extra: 1128/1068
extra: 1128 / 1068
} }
}, },
back: { back: {
height: math.unit(7 + 5/6, "feet"),
height: math.unit(7 + 5 / 6, "feet"),
weight: math.unit(325, "lb"), weight: math.unit(325, "lb"),
name: "Back", name: "Back",
image: { image: {
source: "./media/characters/asana/back.svg", source: "./media/characters/asana/back.svg",
extra: 1128/1068
extra: 1128 / 1068
} }
}, },
}, },
[ [
{ {
name: "Standard", name: "Standard",
height: math.unit(7 + 5/6, "feet")
height: math.unit(7 + 5 / 6, "feet")
}, },
{ {
name: "Large", name: "Large",
@@ -1814,7 +1814,7 @@ characterMakers["Asana"] = () => {
height: math.unit(5e12, "lightyears") height: math.unit(5e12, "lightyears")
} }
], ],
math.unit(7 + 5/6, "feet")
math.unit(7 + 5 / 6, "feet")
) )
}; };


@@ -1830,7 +1830,7 @@ characterMakers["Ebony"] = () => {
image: { image: {
source: "./media/characters/ebony/front.svg", source: "./media/characters/ebony/front.svg",
bottom: 0.03, bottom: 0.03,
extra: 1045/810 + 0.03
extra: 1045 / 810 + 0.03
} }
}, },
side: { side: {
@@ -1840,7 +1840,7 @@ characterMakers["Ebony"] = () => {
image: { image: {
source: "./media/characters/ebony/side.svg", source: "./media/characters/ebony/side.svg",
bottom: 0.03, bottom: 0.03,
extra: 1045/810 + 0.03
extra: 1045 / 810 + 0.03
} }
}, },
back: { back: {
@@ -1850,14 +1850,14 @@ characterMakers["Ebony"] = () => {
image: { image: {
source: "./media/characters/ebony/back.svg", source: "./media/characters/ebony/back.svg",
bottom: 0.01, bottom: 0.01,
extra: 1045/810 + 0.01
extra: 1045 / 810 + 0.01
} }
}, },
}, },
[ [
{ {
name: "Standard", name: "Standard",
height: math.unit(9/8 * (7 + 5/12), "feet")
height: math.unit(9 / 8 * (7 + 5 / 12), "feet")
}, },
{ {
name: "Macro", name: "Macro",
@@ -1868,7 +1868,7 @@ characterMakers["Ebony"] = () => {
height: math.unit(13000, "km") height: math.unit(13000, "km")
} }
], ],
math.unit(7 + 5/12, "feet")
math.unit(7 + 5 / 12, "feet")
) )
}; };


@@ -2140,7 +2140,7 @@ characterMakers["Cryae"] = () => {
name: "Side", name: "Side",
image: { image: {
source: "./media/characters/cryae/side.svg", source: "./media/characters/cryae/side.svg",
extra: 3500/1500
extra: 3500 / 1500
} }
} }
}, },
@@ -2165,7 +2165,7 @@ characterMakers["Xera"] = () => {
name: "Front", name: "Front",
image: { image: {
source: "./media/characters/xera/front.svg", source: "./media/characters/xera/front.svg",
extra: 2300/2061
extra: 2300 / 2061
} }
}, },
side: { side: {
@@ -2174,7 +2174,7 @@ characterMakers["Xera"] = () => {
name: "Side", name: "Side",
image: { image: {
source: "./media/characters/xera/side.svg", source: "./media/characters/xera/side.svg",
extra: 2300/2061
extra: 2300 / 2061
} }
}, },
back: { back: {
@@ -2223,7 +2223,7 @@ characterMakers["Nebula"] = () => {
name: "Front", name: "Front",
image: { image: {
source: "./media/characters/nebula/front.svg", source: "./media/characters/nebula/front.svg",
extra: 2600/2450
extra: 2600 / 2450
} }
} }
}, },
@@ -2523,7 +2523,7 @@ characterMakers["Chez"] = () => {
"Ashtrek", "Ashtrek",
{ {
front: { front: {
height: math.unit(7 + 9/12, "feet"),
height: math.unit(7 + 9 / 12, "feet"),
weight: math.unit(379, "lbs"), weight: math.unit(379, "lbs"),
name: "Front", name: "Front",
image: { image: {
@@ -2531,7 +2531,7 @@ characterMakers["Chez"] = () => {
} }
}, },
side: { side: {
height: math.unit(7 + 9/12, "feet"),
height: math.unit(7 + 9 / 12, "feet"),
weight: math.unit(379, "lbs"), weight: math.unit(379, "lbs"),
name: "Side", name: "Side",
image: { image: {
@@ -2542,14 +2542,14 @@ characterMakers["Chez"] = () => {
[ [
{ {
name: "Normal", name: "Normal",
height: math.unit(7 + 9/12, "feet")
height: math.unit(7 + 9 / 12, "feet")
}, },
{ {
name: "God King", name: "God King",
height: math.unit(9750000, "meters") height: math.unit(9750000, "meters")
} }
], ],
math.unit(7 + 9/12, "feet")
math.unit(7 + 9 / 12, "feet")
) )
}; };


@@ -2565,7 +2565,7 @@ characterMakers["Kaylum"] = () => {
image: { image: {
source: "./media/characters/kaylum/front.svg", source: "./media/characters/kaylum/front.svg",
bottom: 0.01, bottom: 0.01,
extra: 1166/1031
extra: 1166 / 1031
} }
}, },
frontWingless: { frontWingless: {
@@ -2575,7 +2575,7 @@ characterMakers["Kaylum"] = () => {
image: { image: {
source: "./media/characters/kaylum/front-wingless.svg", source: "./media/characters/kaylum/front-wingless.svg",
bottom: 0.01, bottom: 0.01,
extra: 1117/1031
extra: 1117 / 1031
} }
} }


@@ -2632,7 +2632,7 @@ characterMakers["Geta"] = () => {
}, },
{ {
name: "Normal", name: "Normal",
height: math.unit(5 + 5/12, "feet")
height: math.unit(5 + 5 / 12, "feet")
} }
], ],
math.unit(3, "inches") math.unit(3, "inches")
@@ -2886,7 +2886,7 @@ characterMakers["Sigvald"] = () => {
name: "Front", name: "Front",
image: { image: {
source: "./media/characters/sigvald/front.svg", source: "./media/characters/sigvald/front.svg",
extra: 1000/850
extra: 1000 / 850
} }
}, },
back: { back: {
@@ -2964,7 +2964,7 @@ characterMakers["Tobias"] = () => {
name: "Side", name: "Side",
image: { image: {
source: "./media/characters/tobias/side.svg", source: "./media/characters/tobias/side.svg",
extra: 5/4
extra: 5 / 4
} }
}, },
}, },
@@ -2993,7 +2993,7 @@ characterMakers["Kieran"] = () => {
name: "Side", name: "Side",
image: { image: {
source: "./media/characters/kieran/side.svg", source: "./media/characters/kieran/side.svg",
extra: 950/850
extra: 950 / 850
} }
}, },
}, },
@@ -3047,7 +3047,7 @@ characterMakers["Miranda"] = () => {
name: "Front", name: "Front",
image: { image: {
source: "./media/characters/miranda/front.svg", source: "./media/characters/miranda/front.svg",
extra: 10.6/10
extra: 10.6 / 10
} }
}, },
}, },
@@ -3072,7 +3072,7 @@ characterMakers["James"] = () => {
name: "Front", name: "Front",
image: { image: {
source: "./media/characters/james/front.svg", source: "./media/characters/james/front.svg",
extra: 10/8.5
extra: 10 / 8.5
} }
}, },
}, },
@@ -3121,7 +3121,7 @@ characterMakers["Lukas"] = () => {
name: "Side", name: "Side",
image: { image: {
source: "./media/characters/lukas/side.svg", source: "./media/characters/lukas/side.svg",
extra: 7.25/6.5
extra: 7.25 / 6.5
} }
}, },
}, },
@@ -3202,7 +3202,7 @@ characterMakers["Deerpuff"] = () => {
name: "Standing", name: "Standing",
image: { image: {
source: "./media/characters/deerpuff/standing.svg", source: "./media/characters/deerpuff/standing.svg",
extra: 682/624
extra: 682 / 624
} }
}, },
sitting: { sitting: {
@@ -3211,8 +3211,8 @@ characterMakers["Deerpuff"] = () => {
name: "Sitting", name: "Sitting",
image: { image: {
source: "./media/characters/deerpuff/sitting.svg", source: "./media/characters/deerpuff/sitting.svg",
bottom: 44/400,
extra: 1 / (1 - 44/400)
bottom: 44 / 400,
extra: 1 / (1 - 44 / 400)
} }
}, },
taurLaying: { taurLaying: {
@@ -3268,13 +3268,13 @@ characterMakers["Vivian"] = () => {
} }
}, },
sitting: { sitting: {
height: math.unit(6/1.75, "feet"),
height: math.unit(6 / 1.75, "feet"),
weight: math.unit(170, "lbs"), weight: math.unit(170, "lbs"),
name: "Sitting", name: "Sitting",
image: { image: {
source: "./media/characters/vivian/sitting.svg", source: "./media/characters/vivian/sitting.svg",
bottom: 1/6.4,
extra: (1 / (1 - 1/6.4)) * (1 + 164/1600)
bottom: 1 / 6.4,
extra: (1 / (1 - 1 / 6.4)) * (1 + 164 / 1600)
} }
}, },
}, },


+ 2
- 2
presets/cities.js View File

@@ -19,7 +19,7 @@ function makeCity(name, height) {


console.log(views) console.log(views)


return makeEntity({name: name}, views);
return makeEntity({ name: name }, views);
} }


function addCity(name, height) { function addCity(name, height) {
@@ -56,7 +56,7 @@ function makeCities() {
results.push(addCity("Columbus", math.unit(629, "feet"))); results.push(addCity("Columbus", math.unit(629, "feet")));


// Canada // Canada
results.push(addCity("Toronto", math.unit(1814, "feet"))); results.push(addCity("Toronto", math.unit(1814, "feet")));
results.push(addCity("Montreal", math.unit(743, "feet"))); results.push(addCity("Montreal", math.unit(743, "feet")));
results.push(addCity("Vancouver", math.unit(659, "feet"))); results.push(addCity("Vancouver", math.unit(659, "feet")));


+ 1
- 1
presets/landmarks.js View File

@@ -14,7 +14,7 @@ function makeLandmark(name, height, image) {
}, },
}; };


return makeEntity({name: name}, views);
return makeEntity({ name: name }, views);
} }


function makeLandmarks() { function makeLandmarks() {


+ 1
- 1
presets/naturals.js View File

@@ -2,7 +2,7 @@ function makeState(name, height, width, area) {
return { return {
name: name, name: name,
constructor: () => makeEntity( constructor: () => makeEntity(
{name: name},
{ name: name },
{ {
state: { state: {
attributes: { attributes: {


+ 1
- 1
presets/objects.js View File

@@ -25,7 +25,7 @@ function makeObject(name, viewInfo) {
} }
}); });


return makeEntity({name: name}, views);
return makeEntity({ name: name }, views);
} }


function makeObjects() { function makeObjects() {


+ 1
- 1
presets/scenes.js View File

@@ -25,4 +25,4 @@ scenes["military"] = () => {


arrangeEntities(order); arrangeEntities(order);
fitWorld(); fitWorld();
}
}

+ 3
- 3
presets/vehicles.js View File

@@ -1,6 +1,6 @@
function makeVehicle(name, sides, mass) { function makeVehicle(name, sides, mass) {
views = { views = {
} }


Object.entries(sides).forEach(([key, val]) => { Object.entries(sides).forEach(([key, val]) => {
@@ -24,7 +24,7 @@ function makeVehicle(name, sides, mass) {
} }
}); });


return makeEntity({name: name}, views);
return makeEntity({ name: name }, views);
} }


function makeVehicles() { function makeVehicles() {
@@ -45,7 +45,7 @@ function makeVehicles() {
height: math.unit(38.5, "feet"), height: math.unit(38.5, "feet"),
image: { source: "./media/vehicles/vertical-bus.svg" } image: { source: "./media/vehicles/vertical-bus.svg" }
}, },
}, },
math.unit(30000, "lb"), math.unit(30000, "lb"),
) )


Loading…
Cancel
Save