diff --git a/examples/Basics/BasicOperations/BasicOperations.rpde b/examples/Basics/BasicOperations/BasicOperations.rpde index 933802e..7050c54 100644 --- a/examples/Basics/BasicOperations/BasicOperations.rpde +++ b/examples/Basics/BasicOperations/BasicOperations.rpde @@ -10,7 +10,7 @@ ellipse(56, 46, 55, 55) quad(38, 31, 86, 20, 69, 63, 30, 76) -bezierDetail(as.integer(12)) +bezierDetail(12) bezier(85, 20, 10, 10, 90, 90, 15, 80) diff --git a/examples/Basics/ThreeDimensionalCube/ThreeDimensionalCube.rpde b/examples/Basics/ThreeDimensionalCube/ThreeDimensionalCube.rpde index 8eb0c64..1b201e6 100644 --- a/examples/Basics/ThreeDimensionalCube/ThreeDimensionalCube.rpde +++ b/examples/Basics/ThreeDimensionalCube/ThreeDimensionalCube.rpde @@ -1,9 +1,9 @@ settings <- function() { - size(500, 500, "processing.opengl.PGraphics3D") + size(500, 500, P3D) } setup <- function() { - colorMode(as.integer(1), 1) + colorMode(1, 1) frameRate(24) } diff --git a/src/rprocessing/applet/BuiltinApplet.java b/src/rprocessing/applet/BuiltinApplet.java index c7747e4..a52e9b6 100644 --- a/src/rprocessing/applet/BuiltinApplet.java +++ b/src/rprocessing/applet/BuiltinApplet.java @@ -42,6 +42,26 @@ public void size(double width, double height, StringVector renderer) { super.size((int) width, (int) height, renderer.asString()); } + public void bezierDetail(double detail) { + super.bezierDetail((int) detail); + } + + public void colorMode(double mode) { + super.colorMode((int) mode); + } + + public void colorMode(double mode, float max) { + super.colorMode((int) mode, max); + } + + public void colorMode(double mode, float max1, float max2, float max3) { + super.colorMode((int) mode, max1, max2, max3); + } + + public void colorMode(double mode, float max1, float max2, float max3, float maxA) { + super.colorMode((int) mode, max1, max2, max3, maxA); + } + public double frameCount() { return super.frameCount; } @@ -128,9 +148,9 @@ protected void wrapKeyVariables() { if (lastKey != key) { lastKey = key; /* - * If key is "CODED", i.e., an arrow key or other non-printable, pass that - * value through as-is. If it's printable, convert it to a unicode string, - * so that the user can compare key == 'x' instead of key == ord('x'). + * If key is "CODED", i.e., an arrow key or other non-printable, pass that value through + * as-is. If it's printable, convert it to a unicode string, so that the user can compare key + * == 'x' instead of key == ord('x'). */ final char pyKey = key == CODED ? parseChar(Integer.valueOf(key)) : parseChar(key); this.renjinEngine.put("key", pyKey);