Permalink
Browse files

Use "wrapped python objects" to obviate setting special Processing va…

…riables all the time.
  • Loading branch information...
jdf committed Dec 2, 2013
1 parent e1bac37 commit 96e1e5bb8390f67190d85fc829c9c1681c406f91
@@ -281,8 +281,5 @@ def emit(self):
bindings = {}
for m in WANTED_METHODS:
bindings.setdefault(m.getName(), Binding(m.getName())).add_method(m)
-for f in WANTED_FIELDS:
- bindings.setdefault(f.getName(), Binding(f.getName())).set_field(f)
simple_method_bindings = [b for b in bindings.values() if not b.field]
-field_bindings = [b for b in bindings.values() if b.field]
@@ -44,14 +44,4 @@ public class DriverImpl extends PAppletJythonDriver {
]]]*/
/*[[[end]]]*/
}
-
- @Override
- protected void setFields() {
- /*[[[cog
- for b in p.field_bindings:
- b.emit()
- ]]]*/
- /*[[[end]]] */
- super.setFields();
- }
}
@@ -78,6 +78,7 @@ def draw():
background(50, 64, 42)
# basic lighting setup
lights()
+
# 2 rendering styles
# wireframe or solid
if isWireFrame:
@@ -87,6 +88,7 @@ def draw():
noStroke()
fill(150, 195, 125)
+ text("%s" % frameRate, 20, 40)
#center and spin toroid
translate(width / 2, height / 2, -100)
rotateX(frameCount * PI / 150)
@@ -100,6 +102,7 @@ def draw():
vertex(v[0], v[1], v[2])
endShape()
+
"""
left/right arrow keys control ellipse detail
up/down arrow keys control segment detail.
@@ -110,7 +113,7 @@ def draw():
"""
def keyPressed():
global pts, segments, isHelix, isWireFrame, latheRadius, radius
-
+ gnarble()
# clear the list of strips, to force a re-evaluation
del strips[:]
Oops, something went wrong.

0 comments on commit 96e1e5b

Please sign in to comment.