pgart
The rockhopper as a thing on screen: the meshes, the wear maps, the ten materials, the entity tree, and the pose clock that moves it.
pgart
The rockhopper as a thing on screen: the meshes, the wear maps, the ten materials, the entity tree, and the pose clock that moves it.
Exports
M.ensure() -> { [string]: MeshHandle }— builds every mesh fromluteway.penguin.pgmeshand paints the wear maps onto thelw_pg_*materials. Idempotent; the first call costs about 60 ms and the rest are free.M.make(body) -> handle— dresses one body entity. It hides whatever placeholder that body wore, takes its scale back to 1, hangs the bird's 35 parts under apg_rigchild, and hands back the pose handle:handle:setPose(name),handle:setFacing(dir),handle:setSticky(v), andhandle:dispose(). Called again for a body that already carries a rig, it returns the rig it already has.M.tick(dt)— poses every live rig. One call per frame;PenguinArtmakes it.M.report()— what each rig currently looks like: its pose, the stickiness it is showing, its facing, the vertical scale and lean it resolved to, and how many parts it carries. This is the data side of a screenshot.M.count()— how many rigs are alive.M.clear()— despawn every rig.
The poses
idle, walk, hop, fall, cling, shake. Each names a target set — lean,
stretch, squeeze, head pitch, flipper swing and spread, foot lift, body offset —
which the tick approaches exponentially, so a pose change reads as a move rather
than a cut. On top of the target sit the beats: the waddle's rock and alternating
feet, the idle's breath and its every-few-seconds flourish, the launch pop, the
braking flippers of a fall, the judder of a cling, and the wet flail of a shake.
A landing packs the bird down and a launch pulls it long, both as one decaying
oscillation.
The game camera looks along the bird's local -X, so it sees the YZ plane: a
rotation about local X (lean) and about local Y (yaw) READS there, and one about
local Z (roll) is edge-on. Every beat that has to be seen is written on lean and
yaw; roll only adds depth.
Stickiness
setSticky(v) cakes lute on the feet: a splat under each foot that grows with
v, and above 0.42 a second lump climbing each shank. The value is eased, so
a shake sheds it over a beat instead of snapping to clean.
Notes
- Everything it spawns is temporary and unsynced. The rig is a picture of the body entity, rebuilt wherever that body exists, never saved into a scene.
- The materials are named as literals. A computed asset identity cannot be
pinned, and
world.pushrefuses a world that carries one. - If the wear maps fail to paint, every material renders its own authored colour and the bird is flat rather than absent.
Scoped to this part · feeds back into the world's score.