Motion and rhythms
A rhythm is a named beat that many parts can follow, such as a breeze or a glow. When many parts follow one rhythm, they move together. These shared rhythms are what make a world feel alive.
"rhythms": {"breeze": {"period": 7, "direction": [1, 0, 0.35], "wavelength": 9}}
period is the length of one cycle in seconds (0.5–120). direction is the way the rhythm travels. wavelength (0.5–1000 m) is how far apart two parts must be to move in step again. Optional phase shifts the whole rhythm in time. A part follows a rhythm through its animation:
"animation": {"rhythm": "breeze", "sway": 0.08, "lift": 0.02, "pulse": 0.05, "delay": 0.1}
swaymoves the part along the rhythm's direction andliftmoves it up and down, in metres (±10).pulsemakes it grow and shrink a little (0–0.45);delaymakes it respond later (0–1 cycle).glowmakes a glowing part breathe: it dims by that fraction (0–1) and returns, its light too.
Each part's timing depends on where it is in the world, so you can see the breeze move across the scene. A part with no rhythm and no motion of its own stays still.
bend (radians, ±0.6) makes a part lean the way the rhythm travels while its base stays in place. Use it for grass, stems and trees. It bends from the bottom of its shape unless you set pivot [x, y, z], in metres from the part's position, in its parent's frame. Children bend with their parent, so a leaning trunk carries its crown. It needs a rhythm whose direction is not straight up.
"animation": {"rhythm": "breeze", "bend": 0.2, "delay": 0.1}
Instead of a rhythm, a part can have its own motion: angular_velocity [x, y, z] radians per second, amplitude [x, y, z] metres, period seconds, phase radians, pulse, glow, and swing [x, y, z] peak lean in radians about pivot.