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
|
|
@ -317,6 +317,7 @@ var ter_h_scale: float = 0.0
|
|||
var ter_o_scale: float = 0.0
|
||||
|
||||
function terrain_height(x: float, z: float) -> float {
|
||||
if ter_heights == null { return 0.0 } # a plate (r3d_plate_mode): flat at y = 0
|
||||
if ter_h_scale == 0.0 { ter_h_scale = float(TERRAIN_RES) / float(TERRAIN_HALF * 2) }
|
||||
let scale = ter_h_scale
|
||||
let fx = (x - ter_ox + float(TERRAIN_HALF)) * scale
|
||||
|
|
@ -342,6 +343,7 @@ function terrain_height_fx(x: fixed, z: fixed) -> fixed { return fixed(terrain_h
|
|||
# thousands of placement queries a chunk makes.
|
||||
var ter_bw: floats = null
|
||||
function terrain_height_smooth(x: float, z: float) -> float {
|
||||
if ter_heights == null { return 0.0 }
|
||||
if ter_h_scale == 0.0 { ter_h_scale = float(TERRAIN_RES) / float(TERRAIN_HALF * 2) }
|
||||
if ter_bw == null { ter_bw = floats(8) }
|
||||
let scale = ter_h_scale
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue