1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Further work on the energy generator

This commit is contained in:
tobspr
2020-06-28 11:44:30 +02:00
parent 97858b6eab
commit 17123fd7b9
37 changed files with 1188 additions and 1067 deletions

View File

@@ -88,6 +88,11 @@ export class AtlasSprite extends BaseSprite {
const link = this.linksByResolution[ORIGINAL_SCALE];
assert(
link,
"Link not known: " + ORIGINAL_SCALE + " (having " + Object.keys(this.linksByResolution) + ")"
);
const width = w || link.w;
const height = h || link.h;
@@ -152,6 +157,9 @@ export class AtlasSprite extends BaseSprite {
const scale = parameters.desiredAtlasScale;
const link = this.linksByResolution[scale];
assert(link, "Link not known: " + scale + " (having " + Object.keys(this.linksByResolution) + ")");
const scaleW = w / link.w;
const scaleH = h / link.h;