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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user