Added Spline.addPoint.

This commit is contained in:
Richard Davey 2017-09-22 17:41:32 +01:00
parent 8a4fff945c
commit 649fa88f24

View file

@ -23,6 +23,15 @@ var SplineCurve = new Class({
this.points = points; this.points = points;
}, },
addPoint: function (x, y)
{
var vec = new Vector2(x, y);
this.points.push(vec);
return vec;
},
getStartPoint: function () getStartPoint: function ()
{ {
return this.points[0]; return this.points[0];