Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Depth Sorting
Phaser 4.1.0
Phaser 4 examples
Depth Sorting
8
examples
Examples
8
Ball Mesh Depth Sort
Demonstrates how to use the depth property of Game Objects to handle visual layering for 3D meshes. This example parses OBJ files, performs 3D rotations on vertices, and maps the Z-coordinate of each vertex to a sprite's depth for correct sorting.
Bring To Top
Demonstrates how to move a Game Object to the front of the display list, ensuring it renders on top of all other objects in the Scene.
Isometric Blocks
Demonstrates how to calculate isometric grid coordinates and use depth sorting to maintain visual layering while animating tiles with grid-based delays.
Isometric Map Depth Sorting
Demonstrates rendering an isometric map with manual tile positioning and dynamic depth sorting for moving characters and static buildings based on their Y-axis.
Remove From Display List
Demonstrates how to remove Game Objects from the Scene's display list at runtime using a timer and random selection.
Sort Game Objects by Depth
Demonstrates how to use the depthSort method to organize an array of Game Objects based on their current rendering order in the Scene.
Sprite Depth Sorting
Learn how to use the depth property to implement Y-sorting, allowing Game Objects to appear in front of or behind one another based on their vertical screen position.
Z-Index and Depth Sorting
Change the rendering order of Game Objects using the setDepth method to bring specific items to the front of the display list.