diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 8d76567..104167f 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -12,8 +12,8 @@ { // TODO OPTIMISE! var i = 0; - var points = graphicsData.points; - + var points = graphicsData.shape.points; + if (points.length === 0) { return; diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 8d76567..104167f 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -12,8 +12,8 @@ { // TODO OPTIMISE! var i = 0; - var points = graphicsData.points; - + var points = graphicsData.shape.points; + if (points.length === 0) { return; diff --git a/src/core/graphics/webgl/utils/buildPoly.js b/src/core/graphics/webgl/utils/buildPoly.js index bcd56a7..b2ace8b 100644 --- a/src/core/graphics/webgl/utils/buildPoly.js +++ b/src/core/graphics/webgl/utils/buildPoly.js @@ -25,13 +25,10 @@ } } - if (points.length < 6) - { - return; - } - if(graphicsData.fill) + if(graphicsData.fill && points.length > 6) { + // get first and last point.. figure out the middle! var verts = webGLData.points; var indices = webGLData.indices;