-
Notifications
You must be signed in to change notification settings - Fork 87
Expand file tree
/
Copy pathexample.ndbx
More file actions
47 lines (47 loc) · 1.49 KB
/
example.ndbx
File metadata and controls
47 lines (47 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?xml version="1.0" encoding="UTF-8"?>
<ndbx formatVersion="0.9">
<var name="version" value="1.0"/>
<code type="python"><![CDATA[def addpoints(p):
print p
return p]]></code>
<node name="rect1" prototype="polygraph.rect">
<param name="x">
<value>0.0</value>
</param>
<param name="y">
<value>0.0</value>
</param>
<param name="width">
<value>100.0</value>
</param>
<param name="height">
<expression>width</expression>
</param>
<param name="fill">
<value>#120044ff</value>
</param>
</node>
<node name="wiggle1" prototype="builtins.root" type="nodebox.node.polygraph.Polygon">
<description>Wiggles a polygon randomly.</description>
<port name="polygon" type="nodebox.node.polygraph.Polygon"/>
<param name="wx" type="float">
<value>0.0</value>
</param>
<param name="wy" type="float">
<value>0.0</value>
</param>
<param name="_code">
<value type="python"><![CDATA[def process(self):
p = BezierPath()
for pt in self.shape:
pt.x += random(seed, -wx, wx)
pt.y += random(seed, -wy, wy)
return p]]></value>
</param>
<param name="_handle">
<value type="python"><![CDATA[def cook(self):
return PointHandle(self.node)]]></value>
</param>
</node>
<conn output="rect1" input="wiggle1" port="polygon"/>
</ndbx>