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 (No audio), 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. |
— |
|
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. |
— |
2D Features¶
Example |
Description |
Demo |
Platforms |
|---|---|---|---|
|
PNG textures as 2D quads via draw_texture(). |
— |
|
|
GPU-rendered tilemap with multi-layer and camera panning. |
— |
|
|
Coloured point lights with shadow-casting occluders. |
— |
|
|
A* pathfinding – click-to-move character on a grid. |
— |
|
|
9-slice sprite scaling via draw_texture_region(). |
— |
|
|
2D physics joints (pendulum chain). |
— |
|
|
Path following with Curve2D and PathFollow2D. |
— |
|
|
Trail rendering behind moving objects. |
— |
3D Features¶
Example |
Description |
Demo |
Platforms |
|---|---|---|---|
|
Directional, point, and spot lights. |
— |
|
|
Cascade shadow maps with debug visualisation. |
— |
|
|
Point and spot light shadow maps. |
— |
|
|
Screen-space ambient occlusion. |
— |
|
|
Fog and colour grading via WorldEnvironment. |
— |
|
|
Image-based lighting with metallic spheres. |
— |
|
|
CPU + GPU particle effects with sub-emitters, collision, trails. |
— |
|
|
Load glTF models with PBR textures and orbit camera. |
— |
|
|
BlendSpace1D, crossfade, and keyframe events. |
— |
|
|
Camera-based motion blur. |
— |
|
|
1600 instanced cubes via MultiMeshInstance3D. |
— |
|
|
Perlin, Simplex, Value, and Cellular noise side by side. |
— |
|
|
Mouse picking – click cubes to change colour. |
— |
|
|
4x4 grid picking – click to toggle green/red. |
— |
|
|
Ray grid with animated cubes and single/multi-hit toggle. |
— |
|
|
Object visibility via render layer bitmasks. |
— |
|
|
Checkerboard textures on cubes. |
— |
|
|
MeshInstance3D inside different physics body types. |
— |
|
|
Track rendering with StaticBody3D segments. |
— |
|
|
Editor gizmo interaction demo. |
— |
|
|
Text textures on 3D geometry + MSDF overlay. |
— |
|
|
CSG boolean operations (union, subtract, intersect). |
— |
|
|
3D physics joints (pin, hinge). |
— |
|
|
3D pathfinding with NavigationAgent3D. |
— |
|
|
Skeletal animation with bone deformation. |
— |
|
|
3D path following (camera rail). |
— |
|
|
Custom ShaderMaterial with animated uniforms. |
— |
UI¶
Example |
Description |
Demo |
Platforms |
|---|---|---|---|
|
Widget rendering, input, focus, and signals. |
— |
|
|
Comprehensive UI showcase with DemoRunner. |
— |
|
|
Character input, focus routing, and scissor clipping. |
— |
|
|
MenuBar with PopupMenu dropdowns and z-ordering. |
— |
|
|
Live scene tree inspector with expand/collapse. |
— |
|
|
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). |
— |
Rendering Internals¶
Example |
Description |
Demo |
Platforms |
|---|---|---|---|
|
Raw Vulkan – vertex buffers, transforms, SSBOs. |
— |
|
|
10,000-cube wave grid – instanced rendering stress test. |
— |
Debug¶
Example |
Description |
Demo |
Platforms |
|---|---|---|---|
|
Wireframe boxes, spheres, axes, and rays. |
— |
|
|
F3 debug overlay with feature cycling. |
— |
|
|
Crosshair at mouse position with button hit zones. |
— |
|
|
Interactive engine feature showcase. |
— |
|
|
IDE panel layout and docking. |
— |
|
|
Basic 3D rendering from multiple camera angles. |
— |
|
|
MSDF vs FreeType bitmap text rendering comparison. |
— |