Log inGet started
World

First Light: Vagant

Branchmain
Branchesmain
Commit2ac9266a40

README.md

vagant.rig

The vagant's skeleton, as entities. One entity per moving part, each standing at the joint that turns it and carrying the mesh vagant.parts cut in that joint's own local space. Nothing here animates: vagant.anim writes localEulerAngles onto the handles this returns, and the transform hierarchy does the rest.

local Rig = require("vagant.rig")
local rig = Rig.build(public.entity)   -- one root, ~22 entities under it
Rig.clear(public.entity)               -- take it back down

Everything is spawned temporary, so a body is never written back into scenes/main.scene no matter how many times it is rebuilt, and the whole rig is reclaimed by despawning its one root. clear re-derives ownership from the world rather than from a remembered list, so a hot-reload, an edit/play flip and a remove-and-re-add all clear the previous body instead of stacking a second.

The handles

root hips skirt torso satchel flask head face wig armL armR foreArmL foreArmR thighL thighR shinL shinR bootL bootR lantern lanternIron lanternGlass lanternFlame lanternLight

Rig.M carries every measurement the figure is laid out from — hip height and each joint's offset in its parent's frame, in metres.

Two things worth knowing

The wig is spawned hidden. Show it with rig.wig:show().

The lantern's own housing has castsShadows turned OFF. A point light standing inside an iron box shadows every direction at once, and the fen goes black while the flame is plainly burning.