From cad474b100747a8b595043b0e292e5d385db7b20 Mon Sep 17 00:00:00 2001 From: Val Erastov Date: Thu, 13 Apr 2017 17:46:16 -0700 Subject: [PATCH] add alias for the toArray method of Vector --- web/app/math/vector.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/app/math/vector.js b/web/app/math/vector.js index d82875f7..7f3db534 100644 --- a/web/app/math/vector.js +++ b/web/app/math/vector.js @@ -130,6 +130,8 @@ Vector.prototype.toArray = function() { return [this.x, this.y, this.z]; }; +Vector.prototype.data = Vector.prototype.toArray; + Vector.prototype.three = function() { return new THREE.Vector3(this.x, this.y, this.z); };