integrator.relief

Particles standing on the child's image, rising by a color channel, springing home.

integrator.relief(layout: ReliefLayout, cfg: {
    channel: AgentChannel
    cursor: (homeW: d.v2f, off: d.v2f, z: number) => d.v3f
    stiffness: number
    maxSpeed: number
    /** Child alpha below which a particle is never latched. Match the render's `minAlpha`. */
    // Matches the splat's early-out.
    minAlpha: number
    name: string
}): (x: number, y: number) => void

Import sim from shaders/std and use sim.agentForces.integrator.relief.

Parameters

NameTypeNotes
layoutReliefLayout
cfg`{
channel: AgentChannel
cursor: (homeW: d.v2f, off: d.v2f, z: number) => d.v3f
stiffness: number
maxSpeed: number
/** Child alpha below which a particle is never latched. Match the render's `minAlpha`. */
// Matches the splat's early-out.
minAlpha: number
name: string

}` | |

Example

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

See also

  • 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.
  • force.cursorInView — The cursor on an image relief, applied where each particle appears on screen.