Layers - ZackWilde27/Z3dPy GitHub Wiki
Layers can make sure that certain things are drawn over others, regardless of depth.
# AddThing(thing, *iLayer)
z3dpy.AddThing(myThing, 0)
z3dpy.AddThing(drawnOverMyThing, 1)
z3dpy.AddThing(drawnOverDrawnOverMyThing)
The initial setup is 4 layers, with the default being the third. This gives you 2 background layers and one foreground layer.
z3dpy.layers = ([], [], [], [])
To customize the layer setup, redefine it at the start of your script, just like the above:
z3dpy.layers = ([], [], [], [], [], [], ...)
With Raster(), particles are always drawn on the default / third layer, unless there are fewer layers, in which case it'll draw on the top one
Note: DebugRaster() will ignore the layers and just draw everything at once