ludic migrate state packages <every example program> packages/ludic.lab/example/plate.ludic 1804 vars into 126 states, 64 into lets; 23498 edits in 460 files Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
1.2 KiB
Text
20 lines
1.2 KiB
Text
# 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(lab_st: mut LabState, render3d_st: mut Render3dState) -> void {
|
|
lab_model(render3d_st, lab_plate_dir(lab_st), "probe.gltf", "probe", 0.0, 0.0, 0.5)
|
|
lab_note(lab_st, "a box and a ball, in the plate's light")
|
|
lab_shot_at(lab_st, "front", 0.0, 0.7, 0.0, 4.0, 0.0, 12.0)
|
|
lab_shot_at(lab_st, "side", 0.0, 0.7, 0.0, 4.0, 90.0, 12.0)
|
|
lab_shot_at(lab_st, "above", 0.0, 0.5, 0.0, 7.0, 30.0, 55.0)
|
|
}
|
|
def LabScenes probe { setup: fn probe_setup }
|
|
handler Boot(lab_st: mut LabState, render3d_st: mut Render3dState) phase Start { lab_boot(lab_st, render3d_st) }
|
|
handler Look(lab_st: mut LabState, render3d_st: mut Render3dState) phase Input { lab_input(lab_st, render3d_st) }
|
|
handler Draw(lab_st: mut LabState, render3d_st: mut Render3dState) phase Render { lab_render(lab_st, render3d_st) }
|
|
}
|