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

nodes/collision.json (2.1K)

 1 {
 2   "name": "Collision",
 3   "type": "collision",
 4   "inputs": 1,
 5   "outputs": 1,
 6   "params": [
 7     { "name": "input", "label": "Input", "default": "", "type": "node", "description": "The geometry whose points or primitives are tested against the collider and grouped." },
 8     { "name": "collider", "label": "Collider", "default": "", "type": "node", "description": "The geometry to test against, read as triangles. With nothing connected, or a collider without faces, the input passes through unchanged." },
 9     {
10       "name": "method",
11       "label": "Method",
12       "type": "choice:Inside,Proximity",
13       "default": "Inside",
14       "description": "Inside marks elements enclosed by the collider, so it needs a closed collider. Proximity marks elements within Distance of the collider's surface."
15     },
16     {
17       "name": "distance",
18       "label": "Distance",
19       "type": "slider",
20       "default": "0.05",
21       "min": 0.0,
22       "max": 1.0,
23       "step": 0.005,
24       "description": "For Proximity, how near the collider's surface an element must be to count, in world units. Unused by Inside."
25     },
26     {
27       "name": "element_type",
28       "label": "Element Type",
29       "type": "choice:Points,Primitives",
30       "default": "Points",
31       "description": "Points tests each point. Primitives tests each primitive's centroid and groups the hit primitives and their points.",
32       "group": "output"
33     },
34     { "name": "group_name", "label": "Group Name", "default": "collisions", "type": "group", "description": "Name of the group written with the elements that hit. Also written as a primitive group when primitives are tested.", "group": "output" },
35     {
36       "name": "invert",
37       "label": "Invert",
38       "type": "toggle",
39       "default": "false",
40       "description": "Groups the elements that did NOT hit the collider instead of those that did.",
41       "group": "output"
42     },
43     {
44       "name": "highlight",
45       "label": "Highlight",
46       "type": "toggle",
47       "default": "true",
48       "description": "Tints the grouped points red so the contact shows in the viewport. Off leaves colours untouched.",
49       "group": "display"
50     }
51   ]
52 }