From c4f9c41c53171f5ad79a9741ecba68bbf319dceb Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 22 Sep 2017 01:34:53 +0100 Subject: [PATCH] LineCurve can take an array of points now --- v3/src/paths/curves/line/LineCurve.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/v3/src/paths/curves/line/LineCurve.js b/v3/src/paths/curves/line/LineCurve.js index 58b4f2ee4..c019e8aa7 100644 --- a/v3/src/paths/curves/line/LineCurve.js +++ b/v3/src/paths/curves/line/LineCurve.js @@ -17,6 +17,12 @@ var LineCurve = new Class({ // vec2s function LineCurve (v1, v2) { + if (Array.isArray(v1)) + { + v2 = new Vector2(v1[2], v1[3]); + v1 = new Vector2(v1[0], v1[1]); + } + Curve.call(this); this.v1 = v1;