-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: janusweb
action: commit
revision:
path_from:
revision_from: ef666c453aeeb1d87f28d72006081123c0c2d568:
path_to:
revision_to:

git.thebackupbox.net

janusweb

git://git.thebackupbox.net/janusweb

commit ef666c453aeeb1d87f28d72006081123c0c2d568
Author: James Baicoianu <james_github@baicoianu.com>
Date:   Thu Oct 22 13:19:09 2020 -0700

    alphamap_id and sbs/ou3d texture fixes

diff --git a/scripts/object.js b/scripts/object.js

index 95516a38abb367989a8e787794e304cb7145dca6..

index ..be8fcb83ea4bbe7fd8143fa656ea6d8f07241b55 100644

--- a/scripts/object.js
+++ b/scripts/object.js
@@ -386,16 +386,35 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
             elation.events.add(textureBump, 'update', elation.bind(this, this.refresh));
           }
           if (bumptextureasset.sbs3d) {
-            textureBump.repeat.x = 0.5;
-          }
-          if (bumptextureasset.ou3d) {
-            textureBump.repeat.y = 0.5;
+            textureBump.repeat.set(0.5, 1);
+          } else if (bumptextureasset.ou3d) {
+            textureBump.repeat.set(1, 0.5);
+          } else {
+            textureBump.repeat.set(1, 1);
           }
           if (textureBump) {
             //this.assignTextureParameters(textureNormal, modelasset, textureasset);
           }
         }
       }
+      if (alpha_image_id) {
+        let alphatextureasset = this.getAsset('image', alpha_image_id, true);
+        if (alphatextureasset) {
+          textureAlpha = alphatextureasset.getInstance();
+          if (!this.assetloadhandlers[alpha_image_id]) {
+            this.assetloadhandlers[alpha_image_id] = true;
+            elation.events.add(alphatextureasset, 'asset_load', elation.bind(this, this.refresh));
+            elation.events.add(textureAlpha, 'update', elation.bind(this, this.refresh));
+          }
+          if (alphatextureasset.sbs3d) {
+            textureAlpha.repeat.set(0.5, 1);
+          } else if (alphatextureasset.ou3d) {
+            textureAlpha.repeat.set(1, 0.5);
+          } else {
+            textureAlpha.repeat.set(1, 1);
+          }
+        }
+      }
       if (displacement_image_id) {
         let displacementtextureasset = this.getAsset('image', displacement_image_id, true);
         if (!displacementtextureasset) { // no image found, try video

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

-- Response ended

-- Page fetched on Sun Jun 2 15:49:30 2024