Examples Gallery¶
All examples live in packages/graphics/examples/. Run any example with:
uv run python packages/graphics/examples/<filename>.py
Getting Started¶
Example |
Description |
Demo |
Platforms |
|---|---|---|---|
Minimal 2D triangle via draw() override. |
Web, Vulkan |
||
Colourful balls bouncing off screen edges. |
Web, Vulkan |
||
Simple 3D rotating cube using the node system. |
Web, Vulkan |
2D Games¶
Example |
Description |
Demo |
Platforms |
|---|---|---|---|
Two-player Pong with paddles, ball, and score. |
Web, Vulkan |
||
CharacterBody2D with gravity, jump, and platforms. |
Web, Vulkan |
||
Classic arcade game with wrap-around physics. |
Web, Vulkan |
||
Rows of enemies, bullets, and wave progression. |
Web, Vulkan |
||
Classic two-player game built with UI widgets. |
Web, Vulkan |
||
Top-down dungeon crawler with procedural generation, loot, skill trees, and boss fights. |
Web |
3D Games¶
Example |
Description |
Demo |
Platforms |
|---|---|---|---|
Top-down arcade game with 3D objects. |
Web, Vulkan |
||
Classic arcade game with 3D meshes. |
Web, Vulkan |
||
Visual demo of the SimVX physics engine. |
Web, Vulkan |
||
Pad instrument with recording, loop, and training modes. |
Web |
||
Infinite procedural flyover with terrain, day/night cycle, and weather. |
Web, Vulkan |
||
|
3D board with animated X and O pieces. |
— |
|
Bioluminescent underwater world with boids, music, and bloom. |
Web |
2D Features¶
Example |
Description |
Demo |
Platforms |
|---|---|---|---|
PNG textures as 2D quads via draw_texture(). |
Web, Vulkan |
||
GPU-rendered tilemap with multi-layer and player-follow camera. |
Web (TileMap rendering not yet supported on web.), Vulkan |
||
Coloured point lights with shadow-casting occluders. |
Web (2D lighting not composited on web — only occluder outlines and light markers render.), Vulkan (2D lighting not composited on web.) |
||
A* pathfinding – click-to-move character on a grid. |
Web, Vulkan |
||
9-slice sprite scaling via draw_texture_region(). |
Web, Vulkan |
||
2D physics joints (pendulum chain). |
Web, Vulkan |
||
Path following with Curve2D and PathFollow2D. |
Web, Vulkan |
||
Trail rendering behind moving objects. |
Web, Vulkan |
3D Features¶
Example |
Description |
Demo |
Platforms |
|---|---|---|---|
Directional, point, and spot lights. |
Web, Vulkan |
||
|
Cascade shadow maps with debug visualisation. |
— |
|
|
Point and spot light shadow maps. |
— |
|
|
Screen-space ambient occlusion. |
— |
|
Fog and colour grading via WorldEnvironment. |
Web (Fog renders differently than desktop (no tonemap exposure on web).), Vulkan |
||
Image-based lighting with metallic spheres. |
Web (Skybox and image-based lighting not yet supported on web.), Vulkan |
||
CPU + GPU particle effects with sub-emitters, collision, trails. |
Web (No particles render on web.), Vulkan (GPUParticles3D not rendered on web; CPU emitters still work.) |
||
|
Load glTF models with PBR textures and orbit camera. |
Vulkan |
|
BlendSpace1D, crossfade, and keyframe events. |
Web, Vulkan |
||
|
Camera-based motion blur. |
Vulkan |
|
1600 instanced cubes via MultiMeshInstance3D. |
Web, Vulkan |
||
Perlin, Simplex, Value, and Cellular noise side by side. |
Web, Vulkan |
||
|
Mouse picking – click cubes to change colour. |
— |
|
|
Ray grid with animated cubes and single/multi-hit toggle. |
— |
|
|
Object visibility via render layer bitmasks. |
— |
|
|
Checkerboard textures on cubes. |
— |
|
MeshInstance3D rendering inside different parent node types. |
Web |
||
|
Text textures on 3D geometry + MSDF overlay. |
— |
|
CSG boolean operations (union, subtract, intersect). |
Web, Vulkan |
||
3D physics joints (pin, hinge). |
Web (HingeJoint3D angular limits not enforced — door rotates full 360°.), Vulkan (HingeJoint3D angular limits not enforced.) |
||
3D pathfinding with NavigationAgent3D. |
Web, Vulkan |
||
|
Skeletal animation with bone deformation. |
— |
|
|
3D path following (camera rail). |
— |
|
|
ShaderMaterial API preview — visual effect blocked on renderer integration. |
Vulkan (ShaderMaterial not yet applied on web — shapes render with default materials.) |
|
|
Interactive 3D showcase: PBR, collisions, raycasting, DebugDraw. |
— |
UI¶
Example |
Description |
Demo |
Platforms |
|---|---|---|---|
Comprehensive UI showcase with DemoRunner. |
Web |
||
|
Character input, focus routing, and scissor clipping. |
— |
|
MenuBar with PopupMenu dropdowns and z-ordering. |
Web |
||
Live scene tree inspector with expand/collapse. |
Web |
||
|
StyleBox theming system. |
— |
|
|
Interactive terminal emulator running bash. |
— |
|
|
Audio – generate and play test tones. |
— |
|
|
Translated text and locale switching. |
— |
|
|
Undo/Redo with Ctrl+Z / Ctrl+Shift+Z. |
— |
|
|
Touch gesture recognition (tap, swipe, pinch, rotate). |
— |
Debug¶
Example |
Description |
Demo |
Platforms |
|---|---|---|---|
|
Wireframe boxes, spheres, axes, and rays. |
— |
|
|
F3 debug overlay with feature cycling. |
— |