Buildings cast no shadows: daylight passes player-built pieces (t37)

The lighting finds its own roof per column, skipping walls, belts, tubes, machines and molds,
and lets light through them like air, in both looks. Natural rock still shades; the
simulation's roof (steam condensing under a built roof) is unchanged. New test/t_light.js.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 16:42:07 -04:00
co-authored by Claude Opus 5.5
parent 5ce44f842e
commit 20d0627d75
5 changed files with 94 additions and 5 deletions
+3 -2
View File
@@ -352,9 +352,9 @@ Drawing (src/render/): browser only. This file: the renderer state R, colour tab
- functions: glowIndex, thermIdx, pipeCellColor, pipeBodyCell, thinPipeColor, beltLike, buildSky, initRender, resizeRender, viewCells, updateCamera, snapCamera, screenToWorld, worldToScreenPx, renderMonoFont
- variables: R, GLOW_W, GLOW_R, GLOW_G, GLOW_B, THERM, PC, TREE_R, TREE_G, TREE_B, BG, SKY_R, SKY_G, SKY_B
### src/render/light.js (79 lines)
### src/render/light.js (95 lines)
Propagated coloured light from glowing and burning cells.
- functions: computeLight
- functions: builtForLight, computeLight
### src/render/world.js (308 lines)
Scale colour without changing the smooth-look class.
@@ -509,6 +509,7 @@ The frame loop and boot.
- `test/t_econ.js`: Economy: the dock (instant sale), orders, prices, the market dip, money for machines, alloys.
- `test/t_fog.js`: Fog: surface, sight, range, saves and simulation independence.
- `test/t_furnace_repeat.js`: The starter furnaces keep working when fired again and again without cleaning, however the charge goes in: mixed, ore first with coal on top, or blown in through the vent. Each case plays furnace_play.js, which builds the design and fires it like a player.
- `test/t_light.js`: Run the renderer's lighting against real simulation data, with only canvas storage stubbed.
- `test/t_load.js`: Reload wakes nearby areas first, without losing distant water, fire or saved state.
- `test/t_molds.js`: Molds and furnaces stay usable: ingots drop below and keep their stubs, plugs over molds are cleared, spoiled castings can be knocked out, grains never drop through a grate by teleporting, and slag lets the fire breathe.
- `test/t_nozzle.js`: Blowing aims within the nozzle's reach, with room for the brush and settling.