diff --git a/src/mesh/NineSlicePlane.js b/src/mesh/NineSlicePlane.js index 08ef76e..b36ea3d 100644 --- a/src/mesh/NineSlicePlane.js +++ b/src/mesh/NineSlicePlane.js @@ -52,8 +52,8 @@ uvs[6] = uvs[14] = uvs[22] = uvs[30] = 1; uvs[25] = uvs[27] = uvs[29] = uvs[31] = 1; - this._origWidth = texture.width; - this._origHeight = texture.height; + this._origWidth = texture.orig.width; + this._origHeight = texture.orig.height; this._uvw = 1 / this._origWidth; this._uvh = 1 / this._origHeight; @@ -64,7 +64,7 @@ * @memberof PIXI.NineSlicePlane# * @override */ - this.width = texture.width; + this.width = this._origWidth; /** * The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane @@ -73,7 +73,7 @@ * @memberof PIXI.NineSlicePlane# * @override */ - this.height = texture.height; + this.height = this._origHeight; uvs[2] = uvs[10] = uvs[18] = uvs[26] = this._uvw * leftWidth; uvs[4] = uvs[12] = uvs[20] = uvs[28] = 1 - (this._uvw * rightWidth);