Overview
Example apps live in the engine repo under apps/. Run from the app directory: ./plume3d . (after building) or from repo root: plume3d path/to/app.
By topic
Section titled “By topic”Window & display
Section titled “Window & display”| Example | Description |
|---|---|
| Aspect Ratio | Design resolution (1280×720) and letterbox scaling; resize to see black bars |
| Window Demo | Display window title, width, and height via the Window API |
| Example | Description |
|---|---|
| Audio Basic | Play a click (Space) and toggle looping music (M) |
| Audio 3D | 3D listener and moving source; A/D move listener, Space plays sound, source on sine path |
| Audio Player | Radio-style tuner: tune with Left/Right, stations from channels.toml, static when off-frequency |
| Audio Player 3D | 3D radio with power button, knobs, and body rotate; blend-loaded model, raycast picking |
| Audio Streaming | Streams a procedural 220 Hz sine tone via Audio.newStreamingSource; feed interleaved float PCM over time, poll queuedBuffers to pace refills |
Physics
Section titled “Physics”| Example | Description |
|---|---|
| Physics Simple | Automatic rigid bodies from Blender (floor + falling cube); toggle pause; shadow mapping |
| Physics Stack | Tower of stacked cubes; onContactBegin logs each collision |
| Physics Friction | Boxes on an inclined ramp; R resets; compares Blender friction values |
| Physics Constraint Hinge | Hinge-constrained door; Space applies impulse; FPS camera |
| Physics Particles Debris | Tier 2 debris emitter: 64 physics-body particles bouncing off the ground |
| Physics Golf | Restitution side by side: three spheres (0.0 / 0.5 / 0.9) dropped from the same height |
| Physics Mesh Terrain | Ball rolls into a procedural triangle-mesh trough; one grid drives both collider and render mesh |
| Physics Heightfield | Ball settles into a heightfield-grid bowl; one grid drives both collider and render mesh |
Character Controller
Section titled “Character Controller”| Example | Description |
|---|---|
| Character Controller | Top-down 3D: WASD/Shift/Space/C/E; mouse-aim; all CharacterState constants; shadows |
Blender / scene
Section titled “Blender / scene”| Example | Description |
|---|---|
| Blend Load | Load Cube.blend, instantiate Cube and camera/light from blend; FPS camera, raycast-drag cube |
| Example | Description |
|---|---|
| GUI Overview | Basic Nuklear GUI: two windows, labels, buttons |
| GUI Input | Live display of mouse, keys, modifiers, and window size |
| GUI Calculator | Full calculator built with GUI buttons and layout |
| GUI Configurator | Settings panel: quality, fullscreen, window size, design size, scale mode |
| GUI Terminal | In-game terminal: backtick to open; #!command methods |
| GUI Buttons | Label, color, symbol, and symbol+label buttons; repeater mode |
| GUI Sliders | sliderFloat/sliderInt, knobFloat/knobInt, progress bar |
| GUI Toggles | Checkboxes (independent), radio buttons (exclusive), selectables |
| GUI Labels | All label variants: colored, aligned (L/C/R), wrapping, colored separators |
| GUI Combo | Label, color, and symbol combo/dropdowns; inline color picker |
| GUI Chart | Animated sine wave line chart and static column chart |
| GUI Layout | All layout types: dynamic, static, row, template, space, groups |
| GUI Tree | Tree node and tab types; collapsible nested sections |
| GUI Menu | Menubar (File/Edit) and right-click contextual menu |
| GUI Popup | Static/dynamic popups; simple and custom tooltips |
| GUI Property | propertyFloat/propertyInt; filtered editString |
| GUI Theme | Dark/light switch, accent color, rounding, alpha, font loading |
| GUI Window | Window flags, bounds, show/hide, collapse, widget disable |
| GUI Showcase | Kitchen-sink: theme, sliders, checkboxes, radio, combos, menus, properties |
Mesh & graphics
Section titled “Mesh & graphics”| Example | Description |
|---|---|
| Plume Triangle | Minimal: load shader, create colored triangle mesh, draw |
| Mesh Lines | Line list, line strip, and line loop draw modes |
| Mesh Points | Point mesh with animated colors |
| Mesh Indexed | Indexed cube (8 vertices, vertex map for 12 triangles) |
| Mesh Draw Range | Animate draw range to reveal a grid of triangles over time |
| Mesh Dynamic | Animated trianglestrip (circle with wave + color animation), setVertexAttribute + flush |
| Mesh Attributes | Animate per-vertex position and color via setVertexAttribute; GUI and terminal commands |
| Instanced Mesh GPU | GPU-instanced rendering (SSBO): 1,000 animated cubes in a single draw call |
| Material Textures | Full PBR material map set (base/metallic/roughness/normal/AO/emissive) assigned to a script mesh from Wren; derivative-TBN normal mapping |
| Sprite Demo | Billboarded sprites: one texture, four tinted camera-facing quads, depth-sorted by the engine |
| SDF Text Demo | SDF text: world-space and screen-space labels, outline, wrapping, rich-text markup |
| UI Demo | Retained-mode UI: a .ui card (title, subtitle, interactive button) loaded and rendered full-window |
| UI Widgets | Retained-UI interactive widgets: a toggle and a slider whose state the game polls to recolour a swatch |
| UI Canvas | Retained-UI custom drawing: a game draws node boxes, bezier wires, and labels into a type="canvas" element |
| UI 9-Slice Demo | Retained-UI textured 9-slice: two different-sized frames share one image-by-path PNG + a .ui.component sidecar, corners unstretched |
| UI Input Demo | Retained-UI editable text input: a Name field (initial text) and a City field (placeholder), focus by click, read via elem.text |
Data & persistence
Section titled “Data & persistence”| Example | Description |
|---|---|
| Save/Load Demo | Persists a launch counter across runs with a typed, versioned SaveState + Save.write/Save.read |
Scripting
Section titled “Scripting”| Example | Description |
|---|---|
| Coroutine Demo | Cooperative coroutines: a self-cycling traffic light (Async.wait) and a per-frame counter (Async.nextFrame), both engine-ticked each frame |
| Example | Description |
|---|---|
| TOML Editor | GUI editor for game.toml (Game, Window, Physics layers, audio channels); runs standalone or against another app via --tool |
| UI Editor | WYSIWYG visual editor for retained-UI .ui documents: element tree, inspector, live canvas, selection gizmo; runs standalone or against another app via --tool |
| Node Editor | Visual node editor for animation-controller graphs: states as nodes, transitions as bezier wires; loads/edits/saves the controller TOML; runs standalone or via --tool |