Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

proc.ops.sim

Simulation: what a solver's particles are born from (sim.spawn), what pushes them (sim.force), what they bounce off (sim.collider, and sim.scene_colliders for the physics shapes the scene holds), and sim.particles, the particle solver. A spawn, a force and a collider are records, cooked and cached like any value, and read by the solver through its sources, forces and colliders inputs, which open the sim context. sim.particles holds every particle of every source in one block on the device and steps it in fixed steps (spawn, apply the forces, integrate, collide, age, expire), every step a pass on the device with nothing read back. It outputs the particles alive now as points, with the live count on the device, each carrying a stream index naming its source (its name in the detail's labels.stream) and the attributes its source stamped.

ops(substrate, fieldc, fields) returns the family as a map of op id to op def; procPacks/sim.procPack registers it. A graph calls one of its ops as g.op.<id>({ ... }) and a script as proc.ops.<family>.<op>(...); the procgen toolbox's describeNode answers each in full.

Ops: sim.collider, sim.force, sim.particles, sim.scene_colliders, sim.spawn.

Part of @builtin::systems.procgen.proc; required as @builtin::systems.procgen.proc.ops.sim.