From 2ddafdd0b528491fa47bd45e8cdf14df8b35435f Mon Sep 17 00:00:00 2001 From: photonstorm Date: Tue, 8 Aug 2017 17:16:23 +0100 Subject: [PATCH] Moved out of core and fixed Point path. --- v3/{src/math/vector => merge}/vec2/Abs.js | 0 v3/{src/math/vector => merge}/vec2/Add.js | 0 v3/{src/math/vector => merge}/vec2/Add3.js | 0 v3/{src/math/vector => merge}/vec2/Add4.js | 0 v3/{src/math/vector => merge}/vec2/Angle.js | 0 v3/{src/math/vector => merge}/vec2/Build.js | 0 v3/{src/math/vector => merge}/vec2/BuildOne.js | 0 v3/{src/math/vector => merge}/vec2/BuildXAxis.js | 0 v3/{src/math/vector => merge}/vec2/BuildYAxis.js | 0 v3/{src/math/vector => merge}/vec2/BuildZero.js | 0 v3/{src/math/vector => merge}/vec2/Ceil.js | 0 v3/{src/math/vector => merge}/vec2/Copy.js | 0 v3/{src/math/vector => merge}/vec2/Distance.js | 0 v3/{src/math/vector => merge}/vec2/DistanceSq.js | 0 v3/{src/math/vector => merge}/vec2/Dot.js | 0 v3/{src/math/vector => merge}/vec2/Equal.js | 0 v3/{src/math/vector => merge}/vec2/Floor.js | 0 v3/{src/math/vector => merge}/vec2/Length.js | 0 v3/{src/math/vector => merge}/vec2/LengthSq.js | 0 v3/{src/math/vector => merge}/vec2/Lerp.js | 0 v3/{src/math/vector => merge}/vec2/Mask.js | 0 v3/{src/math/vector => merge}/vec2/Max.js | 0 v3/{src/math/vector => merge}/vec2/Min.js | 0 v3/{src/math/vector => merge}/vec2/Multiply.js | 0 v3/{src/math/vector => merge}/vec2/MultiplyAdd.js | 0 v3/{src/math/vector => merge}/vec2/Neg.js | 0 v3/{src/math/vector => merge}/vec2/Normalize.js | 0 v3/{src/math/vector => merge}/vec2/ObservableVec2.js | 0 v3/{src/math/vector => merge}/vec2/PerpDot.js | 0 v3/{src/math/vector => merge}/vec2/Project.js | 0 v3/{src/math/vector => merge}/vec2/Reciprocal.js | 0 v3/{src/math/vector => merge}/vec2/ScalarAdd.js | 0 v3/{src/math/vector => merge}/vec2/ScalarBuild.js | 0 v3/{src/math/vector => merge}/vec2/ScalarMask.js | 0 v3/{src/math/vector => merge}/vec2/ScalarMax.js | 0 v3/{src/math/vector => merge}/vec2/ScalarMin.js | 0 v3/{src/math/vector => merge}/vec2/ScalarMultiply.js | 0 v3/{src/math/vector => merge}/vec2/ScalarMultiplyAdd.js | 0 v3/{src/math/vector => merge}/vec2/ScalarSub.js | 0 v3/{src/math/vector => merge}/vec2/Select.js | 0 v3/{src/math/vector => merge}/vec2/Set.js | 0 v3/{src/math/vector => merge}/vec2/Sub.js | 0 v3/{src/math/vector => merge}/vec2/Vec2.js | 0 v3/src/paths/hermite/GetPoint.js | 4 +--- v3/src/paths/hermite/GetPointWithDistance.js | 3 +-- 45 files changed, 2 insertions(+), 5 deletions(-) rename v3/{src/math/vector => merge}/vec2/Abs.js (100%) rename v3/{src/math/vector => merge}/vec2/Add.js (100%) rename v3/{src/math/vector => merge}/vec2/Add3.js (100%) rename v3/{src/math/vector => merge}/vec2/Add4.js (100%) rename v3/{src/math/vector => merge}/vec2/Angle.js (100%) rename v3/{src/math/vector => merge}/vec2/Build.js (100%) rename v3/{src/math/vector => merge}/vec2/BuildOne.js (100%) rename v3/{src/math/vector => merge}/vec2/BuildXAxis.js (100%) rename v3/{src/math/vector => merge}/vec2/BuildYAxis.js (100%) rename v3/{src/math/vector => merge}/vec2/BuildZero.js (100%) rename v3/{src/math/vector => merge}/vec2/Ceil.js (100%) rename v3/{src/math/vector => merge}/vec2/Copy.js (100%) rename v3/{src/math/vector => merge}/vec2/Distance.js (100%) rename v3/{src/math/vector => merge}/vec2/DistanceSq.js (100%) rename v3/{src/math/vector => merge}/vec2/Dot.js (100%) rename v3/{src/math/vector => merge}/vec2/Equal.js (100%) rename v3/{src/math/vector => merge}/vec2/Floor.js (100%) rename v3/{src/math/vector => merge}/vec2/Length.js (100%) rename v3/{src/math/vector => merge}/vec2/LengthSq.js (100%) rename v3/{src/math/vector => merge}/vec2/Lerp.js (100%) rename v3/{src/math/vector => merge}/vec2/Mask.js (100%) rename v3/{src/math/vector => merge}/vec2/Max.js (100%) rename v3/{src/math/vector => merge}/vec2/Min.js (100%) rename v3/{src/math/vector => merge}/vec2/Multiply.js (100%) rename v3/{src/math/vector => merge}/vec2/MultiplyAdd.js (100%) rename v3/{src/math/vector => merge}/vec2/Neg.js (100%) rename v3/{src/math/vector => merge}/vec2/Normalize.js (100%) rename v3/{src/math/vector => merge}/vec2/ObservableVec2.js (100%) rename v3/{src/math/vector => merge}/vec2/PerpDot.js (100%) rename v3/{src/math/vector => merge}/vec2/Project.js (100%) rename v3/{src/math/vector => merge}/vec2/Reciprocal.js (100%) rename v3/{src/math/vector => merge}/vec2/ScalarAdd.js (100%) rename v3/{src/math/vector => merge}/vec2/ScalarBuild.js (100%) rename v3/{src/math/vector => merge}/vec2/ScalarMask.js (100%) rename v3/{src/math/vector => merge}/vec2/ScalarMax.js (100%) rename v3/{src/math/vector => merge}/vec2/ScalarMin.js (100%) rename v3/{src/math/vector => merge}/vec2/ScalarMultiply.js (100%) rename v3/{src/math/vector => merge}/vec2/ScalarMultiplyAdd.js (100%) rename v3/{src/math/vector => merge}/vec2/ScalarSub.js (100%) rename v3/{src/math/vector => merge}/vec2/Select.js (100%) rename v3/{src/math/vector => merge}/vec2/Set.js (100%) rename v3/{src/math/vector => merge}/vec2/Sub.js (100%) rename v3/{src/math/vector => merge}/vec2/Vec2.js (100%) diff --git a/v3/src/math/vector/vec2/Abs.js b/v3/merge/vec2/Abs.js similarity index 100% rename from v3/src/math/vector/vec2/Abs.js rename to v3/merge/vec2/Abs.js diff --git a/v3/src/math/vector/vec2/Add.js b/v3/merge/vec2/Add.js similarity index 100% rename from v3/src/math/vector/vec2/Add.js rename to v3/merge/vec2/Add.js diff --git a/v3/src/math/vector/vec2/Add3.js b/v3/merge/vec2/Add3.js similarity index 100% rename from v3/src/math/vector/vec2/Add3.js rename to v3/merge/vec2/Add3.js diff --git a/v3/src/math/vector/vec2/Add4.js b/v3/merge/vec2/Add4.js similarity index 100% rename from v3/src/math/vector/vec2/Add4.js rename to v3/merge/vec2/Add4.js diff --git a/v3/src/math/vector/vec2/Angle.js b/v3/merge/vec2/Angle.js similarity index 100% rename from v3/src/math/vector/vec2/Angle.js rename to v3/merge/vec2/Angle.js diff --git a/v3/src/math/vector/vec2/Build.js b/v3/merge/vec2/Build.js similarity index 100% rename from v3/src/math/vector/vec2/Build.js rename to v3/merge/vec2/Build.js diff --git a/v3/src/math/vector/vec2/BuildOne.js b/v3/merge/vec2/BuildOne.js similarity index 100% rename from v3/src/math/vector/vec2/BuildOne.js rename to v3/merge/vec2/BuildOne.js diff --git a/v3/src/math/vector/vec2/BuildXAxis.js b/v3/merge/vec2/BuildXAxis.js similarity index 100% rename from v3/src/math/vector/vec2/BuildXAxis.js rename to v3/merge/vec2/BuildXAxis.js diff --git a/v3/src/math/vector/vec2/BuildYAxis.js b/v3/merge/vec2/BuildYAxis.js similarity index 100% rename from v3/src/math/vector/vec2/BuildYAxis.js rename to v3/merge/vec2/BuildYAxis.js diff --git a/v3/src/math/vector/vec2/BuildZero.js b/v3/merge/vec2/BuildZero.js similarity index 100% rename from v3/src/math/vector/vec2/BuildZero.js rename to v3/merge/vec2/BuildZero.js diff --git a/v3/src/math/vector/vec2/Ceil.js b/v3/merge/vec2/Ceil.js similarity index 100% rename from v3/src/math/vector/vec2/Ceil.js rename to v3/merge/vec2/Ceil.js diff --git a/v3/src/math/vector/vec2/Copy.js b/v3/merge/vec2/Copy.js similarity index 100% rename from v3/src/math/vector/vec2/Copy.js rename to v3/merge/vec2/Copy.js diff --git a/v3/src/math/vector/vec2/Distance.js b/v3/merge/vec2/Distance.js similarity index 100% rename from v3/src/math/vector/vec2/Distance.js rename to v3/merge/vec2/Distance.js diff --git a/v3/src/math/vector/vec2/DistanceSq.js b/v3/merge/vec2/DistanceSq.js similarity index 100% rename from v3/src/math/vector/vec2/DistanceSq.js rename to v3/merge/vec2/DistanceSq.js diff --git a/v3/src/math/vector/vec2/Dot.js b/v3/merge/vec2/Dot.js similarity index 100% rename from v3/src/math/vector/vec2/Dot.js rename to v3/merge/vec2/Dot.js diff --git a/v3/src/math/vector/vec2/Equal.js b/v3/merge/vec2/Equal.js similarity index 100% rename from v3/src/math/vector/vec2/Equal.js rename to v3/merge/vec2/Equal.js diff --git a/v3/src/math/vector/vec2/Floor.js b/v3/merge/vec2/Floor.js similarity index 100% rename from v3/src/math/vector/vec2/Floor.js rename to v3/merge/vec2/Floor.js diff --git a/v3/src/math/vector/vec2/Length.js b/v3/merge/vec2/Length.js similarity index 100% rename from v3/src/math/vector/vec2/Length.js rename to v3/merge/vec2/Length.js diff --git a/v3/src/math/vector/vec2/LengthSq.js b/v3/merge/vec2/LengthSq.js similarity index 100% rename from v3/src/math/vector/vec2/LengthSq.js rename to v3/merge/vec2/LengthSq.js diff --git a/v3/src/math/vector/vec2/Lerp.js b/v3/merge/vec2/Lerp.js similarity index 100% rename from v3/src/math/vector/vec2/Lerp.js rename to v3/merge/vec2/Lerp.js diff --git a/v3/src/math/vector/vec2/Mask.js b/v3/merge/vec2/Mask.js similarity index 100% rename from v3/src/math/vector/vec2/Mask.js rename to v3/merge/vec2/Mask.js diff --git a/v3/src/math/vector/vec2/Max.js b/v3/merge/vec2/Max.js similarity index 100% rename from v3/src/math/vector/vec2/Max.js rename to v3/merge/vec2/Max.js diff --git a/v3/src/math/vector/vec2/Min.js b/v3/merge/vec2/Min.js similarity index 100% rename from v3/src/math/vector/vec2/Min.js rename to v3/merge/vec2/Min.js diff --git a/v3/src/math/vector/vec2/Multiply.js b/v3/merge/vec2/Multiply.js similarity index 100% rename from v3/src/math/vector/vec2/Multiply.js rename to v3/merge/vec2/Multiply.js diff --git a/v3/src/math/vector/vec2/MultiplyAdd.js b/v3/merge/vec2/MultiplyAdd.js similarity index 100% rename from v3/src/math/vector/vec2/MultiplyAdd.js rename to v3/merge/vec2/MultiplyAdd.js diff --git a/v3/src/math/vector/vec2/Neg.js b/v3/merge/vec2/Neg.js similarity index 100% rename from v3/src/math/vector/vec2/Neg.js rename to v3/merge/vec2/Neg.js diff --git a/v3/src/math/vector/vec2/Normalize.js b/v3/merge/vec2/Normalize.js similarity index 100% rename from v3/src/math/vector/vec2/Normalize.js rename to v3/merge/vec2/Normalize.js diff --git a/v3/src/math/vector/vec2/ObservableVec2.js b/v3/merge/vec2/ObservableVec2.js similarity index 100% rename from v3/src/math/vector/vec2/ObservableVec2.js rename to v3/merge/vec2/ObservableVec2.js diff --git a/v3/src/math/vector/vec2/PerpDot.js b/v3/merge/vec2/PerpDot.js similarity index 100% rename from v3/src/math/vector/vec2/PerpDot.js rename to v3/merge/vec2/PerpDot.js diff --git a/v3/src/math/vector/vec2/Project.js b/v3/merge/vec2/Project.js similarity index 100% rename from v3/src/math/vector/vec2/Project.js rename to v3/merge/vec2/Project.js diff --git a/v3/src/math/vector/vec2/Reciprocal.js b/v3/merge/vec2/Reciprocal.js similarity index 100% rename from v3/src/math/vector/vec2/Reciprocal.js rename to v3/merge/vec2/Reciprocal.js diff --git a/v3/src/math/vector/vec2/ScalarAdd.js b/v3/merge/vec2/ScalarAdd.js similarity index 100% rename from v3/src/math/vector/vec2/ScalarAdd.js rename to v3/merge/vec2/ScalarAdd.js diff --git a/v3/src/math/vector/vec2/ScalarBuild.js b/v3/merge/vec2/ScalarBuild.js similarity index 100% rename from v3/src/math/vector/vec2/ScalarBuild.js rename to v3/merge/vec2/ScalarBuild.js diff --git a/v3/src/math/vector/vec2/ScalarMask.js b/v3/merge/vec2/ScalarMask.js similarity index 100% rename from v3/src/math/vector/vec2/ScalarMask.js rename to v3/merge/vec2/ScalarMask.js diff --git a/v3/src/math/vector/vec2/ScalarMax.js b/v3/merge/vec2/ScalarMax.js similarity index 100% rename from v3/src/math/vector/vec2/ScalarMax.js rename to v3/merge/vec2/ScalarMax.js diff --git a/v3/src/math/vector/vec2/ScalarMin.js b/v3/merge/vec2/ScalarMin.js similarity index 100% rename from v3/src/math/vector/vec2/ScalarMin.js rename to v3/merge/vec2/ScalarMin.js diff --git a/v3/src/math/vector/vec2/ScalarMultiply.js b/v3/merge/vec2/ScalarMultiply.js similarity index 100% rename from v3/src/math/vector/vec2/ScalarMultiply.js rename to v3/merge/vec2/ScalarMultiply.js diff --git a/v3/src/math/vector/vec2/ScalarMultiplyAdd.js b/v3/merge/vec2/ScalarMultiplyAdd.js similarity index 100% rename from v3/src/math/vector/vec2/ScalarMultiplyAdd.js rename to v3/merge/vec2/ScalarMultiplyAdd.js diff --git a/v3/src/math/vector/vec2/ScalarSub.js b/v3/merge/vec2/ScalarSub.js similarity index 100% rename from v3/src/math/vector/vec2/ScalarSub.js rename to v3/merge/vec2/ScalarSub.js diff --git a/v3/src/math/vector/vec2/Select.js b/v3/merge/vec2/Select.js similarity index 100% rename from v3/src/math/vector/vec2/Select.js rename to v3/merge/vec2/Select.js diff --git a/v3/src/math/vector/vec2/Set.js b/v3/merge/vec2/Set.js similarity index 100% rename from v3/src/math/vector/vec2/Set.js rename to v3/merge/vec2/Set.js diff --git a/v3/src/math/vector/vec2/Sub.js b/v3/merge/vec2/Sub.js similarity index 100% rename from v3/src/math/vector/vec2/Sub.js rename to v3/merge/vec2/Sub.js diff --git a/v3/src/math/vector/vec2/Vec2.js b/v3/merge/vec2/Vec2.js similarity index 100% rename from v3/src/math/vector/vec2/Vec2.js rename to v3/merge/vec2/Vec2.js diff --git a/v3/src/paths/hermite/GetPoint.js b/v3/src/paths/hermite/GetPoint.js index 5fdeb2d45..e8819a261 100644 --- a/v3/src/paths/hermite/GetPoint.js +++ b/v3/src/paths/hermite/GetPoint.js @@ -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. * @@ -10,7 +8,7 @@ var Point = require('../point/Point'); var GetPoint = function (curve, t, out) { if (t === undefined) { t = 0; } - if (out === undefined) { out = new Point(); } + if (out === undefined) { out = { x: 0, y: 0 }; } if (t < 0) { diff --git a/v3/src/paths/hermite/GetPointWithDistance.js b/v3/src/paths/hermite/GetPointWithDistance.js index aa0b8bd0b..37ae38352 100644 --- a/v3/src/paths/hermite/GetPointWithDistance.js +++ b/v3/src/paths/hermite/GetPointWithDistance.js @@ -1,4 +1,3 @@ -var Point = require('../point/Point'); var GetPoint = require('./GetPoint'); var FindT = require('./FindT'); @@ -12,7 +11,7 @@ var FindT = require('./FindT'); var GetPointWithDistance = function (curve, distance, out) { if (distance === undefined) { distance = 0; } - if (out === undefined) { out = new Point(); } + if (out === undefined) { out = { x: 0, y: 0 }; } if (distance <= 0) {