splat.orientedWorld

Agents with a heading: arrows, streaks, squares, dots or comets drawn along the way they point.

splat.orientedWorld: (
  layout: WorldSplatLayout,
  cfg: OrientedWorldSplatConfig,
) => (i: number) => void

Import sim from shaders/std and use sim.agentRender.splat.orientedWorld.

Example

splat: {kernel: splat.orientedWorld(simLayout, {shape: 'arrow', res: 1024, splatRCap: 16, heading: 'velocity', agitation: 'buffer', comet: true, name: 'boidsSplat'}), threads: 'agents'}

See also

  • resolve.ramp — Rest-to-excited color from two colors, with optional motion trails.
  • renderAgents.orientedWorld — Agents with a heading, drawn as a shape pointing the way they move (or the way they are turned), colored from a rest color to an excited color.