repo: janusweb
action: commit
revision: 
path_from: 
revision_from: d655290797c3a68faffaf38bdbfa8a6a3086ee17:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit d655290797c3a68faffaf38bdbfa8a6a3086ee17
Author: James Baicoianu 
Date:   Sun Dec 2 01:41:02 2018 -0800

    Added depth_write / depth_test

diff --git a/scripts/object.js b/scripts/object.js
index 91a48a4b4de5ae255793d0e58c70198a1cc5b786..
index ..8700343623957406ca524bac57c7623bbf96fe69 100644
--- a/scripts/object.js
+++ b/scripts/object.js
@@ -21,6 +21,8 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
         cull_face: { type: 'string', default: 'back', set: this.updateMaterial },
         blend_src: { type: 'string', default: 'src_alpha', set: this.updateMaterial },
         blend_dest: { type: 'string', default: 'one_minus_src_alpha', set: this.updateMaterial },
+        depth_write: { type: 'boolean', default: null },
+        depth_test: { type: 'boolean', default: null },
         envmap_id: { type: 'string', set: this.updateMaterial },
         onloadstart: { type: 'callback' },
         onloadprogress: { type: 'callback' },
@@ -462,6 +464,13 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
             } else {
               m.blending = THREE.NormalBlending;
             }
+            if (this.depth_write !== null) {
+              m.depthWrite = this.depth_write;
+            }
+            if (this.depth_test !== null) {
+              m.depthTest = this.depth_test;
+            }
+
             //m.needsUpdate = true;
             m.skinning = useSkinning;
           }

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