Log inGet started
Package

fieldDistance.procNode

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

field.distance (procNode)

How far each element's position is from a target, as a Float field. It makes the target the wired b field or, when b is left unwired, the fixed point as a constant field (value.fallback, field.constant), then measures with field.vector_math in distance mode from a to that target. The result compiles to the device with the rest of the field chain.

Inputs

  • a (Field<Vec3> | Vec3): the positions being measured, one per element.
  • b (Field<Vec3> | Vec3): what each element is measured to, per element, so the target can move with the element. Wired, it stands in for point.
  • point (Vec3, default { 0, 0, 0 }): one fixed position every element is measured to when b is unwired. It is how a radial falloff around a place is built.

Outputs

  • field: the distance, a Float field.

Which graph calls it

This node is built with proc.graph and g:node, and a proc.graph graph calls it as g:node("<id>", "field.distance", ...). A graph built with proc.define calls g.field.distance in its place, the node written in the call form; g.op.field.distance there is refused, naming it.