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

Only render shapes in map overview

This commit is contained in:
tobspr
2020-09-22 11:21:18 +02:00
parent 607fd15a18
commit 1ec8b4fe28
3 changed files with 35 additions and 33 deletions

View File

@@ -109,12 +109,12 @@ export class MapChunkView extends MapChunk {
if (this.root.currentLayer === "regular") {
for (let i = 0; i < this.patches.length; ++i) {
const patch = this.patches[i];
const destX = this.x * dims + patch.pos.x * globalConfig.tileSize;
const destY = this.y * dims + patch.pos.y * globalConfig.tileSize;
const diameter = Math.min(80, 30 / parameters.zoomLevel);
patch.item.drawItemCenteredClipped(destX, destY, parameters, diameter);
if (patch.item.getItemType() === "shape") {
const destX = this.x * dims + patch.pos.x * globalConfig.tileSize;
const destY = this.y * dims + patch.pos.y * globalConfig.tileSize;
const diameter = 100 / Math.pow(parameters.zoomLevel, 0.35);
patch.item.drawItemCenteredClipped(destX, destY, parameters, diameter);
}
}
}
}