mirror of
https://github.com/tobspr-games/shapez.io.git
synced 2026-01-15 05:41:10 -08:00
Merge pull request #212 from xSparfuchs/master
fix for screenshots larger than 16,384 x 16,384
This commit is contained in:
commit
e4b2c51484
1 changed files with 8 additions and 1 deletions
|
|
@ -56,7 +56,14 @@ export class HUDScreenshotExporter extends BaseHUDPart {
|
|||
const dimensions = maxChunk.sub(minChunk);
|
||||
logger.log("Dimensions:", dimensions);
|
||||
|
||||
const chunkSizePixels = 128;
|
||||
let chunkSizePixels = 128;
|
||||
const maxDimensions = Math.max(dimensions.x, dimensions.y);
|
||||
|
||||
if (maxDimensions > 128) {
|
||||
chunkSizePixels = Math.floor(128 * (128 / maxDimensions));
|
||||
}
|
||||
logger.log("ChunkSizePixels:", chunkSizePixels);
|
||||
|
||||
const chunkScale = chunkSizePixels / (globalConfig.mapChunkSize * globalConfig.tileSize);
|
||||
logger.log("Scale:", chunkScale);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue