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>
27 lines
1.6 KiB
Text
27 lines
1.6 KiB
Text
# state.ludic - which scene, its shots, and where the loop is in them
|
|
var lb_scene: string = ""
|
|
var lb_frame: int = 0
|
|
var lb_shot_names: []string = null
|
|
var lb_shot_pose: []float = null # 5 per shot: x, y, z, yaw and pitch in degrees
|
|
var lb_shot: int = 0 # the shot being taken or looked at
|
|
var lb_wait: int = 0 # frames held on it so far
|
|
var lb_settle: int = 45 # frames a shot is held before it is taken
|
|
var lb_out: string = "" # build/lab/<scene>
|
|
var lb_windowed: bool = false
|
|
var lb_note: string = "" # one line a scene may show under its title
|
|
var lb_font: string = "" # an overlay font atlas directory; "" draws no captions
|
|
var lb_title: string = "Ludic Lab"
|
|
var lb_draw: fn() = null # the scene's own drawing, beside the actors
|
|
var lb_shots_taken: int = 0
|
|
|
|
# frames a shot settles before it is taken (streaming, auto-exposure); 45 by default
|
|
export function lab_settle(frames: int) -> void { lb_settle = Math.max(1, frames) }
|
|
# the overlay's font atlas (a directory with font.json and font.png) for the captions
|
|
export function lab_font(dir: string) -> void { lb_font = dir }
|
|
export function lab_title(title: string) -> void { lb_title = title }
|
|
# one line under the scene's title in a window
|
|
export function lab_note(s: string) -> void { lb_note = s }
|
|
# the scene being shown, and the frame the clock is on (60 a second, whatever the machine)
|
|
export function lab_scene() -> string { return lb_scene }
|
|
export function lab_frame() -> int { return lb_frame }
|
|
export function lab_time() -> float { return float(lb_frame) / 60.0 }
|