Part constructor raster-coordinates rounding

This commit is contained in:
Patrick Haßel 2025-02-04 11:20:36 +01:00
parent efeef7da5c
commit 39eecd54c6

View File

@ -25,10 +25,10 @@ export abstract class Part {
rasterW: number = 1,
rasterH: number = 1,
) {
this.x = rasterX * 3 * RASTER;
this.y = rasterY * 3 * RASTER;
this.w = rasterW * 3 * RASTER;
this.h = rasterH * 3 * RASTER;
this.x = Math.round(rasterX * 3) * RASTER;
this.y = Math.round(rasterY * 3) * RASTER;
this.w = Math.round(rasterW * 3) * RASTER;
this.h = Math.round(rasterH * 3) * RASTER;
}
toString(): string {