Docs
Deep Dives
Layering
In this section we’ll talk about what is “in front” and what is “behind”.
Each subsequent drawing operation inside of _draw()
is layered on top of the previous ones. For example:
In this case, the blue rectangle will be drawn on top of the red rectangle, effectively covering it completely.
If you need more control over the drawing order, you can:
- Organize your drawing commands within the
_draw()
function to achieve the desired layering. - Use multiple nodes with different z-index values for more complex layering scenarios.
- Utilize CanvasLayer nodes for managing different rendering layers in your scene