LineCurve can take an array of points now

This commit is contained in:
Richard Davey 2017-09-22 01:34:53 +01:00
parent 6bc39a82c2
commit c4f9c41c53

View file

@ -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;