diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 2dd9b06..92f3cea 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -721,7 +721,9 @@ this.glDirty = false; } - if(this.graphicsData.length === 1 && this.graphicsData[0].shape.type === CONST.SHAPES.RECT) + if(this.graphicsData.length === 1 + && this.graphicsData[0].shape.type === CONST.SHAPES.RECT + && !this.graphicsData[0].lineWidth) { this._renderSpriteRect(renderer); } diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 2dd9b06..92f3cea 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -721,7 +721,9 @@ this.glDirty = false; } - if(this.graphicsData.length === 1 && this.graphicsData[0].shape.type === CONST.SHAPES.RECT) + if(this.graphicsData.length === 1 + && this.graphicsData[0].shape.type === CONST.SHAPES.RECT + && !this.graphicsData[0].lineWidth) { this._renderSpriteRect(renderer); } diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 104167f..5e2b985 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -12,7 +12,7 @@ { // TODO OPTIMISE! var i = 0; - var points = graphicsData.shape.points; + var points = graphicsData.points; if (points.length === 0) {