git.lucas.co / cce-designer
graphic design tool
git clone https://git.lucas.co/cce-designer.git

nodes/distance.json (1.4K)

 1 {
 2  "name": "Distance",
 3  "type": "distance",
 4  "inputs": 2,
 5  "outputs": 1,
 6  "params": [
 7   { "name": "input", "label": "Input", "type": "node", "default": "", "description": "The geometry whose points are measured; each point gets its distance to the nearest point on the To surface." },
 8   { "name": "to", "label": "To", "type": "node", "default": "", "description": "The geometry to measure to, read as a surface. If it cannot be found, the input passes through and an error is reported." },
 9   { "name": "attribute", "label": "Attribute", "type": "attribute", "default": "dist", "description": "Name of the float point attribute written with each point's distance. Empty skips writing it." },
10   { "name": "direction", "label": "Direction", "type": "attribute", "default": "", "description": "If set, a vector point attribute of this name is written with the unit direction from each point toward its nearest surface point. Empty skips it." },
11   { "name": "signed", "label": "Signed", "type": "choice:false,true", "default": "false", "description": "When true, points behind the nearest face (inside the surface) get negative distances. Judged by that face's normal, so it can misread in concave creases." },
12   { "name": "maximum", "label": "Maximum", "type": "slider", "default": "0.00", "min": 0.0, "max": 10.0, "step": 0.05, "description": "Clamps the distance to at most this many world units, keeping a falloff bounded. 0 means no clamp." }
13  ]
14 }