repo: janusweb action: commit revision: path_from: revision_from: 973c9be88435d31e01a2b8dd7e3d152806c0a1bb: path_to: revision_to:
commit 973c9be88435d31e01a2b8dd7e3d152806c0a1bb Author: James BaicoianuDate: Thu Apr 26 03:44:30 2018 -0700 Video sbs3d/ou3d support diff --git a/scripts/video.js b/scripts/video.js
--- a/scripts/video.js
+++ b/scripts/video.js
@@ -23,7 +23,15 @@ elation.require(['janusweb.janusbase'], function() {
elation.events.add(this.video, 'loadeddata', elation.bind(this, this.videoloaded));
elation.events.add(this.video, 'playing', elation.bind(this, this.videoStartedPlaying));
- return new THREE.Mesh(geo, mat);
+ var mesh = new THREE.Mesh(geo, mat);
+ if (this.asset.sbs3d || this.asset.ou3d) {
+ mesh.onBeforeRender = (renderer, scene, camera) => {
+ if (camera.name) {
+ texture.setEye(camera.name);
+ }
+ }
+ }
+ return mesh;
} else {
console.log('ERROR - could not find video ' + this.properties.video_id);
}
-----END OF PAGE-----