mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 20:53:39 +00:00
Moved out of core and fixed Point path.
This commit is contained in:
parent
0943f5bf8f
commit
2ddafdd0b5
45 changed files with 2 additions and 5 deletions
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue