repo: janusweb
action: commit
revision: 
path_from: 
revision_from: c635b91d12b057f812a946670eef2706365ba059:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit c635b91d12b057f812a946670eef2706365ba059
Author: James Baicoianu 
Date:   Thu Aug 17 02:03:36 2017 -0700

    Handle vector clone case

diff --git a/scripts/janusweb.js b/scripts/janusweb.js
index 97576d2d711d0bce129990e551b34cbce89a08b6..
index ..76874c19a77774300e59c1bb70073b1af53093b9 100644
--- 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-----