refactor: scaling
This commit is contained in:
parent
49ed30ab60
commit
887ed8d0ed
|
@ -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],
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user