refactor: scaling

This commit is contained in:
cha0s 2019-04-20 02:14:40 -05:00
parent 49ed30ab60
commit 887ed8d0ed
4 changed files with 7 additions and 7 deletions

View File

@ -292,7 +292,7 @@ export class App extends decorate(class {}) {
inputFrequency: 1 / 60,
pointerMovementFrequency: 1 / 15,
simulationFrequency: 1 / 60,
visibleScale: [2, 2],
visibleScale: [1, 1],
visibleSize: [320, 180],
};
}

View File

@ -15,7 +15,7 @@ const decorate = compose(
color: white;
position: absolute;
top: 0.5em;
left: calc(320px + 0.5em);
right: 0.5em;
line-height: 1em;
padding: 0.125em;
font-family: monospace;

View File

@ -13,7 +13,7 @@ const decorate = compose(
color: white;
font-size: 0.8em;
position: absolute;
top: calc(180px + 0.5em);
bottom: 0.5em;
left: 0.5em;
line-height: 1em;
width: 10em;

View File

@ -7,16 +7,16 @@ class DamageTextNode extends TextNode {
super(amount);
// Big numbers are literally big.
if (amount > 999) {
this.span.style.fontSize = '2em';
this.span.style.fontSize = '1em';
}
else if (amount > 99) {
this.span.style.fontSize = '1.5em';
this.span.style.fontSize = '0.75em';
}
else if (amount > 9) {
this.span.style.fontSize = '1.2em';
this.span.style.fontSize = '0.6em';
}
else {
this.span.style.fontSize = '1em';
this.span.style.fontSize = '0.5em';
}
// Class by affinity and whether it's damage or healing.
this.span.className += ' ' + damageSpec.affinity;