graphic design tool
git clone https://git.lucas.co/cce-designer.git
nodes/wrangle.json (1.2K)
1 {
2 "name": "Wrangle",
3 "type": "wrangle",
4 "inputs": 1,
5 "outputs": 1,
6 "params": [
7 { "name": "input", "label": "Input", "default": "", "type": "node", "description": "The node whose geometry the script runs over. With nothing connected the script runs on empty geometry and can build its own." },
8 { "name": "class", "label": "Class", "type": "choice:Points,Primitives,Detail", "default": "Points", "description": "What the script runs once for: each point, each primitive, or once for the whole geometry (Detail). Sets what @P and @name refer to." },
9 { "name": "group", "label": "Group", "default": "", "type": "group", "description": "A group of the chosen class limiting which elements the script runs on. Empty means all; ignored in Detail class." },
10 {
11 "name": "code",
12 "label": "Code",
13 "type": "code",
14 "default": "// Runs once per point. @P is the position, @name any attribute;\n// ch(\"name\") reads a parameter, neighbours(@ptnum) the topology.\n@P.y += sin(@P.x * 4.0) * 0.15;\n",
15 "description": "The Rhai script run per element. @name reads or writes an attribute, ch(\"path\") reads a parameter. Applies on ctrl+enter or when leaving the editor; an error leaves the input unchanged.",
16 "group": "code"
17 }
18 ]
19 }