@pixi/sprite
Advanced tools
Comparing version 7.3.0 to 7.3.1
@@ -48,3 +48,7 @@ "use strict"; | ||
const texture = this._texture, vertexData = this.vertexTrimmedData, orig = texture.orig, anchor = this._anchor, wt = this.transform.worldTransform, a = wt.a, b = wt.b, c = wt.c, d = wt.d, tx = wt.tx, ty = wt.ty, w1 = -anchor._x * orig.width, w0 = w1 + orig.width, h1 = -anchor._y * orig.height, h0 = h1 + orig.height; | ||
vertexData[0] = a * w1 + c * h1 + tx, vertexData[1] = d * h1 + b * w1 + ty, vertexData[2] = a * w0 + c * h1 + tx, vertexData[3] = d * h1 + b * w0 + ty, vertexData[4] = a * w0 + c * h0 + tx, vertexData[5] = d * h0 + b * w0 + ty, vertexData[6] = a * w1 + c * h0 + tx, vertexData[7] = d * h0 + b * w1 + ty; | ||
if (vertexData[0] = a * w1 + c * h1 + tx, vertexData[1] = d * h1 + b * w1 + ty, vertexData[2] = a * w0 + c * h1 + tx, vertexData[3] = d * h1 + b * w0 + ty, vertexData[4] = a * w0 + c * h0 + tx, vertexData[5] = d * h0 + b * w0 + ty, vertexData[6] = a * w1 + c * h0 + tx, vertexData[7] = d * h0 + b * w1 + ty, this._roundPixels) { | ||
const resolution = core.settings.RESOLUTION; | ||
for (let i = 0; i < vertexData.length; ++i) | ||
vertexData[i] = Math.round(vertexData[i] * resolution) / resolution; | ||
} | ||
} | ||
@@ -122,3 +126,3 @@ /** | ||
set roundPixels(value) { | ||
this._roundPixels !== value && (this._transformID = -1), this._roundPixels = value; | ||
this._roundPixels !== value && (this._transformID = -1, this._transformTrimmedID = -1), this._roundPixels = value; | ||
} | ||
@@ -125,0 +129,0 @@ get roundPixels() { |
{ | ||
"name": "@pixi/sprite", | ||
"version": "7.3.0", | ||
"version": "7.3.1", | ||
"main": "lib/index.js", | ||
@@ -39,5 +39,5 @@ "module": "lib/index.mjs", | ||
"peerDependencies": { | ||
"@pixi/core": "7.3.0", | ||
"@pixi/display": "7.3.0" | ||
"@pixi/core": "7.3.1", | ||
"@pixi/display": "7.3.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85320
649