repo: janusweb action: commit revision: path_from: revision_from: c635b91d12b057f812a946670eef2706365ba059: path_to: revision_to:
commit c635b91d12b057f812a946670eef2706365ba059 Author: James BaicoianuDate: Thu Aug 17 02:03:36 2017 -0700 Handle vector clone case diff --git a/scripts/janusweb.js b/scripts/janusweb.js
--- a/scripts/janusweb.js
+++ b/scripts/janusweb.js
@@ -170,6 +170,10 @@ elation.require(['janusweb.config', 'engine.things.generic','janusweb.remoteplay
//THREE.Vector3.prototype.toString = function() { return this.toArray().map(function(d) { return d.toFixed(4); }).join(' '); }
window.Vector = function(x, y, z) {
+ if (x) {
+ if (x._target && x._target instanceof THREE.Vector3) return x._target.clone();
+ if (x instanceof THREE.Vector3) return x.clone();
+ }
if (y === undefined) y = x;
if (z === undefined) z = y;
var vec = new THREE.Vector3(x, y, z);
-----END OF PAGE-----