Visitar URL original
When loading layers from project settings, disable the depth layer be… · httpsgithu/engine@2483358 · GitHub
Skip to content

Commit 2483358

Browse files
committed
When loading layers from project settings, disable the depth layer because it's supposed to be enabled when needed at runtime
1 parent 98c844a commit 2483358

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎src/framework/application.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,9 @@ pc.extend(pc, function () {
854854
for (var key in props.layers) {
855855
var data = props.layers[key];
856856
data.id = parseInt(key, 10);
857-
data.enabled = true;
857+
// depth layer should only be enabled when needed
858+
// by incrementing its ref counter
859+
data.enabled = data.id !== pc.LAYERID_DEPTH;
858860
layers[key] = new pc.Layer(data);
859861
}
860862

0 commit comments

Comments
 (0)