This example requires a browser that supports the HTML5 <canvas> feature.

Enabling and Disabling Layers

In this example, we define a scene containing four teapots, each in a separate layer.


Then just before we render this scene we enable/disable a selection of the layers to specify which of them are included in the scene traversal.


We can specify a priority for layers if we wanted to control the order in which the geometries within them are rendered, but for this example we're just specifying the default priority of 0 because we're just demonstrating enabling/disabling of layers.



Log