channel

Which part of the child's color drives a particle: luminance, luminanceInverted, red, green, blue, saturation or alpha, each a number in 0–1.

channel: { luminance, luminanceInverted, red, green, blue, saturation, alpha, byMode }

Import sim from shaders/std and use sim.agentForces.channel.

byMode maps a select prop's number (0 luminance … 6 alpha) to the same functions.

Example

integrator.relief(fieldLayout, {channel: channel.byMode[channelMode] ?? channel.luminance, cursor: force.cursorInView(fieldLayout, {perspK: 0.9}), stiffness: 18, maxSpeed: 4, minAlpha: 0.02, name: 'reliefUpdate'})

Members

See also

  • integrator — The update step of an agent simulation: one per kind of agent.