Skip to content

Commit 8e1ef74

Browse files
committed
box.py sketch
1 parent f967a3e commit 8e1ef74

File tree

1 file changed

+25
-0
lines changed
  • crates/processing_pyo3/examples

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from processing import *
2+
3+
angle = 0.0
4+
5+
def setup():
6+
size(800, 600, 1.0)
7+
mode_3d()
8+
9+
def draw():
10+
camera_position(100.0, 100.0, 300.0)
11+
camera_look_at(0.0, 0.0, 0.0)
12+
background(220)
13+
14+
15+
push_matrix()
16+
rotate(angle)
17+
geometry(box)
18+
pop_matrix()
19+
20+
angle += 0.02
21+
22+
23+
# TODO: this should happen implicitly on module load somehow
24+
run()
25+

0 commit comments

Comments
 (0)