diff --git a/src/core/textures/TextureUvs.js b/src/core/textures/TextureUvs.js index 0ed66e6..1b37f11 100644 --- a/src/core/textures/TextureUvs.js +++ b/src/core/textures/TextureUvs.js @@ -83,9 +83,9 @@ this.y3 = (frame.y + frame.height) / th; } - this.uvsUint32[0] = (((this.y0 * 65535) & 0xFFFF) << 16) | ((this.x0 * 65535) & 0xFFFF); - this.uvsUint32[1] = (((this.y1 * 65535) & 0xFFFF) << 16) | ((this.x1 * 65535) & 0xFFFF); - this.uvsUint32[2] = (((this.y2 * 65535) & 0xFFFF) << 16) | ((this.x2 * 65535) & 0xFFFF); - this.uvsUint32[3] = (((this.y3 * 65535) & 0xFFFF) << 16) | ((this.x3 * 65535) & 0xFFFF); + this.uvsUint32[0] = ((Math.round(this.y0 * 65535) & 0xFFFF) << 16) | (Math.round(this.x0 * 65535) & 0xFFFF); + this.uvsUint32[1] = ((Math.round(this.y1 * 65535) & 0xFFFF) << 16) | (Math.round(this.x1 * 65535) & 0xFFFF); + this.uvsUint32[2] = ((Math.round(this.y2 * 65535) & 0xFFFF) << 16) | (Math.round(this.x2 * 65535) & 0xFFFF); + this.uvsUint32[3] = ((Math.round(this.y3 * 65535) & 0xFFFF) << 16) | (Math.round(this.x3 * 65535) & 0xFFFF); } }