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/scenes.ludic
Normal file
20
packages/ludic.lab/scenes.ludic
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# scenes.ludic - every scene the lab can show, added by whoever has something to look at:
|
||||
# def LabScenes deer { setup: fn deer_setup, tick: fn deer_tick }
|
||||
# setup builds what the scene shows and names its cameras (lab_shot); tick, if any, moves it each
|
||||
# frame by the lab's fixed step; draw, if any, draws what is not an actor or a scatter layer.
|
||||
export property LabScene {
|
||||
key: string = ""
|
||||
setup: fn() -> void = null
|
||||
tick: fn(float) -> void = null
|
||||
draw: fn() -> void = null
|
||||
}
|
||||
export open registry LabScenes of LabScene as LAB
|
||||
|
||||
export function lab_scene_names() -> string {
|
||||
var s = ""
|
||||
for i in 0 .. LAB_COUNT {
|
||||
if i > 0 { s = s + ", " }
|
||||
s = s + LabScenes[i].key
|
||||
}
|
||||
return s
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue