repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 95f8b85719130a1d6be552b29c5664cec8bc422b:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 95f8b85719130a1d6be552b29c5664cec8bc422b
Author: James Baicoianu 
Date:   Sun Sep 10 01:17:40 2023 -0700

    Default blending mode fix

diff --git a/scripts/object.js b/scripts/object.js
index ee647bbbc27d354d7c6cb64651c5e8e1c076e243..
index ..ab63063e12c7f0e868d7182806a07ac923e40e97 100644
--- a/scripts/object.js
+++ b/scripts/object.js
@@ -59,7 +59,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
         cull_face: { type: 'string', default: 'back', set: this.updateMaterial, comment: 'Hide face sides (back, front, or none)' },
         blend_src: { type: 'string', set: this.updateMaterial, comment: 'Blend mode (source)' },
         blend_dest: { type: 'string', set: this.updateMaterial, comment: 'Blend mode (destination)' },
-        blend_mode: { type: 'string', default: 'normal', set: this.updateMaterial, comment: 'Blend mode' },
+        blend_mode: { type: 'string', default: null, set: this.updateMaterial, comment: 'Blend mode' },
         depth_write: { type: 'boolean', default: null, set: this.updateMaterial },
         depth_test: { type: 'boolean', default: null, set: this.updateMaterial },
         depth_offset: { type: 'float', default: null, set: this.updateMaterial },
@@ -890,8 +890,8 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
               if (!(this.blend_src == 'src_alpha' && this.blend_dest == 'one_minus_src_alpha')) {
                 m.transparent = true;
               }
-            } else {
-              //m.blending = THREE.NormalBlending;
+            } else if (this.blend_mode) {
+              m.blending = this.blendModeMap[this.blend_mode];
             }
             if (this.depth_write !== null) {
               m.depthWrite = this.depth_write;

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