From 58495bcdfa8f5f976e07881721b0084824484421 Mon Sep 17 00:00:00 2001 From: Casey Reas Date: Thu, 6 Sep 2012 21:47:02 +0000 Subject: [PATCH] Changes to source and XML for 2.0 Beta Reference --- core/src/processing/core/PApplet.java | 79 ++++++++++++++++--- core/src/processing/core/PGraphics.java | 55 +++++++++++-- .../examples/Topics/Shaders/Deform/Deform.pde | 5 +- .../Topics/Shaders/Monjori/Monjori.pde | 7 +- .../examples/Topics/Shaders/Nebula/Nebula.pde | 3 +- 5 files changed, 125 insertions(+), 24 deletions(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index ad4c74eee..d0802fa32 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -3348,12 +3348,9 @@ public class PApplet extends Applet /** - * ( begin auto-generated from link.xml ) - * * Links to a webpage either in the same window or in a new window. The * complete URL must be specified. - * - * ( end auto-generated ) + * *

Advanced

* Link to an external page without all the muss. *

@@ -3365,7 +3362,6 @@ public class PApplet extends Applet * or whatever you want as your browser, since Linux doesn't * yet have a standard method for launching URLs. * - * @webref input:web * @param url the complete URL, as a String in quotes * @param target the name of the window in which to load the URL, as a String in quotes * @deprecated the 'target' parameter is no longer relevant with the removal of applets @@ -5871,6 +5867,8 @@ public class PApplet extends Applet * For advanced users, the method must be 'public', which is true for all * methods inside a sketch when run from the PDE, but must explicitly be * set when using Eclipse or other development environments. + * + * @webref input:files * @param prompt message to the user * @param callback name of the method to be called when the selection is made */ @@ -5896,12 +5894,17 @@ public class PApplet extends Applet } - /** See selectInput() for details. */ + /** + * See selectInput() for details. + * + * @webref output:files + * @param prompt message to the user + * @param callback name of the method to be called when the selection is made + */ public void selectOutput(String prompt, String callback) { selectOutput(prompt, callback, null); } - - + public void selectOutput(String prompt, String callback, File file) { selectOutput(prompt, callback, file, this); } @@ -5965,7 +5968,13 @@ public class PApplet extends Applet } - /** See selectInput() for details. */ + /** + * See selectInput() for details. + * + * @webref input:files + * @param prompt message to the user + * @param callback name of the method to be called when the selection is made + */ public void selectFolder(String prompt, String callback) { selectFolder(prompt, callback, null); } @@ -10613,6 +10622,16 @@ public class PApplet extends Applet } + /** + * ( begin auto-generated from blendMode.xml ) + * + * This is a new reference entry for Processing 2.0. It will be updated shortly. + * + * ( end auto-generated ) + * + * @webref Rendering + * @param mode the blending mode to use + */ public void blendMode(int mode) { if (recorder != null) recorder.blendMode(mode); g.blendMode(mode); @@ -10644,34 +10663,72 @@ public class PApplet extends Applet } + /** + * ( begin auto-generated from loadShader.xml ) + * + * This is a new reference entry for Processing 2.0. It will be updated shortly. + * + * ( end auto-generated ) + * + * @webref rendering:shaders + * @param fragFilename name of fragment shader file + */ public PShader loadShader(String fragFilename) { return g.loadShader(fragFilename); } + /** + * @param vertFilename name of vertex shader file + */ public PShader loadShader(String fragFilename, String vertFilename) { return g.loadShader(fragFilename, vertFilename); } + /** + * ( begin auto-generated from shader.xml ) + * + * This is a new reference entry for Processing 2.0. It will be updated shortly. + * + * ( end auto-generated ) + * + * @webref rendering:shaders + * @param shader name of shader file + */ public void shader(PShader shader) { if (recorder != null) recorder.shader(shader); g.shader(shader); } + /** + * @param kind type of shader, either POINTS, LINES, or TRIANGLES + */ public void shader(PShader shader, int kind) { if (recorder != null) recorder.shader(shader, kind); g.shader(shader, kind); } + /** + * ( begin auto-generated from resetShader.xml ) + * + * This is a new reference entry for Processing 2.0. It will be updated shortly. + * + * ( end auto-generated ) + * + * @webref rendering:shaders + */ public void resetShader() { if (recorder != null) recorder.resetShader(); g.resetShader(); } + /** + * @param kind type of shader, either POINTS, LINES, or TRIANGLES + */ public void resetShader(int kind) { if (recorder != null) recorder.resetShader(kind); g.resetShader(kind); @@ -11541,9 +11598,9 @@ public class PApplet extends Applet /** - * + * * @param level either 2, 4, or 8 - */ + */ public void smooth(int level) { if (recorder != null) recorder.smooth(level); g.smooth(level); diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index 332f07b06..539d17c5d 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -1590,7 +1590,16 @@ public class PGraphics extends PImage implements PConstants { // BLEND - + /** + * ( begin auto-generated from blendMode.xml ) + * + * This is a new reference entry for Processing 2.0. It will be updated shortly. + * + * ( end auto-generated ) + * + * @webref Rendering + * @param mode the blending mode to use + */ public void blendMode(int mode) { showMissingWarning("blendMode"); } @@ -1640,34 +1649,66 @@ public class PGraphics extends PImage implements PConstants { // SHADERS - + /** + * ( begin auto-generated from loadShader.xml ) + * + * This is a new reference entry for Processing 2.0. It will be updated shortly. + * + * ( end auto-generated ) + * + * @webref rendering:shaders + * @param fragFilename name of fragment shader file + */ public PShader loadShader(String fragFilename) { showMissingWarning("loadShader"); return null; } - + /** + * @param vertFilename name of vertex shader file + */ public PShader loadShader(String fragFilename, String vertFilename) { showMissingWarning("loadShader"); return null; } - + /** + * ( begin auto-generated from shader.xml ) + * + * This is a new reference entry for Processing 2.0. It will be updated shortly. + * + * ( end auto-generated ) + * + * @webref rendering:shaders + * @param shader name of shader file + */ public void shader(PShader shader) { showMissingWarning("shader"); } - + /** + * @param kind type of shader, either POINTS, LINES, or TRIANGLES + */ public void shader(PShader shader, int kind) { showMissingWarning("shader"); } - + /** + * ( begin auto-generated from resetShader.xml ) + * + * This is a new reference entry for Processing 2.0. It will be updated shortly. + * + * ( end auto-generated ) + * + * @webref rendering:shaders + */ public void resetShader() { showMissingWarning("resetShader"); } - + /** + * @param kind type of shader, either POINTS, LINES, or TRIANGLES + */ public void resetShader(int kind) { showMissingWarning("resetShader"); } diff --git a/java/examples/Topics/Shaders/Deform/Deform.pde b/java/examples/Topics/Shaders/Deform/Deform.pde index 56e2faccf..b47cfc32d 100644 --- a/java/examples/Topics/Shaders/Deform/Deform.pde +++ b/java/examples/Topics/Shaders/Deform/Deform.pde @@ -1,9 +1,10 @@ /** - * Deform + * Deform. + * * A GLSL version of the oldschool 2D deformation effect, by Inigo Quilez. * Ported from the webGL version available in ShaderToy: * http://www.iquilezles.org/apps/shadertoy/ - * (look for Deform under the Plane Deformations Presets) + * (Look for Deform under the Plane Deformations Presets) * */ diff --git a/java/examples/Topics/Shaders/Monjori/Monjori.pde b/java/examples/Topics/Shaders/Monjori/Monjori.pde index d156ebe9e..8ff7ca468 100644 --- a/java/examples/Topics/Shaders/Monjori/Monjori.pde +++ b/java/examples/Topics/Shaders/Monjori/Monjori.pde @@ -1,13 +1,14 @@ /** - * Monjori + * Monjori. + * * GLSL version of the 1k intro Monjori from the demoscene * (http://www.pouet.net/prod.php?which=52761) * Ported from the webGL version available in ShaderToy: * http://www.iquilezles.org/apps/shadertoy/ - * (look for Monjori under the Plane Deformations Presets) + * (Look for Monjori under the Plane Deformations Presets) */ - PShader monjori; +PShader monjori; void setup() { size(640, 360, P2D); diff --git a/java/examples/Topics/Shaders/Nebula/Nebula.pde b/java/examples/Topics/Shaders/Nebula/Nebula.pde index 8cba5a518..c8b092394 100644 --- a/java/examples/Topics/Shaders/Nebula/Nebula.pde +++ b/java/examples/Topics/Shaders/Nebula/Nebula.pde @@ -1,5 +1,6 @@ /** - * Nebula + * Nebula. + * * From CoffeeBreakStudios.com (CBS) * Ported from the webGL version in GLSL Sandbox: * http://glsl.heroku.com/e#3265.2