integrator.orientation2d
Agents that turn in place under summed torques and drift a little toward the field.
integrator.orientation2d(layout: OrientationLayout, cfg: {
home: AgentHome2
fieldAt: AgentFieldAt
torques: AgentTorque[]
maxOffset: number
name: string
}): (i: number) => void
Import sim from shaders/std and use sim.agentForces.integrator.orientation2d.
Parameters
| Name | Type | Notes |
|---|---|---|
layout | OrientationLayout | |
cfg | `{ |
home: AgentHome2
fieldAt: AgentFieldAt
torques: AgentTorque[]
maxOffset: number
name: string
}` | |
Example
integrator.orientation2d(simLayout, {home: field.jitteredGridHome(simLayout, {overscan: 0.14}), fieldAt: field.dipoleOrRadial(simLayout), torques: [torque.alignToField(simLayout), torque.rest(simLayout)], maxOffset: 0.12, name: 'filingsUpdate'})