Log inGet started
Package

life.module

Newest version

README.md

secondsun.life — stage 2 of THE SECOND SUN

What is standing on the shore, and what happens to it.

What this stage owns

shotswhat moves
the hadrosaur herd2, 5five adults wading the bar east, a bow swell and spray at their legs, then turning to face the flash and bolting inland
the hatchling and its foot3, 11a step: the foot peels off the mud, is carried forward, plants; the print opens behind it and the wet mud slumps back into it
the birds2, 4a skein crossing the moon track, and a raft of 22 on the water that leaves it all at once at FLASH
the stranded fish712 fish following the water down the drainage channel and working in the shallows
the treefall front1080 conifers going over as a travelling wave, away from camera, at BLAST — and debris driven past the lens ahead of it

Everything is parented under the scene's Life anchor, spawned temporary, and rebuilt from nothing on the first tick after a hot reload.

The contract

local Life = require("secondsun.life")
Life.tick(t, dt, frame)   -- the director calls this; nobody else does

tick is a pure function of t. There is no accumulated state: one tick(66, 0, 1584) is enough to make the frame 66 s would have produced, which is what Film.seek relies on.

What the other slices read

These are data, not prose. They are the only agreement about where the animals are, and the lens slice frames them.

Life.BAR       -- { z, y, halfX }        the submerged bank the herd wades
Life.HERD      -- { x, y, z }            the herd's centre at t = 0
Life.FOOT      -- { x, y, z }            the print, on wet mud at the waterline
Life.CHANNEL   -- { x, z0, z1, halfWidth, bedY }
Life.GROVE     -- { z0, z1, halfX, count }
Life.STATIONS  -- shot2 / shot3 / shot5 / shot7 / shot10 / shot11,
               --   each { eye, look, fov } in world space

Two functions describe fronts crossing the world, the way Film.seaLevel owns the water:

Life.blastFrontZ(t)  -- where the air blast is. A tree south of it is down.
Life.burnFrontZ(t)   -- where the thermal pulse has reached.

The shore slice can lay its own forest over blastFrontZ and the two will agree about which trees are still standing on any frame.

What this stage asks of the shore slice

  • Ground at Life.BAR.z should crest near Life.BAR.y (0.30 m below sea level at t = 0), so an adult stands shin-deep rather than on the seabed.
  • Ground at Life.FOOT should be at y ≈ 0 — it is the waterline at t = 0 and the whole point of shot 11 is that the same ground is dry at t = 70.
  • The drainage channel should run near Life.CHANNEL.x with its bed no higher than Life.CHANNEL.bedY; the fish rest on that number once the sea is past it.

Assets

Four meshes generated for this stage, under /zero/source/generated/meshes/: the adult hadrosaur, the juvenile, a three-toed foot (the hero prop of shots 3 and 11), and a fish. Each bundle carries one mesh_node; this stage reads the binding once with meshBindings() and puts a plain Model on each animal, so a herd costs five component adds rather than five bundle instantiations.

Materials are in /zero/source/secondsun/life/.