repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 5d418777b21618c3bbeb20f38e174a73589989be:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 5d418777b21618c3bbeb20f38e174a73589989be
Author: James Baicoianu 
Date:   Tue Dec 10 15:18:12 2019 -0800

    Support for image_id thumbnails for videos

diff --git a/scripts/object.js b/scripts/object.js
index 242775d3776265a58251beb0e46831673c5f15d9..
index ..2a41e35f9ad04a8fdb17cc2482fdc40b72404380 100644
--- a/scripts/object.js
+++ b/scripts/object.js
@@ -146,7 +146,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
     this.updateVideo = function() {
       if (!this.modelasset) return;
       if (!this.videoasset || this.videoasset.name != this.video_id) {
-        if (this.video_id && this.video_id != '') {
+        if (this.video_id && this.video_id != '' && !this.image_id) {
           this.loadVideo(this.video_id);
           if (this.modelasset && texture) {
             this.assignTextureParameters(texture, this.modelasset);
@@ -206,8 +206,13 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
           }
           this.url = url;
         }
+/*
         this.pickable = false;
         this.collidable = false;
+*/
+        if (!this.collision_id) {
+          this.collision_id = this.janusid;
+        }

         if (this.objects['3d']) {
           if (!this.websurface) {
@@ -377,7 +382,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
           }
         }
       }
-      if (this.video_id && this.video_id != '') {
+      if (this.video_id && this.video_id != '' && this.image_id == '') {
         this.loadVideo(this.video_id);
         texture = this.videotexture;
         if (texture) {
@@ -848,7 +853,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
       }
       */
       if (this.video_id) {
-        if (this.videoasset && this.videotexture) {
+        if (this.videoasset && this.videotexture && !this.image_id) {
           var texture = this.videotexture;
           var video = texture.image;
           if (!video.playing && this.videoasset.auto_start) {

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