repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 8fac96147f1e1f264d93cb5fc56e6f24e59846df:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 8fac96147f1e1f264d93cb5fc56e6f24e59846df
Author: James Baicoianu 
Date:   Tue Jan 23 01:46:41 2018 -0800

    sbs3d fixes

diff --git a/scripts/image.js b/scripts/image.js
index 9fee47c21926080eb9a58ff5d05244e4a08cb761..
index ..03c63faf76dc94d302eb61fd25ae0633a9096435 100644
--- a/scripts/image.js
+++ b/scripts/image.js
@@ -175,7 +175,7 @@ elation.require(['janusweb.janusbase'], function() {
       this.sidetex.image = this.texture.image;
       this.sidetex.needsUpdate = true;

-      if (this.properties.sbs3d) {
+      if (this.properties.sbs3d || this.asset.sbs3d) {
         // TODO - to really support 3d video, we need to set offset based on which eye is being rendered
         var texture = new THREE.SBSTexture(this.texture.image);
         texture.reverse = this.properties.reverse3d;
@@ -187,6 +187,7 @@ elation.require(['janusweb.janusbase'], function() {
         this.sidematerial.map.needsUpdate = true;
         this.sidematerial.map.repeat.x = .0001;
         */
+        this.objects['3d'].onBeforeRender = () => { texture.swap(); }
       }

       this.refresh();

-----END OF PAGE-----