Audio Player 3D
App: apps/audio_player_3d/
A 3D radio in a scene: power button, volume/frequency knobs, and body rotation. Reuses the tuner logic and channel format from Audio Player. The radio model and scripts come from a Blend file; interaction uses raycast picking.
Run from root
Section titled “Run from root”% ./plume3d audio_player_3dor
Run from app directory
Section titled “Run from app directory”% ./../plume3d .Or: build/Debug/plume3d apps/audio_player_3d with cwd so the app finds game.toml, main.wren, and scripts.
Interaction
Section titled “Interaction”- Power — Left-click the power button toggles on/off (NLA-driven animation; state from
AnimationState.getFloat("power_on")). - Body — Left-click + drag on the radio body to rotate it (Y axis).
- Volume — Left-click + drag the volume knob; drag up = louder.
- Frequency — Left-click + drag the frequency knob or tuner to tune FM (88–108 MHz).
- Right-click + drag — Look around (FPS camera).
- WASD / Arrow keys — Move camera.
- F12 — Screenshot.
Assets
Section titled “Assets”- Channels —
Scripts/radio.toml(same format as audio_player); paths relative to app dir. - Sounds —
sounds/withstatic.wavand tracks referenced inScripts/radio.toml(or copy from../audio_player/sounds/). - 3D model —
Models/Radio_V3.blend. Loaded withResource.loadBlend(...); the “Radio” class is instantiated into the scene.
Blender setup (Plume3D addon)
Section titled “Blender setup (Plume3D addon)”- Root — Class name
Radio, scriptScripts/radio.wren, configScripts/radio.toml. - Interactables — Set Node Id (e.g.
radio_body,power_button,knob_volume,knob_frequency) so scripts can useradioRoot.nodes["radio_body"]etc.; raycast hit names use Blender object names (e.g.Radio_Body,Radio_Power_Button). - Meshes — Objects with mesh data are rendered automatically.
- Scene, Node, Camera, Light — hierarchy and rendering.
- Resource —
loadBlend, BlendResult —instantiate,nodeCount,nodeName,nodeId. - Raycast —
fromCamerafor mouse picking. - AnimationState —
getFloat/setFloatfor power state from keyframes. - Graphics — shader, view/projection; Audio, Config for channels and playback.
- Engine —
screenshot. - Gui, Input, Window.