mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
move staticEntities to relevant scope
This commit is contained in:
parent
e92c0111b4
commit
3f9229dc7c
@ -142,13 +142,12 @@ export class HUDScreenshotExporter extends BaseHUDPart {
|
|||||||
doExport(resolution, overlay, wiresLayer, bounds) {
|
doExport(resolution, overlay, wiresLayer, bounds) {
|
||||||
logger.log("Starting export ...");
|
logger.log("Starting export ...");
|
||||||
|
|
||||||
|
if (!bounds) {
|
||||||
// Find extends
|
// Find extends
|
||||||
const staticEntities = this.root.entityMgr.getAllWithComponent(StaticMapEntityComponent);
|
const staticEntities = this.root.entityMgr.getAllWithComponent(StaticMapEntityComponent);
|
||||||
|
|
||||||
if (!bounds) {
|
|
||||||
const minTile = new Vector(0, 0);
|
const minTile = new Vector(0, 0);
|
||||||
const maxTile = new Vector(0, 0);
|
const maxTile = new Vector(0, 0);
|
||||||
|
|
||||||
for (let i = 0; i < staticEntities.length; ++i) {
|
for (let i = 0; i < staticEntities.length; ++i) {
|
||||||
const entityBounds = staticEntities[i].components.StaticMapEntity.getTileSpaceBounds();
|
const entityBounds = staticEntities[i].components.StaticMapEntity.getTileSpaceBounds();
|
||||||
minTile.x = Math.min(minTile.x, entityBounds.x);
|
minTile.x = Math.min(minTile.x, entityBounds.x);
|
||||||
|
Loading…
Reference in New Issue
Block a user