field.dipoleOrRadial
The field of a magnet at the cursor: a bar magnet along its travel, or a single pole.
field.dipoleOrRadial(layout: OrientationLayout): AgentFieldAt
Import sim from shaders/std and use sim.agentForces.field.dipoleOrRadial.
Parameters
| Name | Type | Notes |
|---|---|---|
layout | OrientationLayout |
Example
integrator.orientation2d(simLayout, {home, fieldAt: field.dipoleOrRadial(simLayout), torques, maxOffset: 0.12, name: 'filingsUpdate'})
See also
field.jitteredGridHome— Each agent's resting position on a jittered grid that runs past the canvas edges.torque.alignToField— Swing onto the field's line like a compass needle.