feat(ludic.lab): the visual lab as a package - a scene on a plate, never a world
A scene is an entry in the open registry LabScenes, shown on a plate: a flat lit disc, the package's own small sky with the sun at one hour, and a frame clock. Headless each camera (lab_shot, lab_shot_at) settles and is written as build/lab/<scene>/<shot>.png (a stored PNG, written here); in a window N and P step through them. tools/lab/run.sh and sheet.py make the contact sheet; tools/lab/plate_build.py makes plate/. ludic.render3d gains r3d_plate_mode (no terrain, grass or water is made) and r3d_sky_path. quit() in a program with no frame loop links. The example takes ~120 MB resident, 417 MiB peak footprint. Reseed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
cc930a114f
commit
b401f7acc1
35 changed files with 4184 additions and 2986 deletions
20
packages/ludic.lab/example/plate.ludic
Normal file
20
packages/ludic.lab/example/plate.ludic
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# plate.ludic - the lab's example: one model on the plate, photographed from three cameras.
|
||||
# ludic build packages/ludic.lab/example/plate.ludic --headless -o build/lab_plate
|
||||
# yes '' | head -300 | ./build/lab_plate -> build/lab/probe/{front,side,above}.png
|
||||
# The model is the package's own probe (a box with a ball on it), so the example needs nothing
|
||||
# from any game.
|
||||
import "ludic.lab"
|
||||
program LabPlate {
|
||||
numbers float
|
||||
function probe_setup() -> void {
|
||||
lab_model(lab_plate_dir(), "probe.gltf", "probe", 0.0, 0.0, 0.5)
|
||||
lab_note("a box and a ball, in the plate's light")
|
||||
lab_shot_at("front", 0.0, 0.7, 0.0, 4.0, 0.0, 12.0)
|
||||
lab_shot_at("side", 0.0, 0.7, 0.0, 4.0, 90.0, 12.0)
|
||||
lab_shot_at("above", 0.0, 0.5, 0.0, 7.0, 30.0, 55.0)
|
||||
}
|
||||
def LabScenes probe { setup: fn probe_setup }
|
||||
handler Boot phase Start { lab_boot() }
|
||||
handler Look phase Input { lab_input() }
|
||||
handler Draw phase Render { lab_render() }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue