Moved out of core and fixed Point path.

This commit is contained in:
photonstorm 2017-08-08 17:16:23 +01:00
parent 0943f5bf8f
commit 2ddafdd0b5
45 changed files with 2 additions and 5 deletions

View file

@ -1,5 +1,3 @@
var Point = require('../point/Point');
/** /**
* Get a point on the curve using the `t` (time) value, which must be between 0 and 1. * Get a point on the curve using the `t` (time) value, which must be between 0 and 1.
* *
@ -10,7 +8,7 @@ var Point = require('../point/Point');
var GetPoint = function (curve, t, out) var GetPoint = function (curve, t, out)
{ {
if (t === undefined) { t = 0; } if (t === undefined) { t = 0; }
if (out === undefined) { out = new Point(); } if (out === undefined) { out = { x: 0, y: 0 }; }
if (t < 0) if (t < 0)
{ {

View file

@ -1,4 +1,3 @@
var Point = require('../point/Point');
var GetPoint = require('./GetPoint'); var GetPoint = require('./GetPoint');
var FindT = require('./FindT'); var FindT = require('./FindT');
@ -12,7 +11,7 @@ var FindT = require('./FindT');
var GetPointWithDistance = function (curve, distance, out) var GetPointWithDistance = function (curve, distance, out)
{ {
if (distance === undefined) { distance = 0; } if (distance === undefined) { distance = 0; }
if (out === undefined) { out = new Point(); } if (out === undefined) { out = { x: 0, y: 0 }; }
if (distance <= 0) if (distance <= 0)
{ {