🆙 Small fix landscape's where a bit offset

This commit is contained in:
duckietm
2026-05-12 11:48:06 +02:00
parent 6bc4a45ee1
commit b6a26fbd84
@@ -765,6 +765,9 @@ export class RoomPlane implements IRoomPlane
const layerHeight = Math.min(texture.height, canvasHeight); const layerHeight = Math.min(texture.height, canvasHeight);
const layerPositionY = alignBottom ? (canvasHeight - layerHeight) : 0; const layerPositionY = alignBottom ? (canvasHeight - layerHeight) : 0;
const verticalCropOffset = (alignBottom && texture.height > layerHeight)
? (texture.height - layerHeight)
: 0;
const layerSprite = new TilingSprite({ const layerSprite = new TilingSprite({
texture, texture,
@@ -772,7 +775,7 @@ export class RoomPlane implements IRoomPlane
height: layerHeight, height: layerHeight,
tilePosition: { tilePosition: {
x: this._landscapeOffsetX, x: this._landscapeOffsetX,
y: this._landscapeOffsetY y: this._landscapeOffsetY - verticalCropOffset
}, },
tint tint
}); });