Skip to content

Commit 7e7f8a5

Browse files
committed
use peasycam
1 parent 3037031 commit 7e7f8a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

hybrid-programming/example4/example4.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import py5
22

3+
from peasy import PeasyCam
4+
35

46
torus = None
57

@@ -8,7 +10,9 @@ def setup():
810
py5.size(500, 500, py5.P3D)
911
py5.smooth(4)
1012

11-
torus = py5.utils.createTorus(200, 25, 20, 40)
13+
cam = PeasyCam(py5.get_current_sketch(), 500)
14+
15+
torus = py5.utils.createTorus(200, 40, 20, 50)
1216

1317
py5.stroke(0)
1418
py5.stroke_weight(3)
@@ -17,7 +21,6 @@ def setup():
1721

1822
def draw():
1923
py5.background(128)
20-
py5.translate(py5.width / 2, py5.height / 2, 0)
2124
py5.shape(torus)
2225

2326

0 commit comments

Comments
 (0)