Search processing.org:

#

This used to work and now it doesn't
Changes in Processing 1.0
Changes in Beta 0116 (approaching 1.0)
Changes between Alpha (Release 0069) and Beta (Release 0085)

##### This used to work and now it doesn't

For each release, read the revisions.txt file (included with the download) to see what's changed since the release before it. This is where you go if your code stops working in the most recent release, or if you want to know if your favorite bug has been fixed. If you don't want to download first, you can read the most recent version here.

This page was updated prior to release 1.0.

##### Changes in Processing 1.0 (revision 0162)

The biggest changes in the months prior to release 1.0 are as follows:

- Libraries - All libraries must be placed in a folder named "libraries", inside the sketchbook folder. Do not use the main "libraries" directory in the Processing distribution, as it is reserved for the core libraries, and is not visible on Mac OS X.
- XML - The XML library is now included by default, so you won't find it in the Import Library menu anymore. In addition, the XML library since 0135 has been greatly improved, making it compatible with far more documents.
- Processing.app - The Mac OS X release of Processing is now a single .app file, more befitting an OS X application.
- Processing.exe - The Windows release has a new launcher based on launch4j. Unfortunately, some machines have a problem with the new launcher that we haven't been able to track down. If you have trouble, please help us find the problem. PDE files are also now double-clickable on Windows.
- OpenGL - All OpenGL sketches now use 2x full screen anti-aliasing. This means that these sketches are always smooth, and the smooth() and noSmooth() commands are ignored. To return to the behavior found in the beta releases, see the hint() reference.
- P2D and P3D - The P2D renderer has returned (see the size() reference) and smoothing is now enabled for both P2D and P3D. Smoothing support is unfortunately incomplete, however, and sometimes thin lines can be seen inside shapes. This is a very high priority bug to be fixed in a future release.
- Candy and PShape - The Candy SVG library has been merged into the core, which brings along a new loadShape() command and a new PShape object. The special powers of PShape will be rolled out in future releases. For the time being, loadShape() works best with the default renderer (JAVA2D). Complex shapes will often appear jagged or not at all when rendered with P2D, P3D, and OPENGL. We've also added better support for SVG files created with Inkscape.
- PVector - We've added a new class called PVector, which is a simple three-dimensional vector (also known as point or tuple) class. This is useful for storing point data, or operations on 3D points.
- Tools - A new Tools API has been created for developers who want to contribute code that extends the Processing Development Environment in some fashion. Let your creativity flow with fantastical contributions like "Color Selector 2.0", "ROT13 Code Mangler", and "I Am Rich". Visit the developer page on tools for more information. Similar to libraries, tools are installed in a folder of the same name within your sketchbook folder.
- Asynchronous Images - Big JPEGs and small pipes? We've added a new requestImage() method that loads an image in the background so that your sketch doesn't freeze when loading lots of large images over a slow connection.
- Sound - We've added Damien Di Fede's Minim library to the download. It uses the JavaSound API to provide an easy-to-use audio library. Minim has a simple API while still providing a reasonable amount of flexibility for more advanced users. Many thanks for Damien for his hard work on this excellent library.
- Present - Present mode (full screen) is handled differentl in 1.0. When run inside the PDE, only Mac OS X uses full “screen exclusive mode” with Present. Windows and Linux just do full screen windows. When run outside the PDE, all three simply create an undecorated window the size of the entire screen, and on the Mac, an option is added to the Info.plist file to hide the dock and menubar (since that cannot be done programatically from inside Java applications).
- Compiler - We've removed the old Jikes compiler and are now using the ECJ compiler from the Eclipse project. We've also tried hard to improve the quality of error messages, though some are still real gems that sound like error messages from mainframe computers in 1970s films. If you don't like the messages please help us improve them.
- Internationalization - For better internationalization support, we've changed to UTF-8 encoding when loading and saving sketches. Sketches that contain non-ASCII characters and were saved with Processing 0140 and earlier may look strange when opened. Garbled text and odd characters may appear where umlauts, cedillas, and Japanese formerly lived. If this happens, use the "Fix Encoding & Reload" option under the Tools menu. This will reload your sketch using the same method as previous versions of Processing, at which point you can re-save it which will write a proper UTF-8 version.
- Java - Linux and Windows now inlude Java 6 update 10 with the download. We still don't have support for Java 1.5 syntax yet, but we hope that the performance boosts in Java 6 will help applications run well.

Under the old numbering system, Processing 1.0 is revision 0162.

##### Changes in Beta 0116+ (approaching 1.0)

Release 0116 contains many changes, frameRate(), beginShape(), and endShape() are the biggest ones.

- framerate() is now called frameRate(), for better API consistency. It didn't make sense to have a frameCount variable and a framerate() method as its misshapen cousin.
- The default frame rate is now 60 fps. This will prevent some odd quirks with sketches running faster than they need to and throttling the resources of your machine. To disable this, you can set the frame rate arbitrarily high.
- beginShape() has changed. LINE_LOOP and LINE_STRIP have been removed because they are redundant, and not consistent with the rest of the API. beginShape(POLYGON) is no longer recommended, simply use beginShape() with no parameters when drawing an irregular shape. Code examples:

        OLD SYNTAX:
        beginShape(POLYGON);
        // call vertex() several times
        endShape()

        NEW SYNTAX:
        beginShape();
        // call vertex() several times
        endShape(CLOSE);

  endShape() with the CLOSE parameter will make the stroke on your shape continue back to where the shape started. This is the same way that POLYGON and LINE_LOOP worked.

        OLD_SYNTAX:
        beginShape(LINE_STRIP);
        // draw with vertex()
        endShape();

        NEW SYNTAX:
        noFill();
        beginShape();
        // draw with vertex();
        endShape();

  In the above case, noFill() must be called, and the CLOSE parameter to endShape() is not used, because the last point should not come back to meet the original point.

        OLD SYNTAX:
        beginShape(LINE_LOOP);
        // draw with vertex()
        endShape();

        NEW SYNTAX:
        noFill();
        beginShape();
        // draw with vertex();
        endShape(CLOSE);

  For the LINE_LOOP example, endShape(CLOSE) is used to specify close the shape. noFill() must also be called, so that the shape is not filled in.
  The two main problems with the old API were 1) LINE_LOOP was simply a POLYGON with no fill setting, this made for a strange inconsistency. 2) there was no way to draw a non-closed POLYGON shape.
  Using beginShape(POLYGON) doesn't make much sense when you're drawing a line, so this is one more reason that beginShape() with no parameters is recommended.
- The single pixel blend() methods have been removed, they were overkill. Also, the blend() function that blends a color, instead of image data, is now called blendColor().
- Along with blendColor(), a lerpColor() method has been added. It works just like lerp()... but with colors!
- writer() and reader() are now createWriter() and createReader().
- toInt() and toFloat() are now parseInt() and parseFloat(), to change to JavaScript syntax. Not sure if anyone was using these.
- Text with the JAVA2D setting no longer uses native fonts by default, which means they'll be slower and uglier. See the reference for textFont() for details and how it can be addressed.
- Threading has been modified signficantly. Some of these changes had to be undone at the last minute, so further changes are coming. The changes will fix several strange InterruptedException problems.
- The PGraphics classes have all been reworked and renamed.
  - PGraphics is an abstract class on which additional PGraphics subclasses can be built. It is an abstract class, and therefore cannot be invoked directly.
  - PGraphics2D (P2D) contains the former contents of PGraphics that are specific to 2D rendering. This will be P2D once it is complete. As of release 0126, P2D is not currently complete and cannot be used.
  - PGraphics3D (P3D), formerly PGraphics3, remains mostly unchanged.
  - PGraphicsJava2D (JAVA2D), formerly PGraphics2, is the renderer used when you call size(w, h) or size(w, h, JAVA2D). It remains the default renderer when none is specified. It is slower but more accurate than the others.
  - PGraphicsOpenGL (OPENGL) is the new name for PGraphicsGL.
- Do not use "new PGraphics" to create PGraphics objects. Instead, use createGraphics(), which will properly handle connecting the new graphics object to its parent sketch, and will enable save() to work properly. See the reference for createGraphics.
- For the same reasons as above, createImage(width, height, format) should be used instead of "new PImage" when creating images.
- More recent releases include better support for ARGB format images. This is helpful for using createImage() or createGraphics() to generate a transparent surface. Be sure to use PNG or another format that supports alpha. This support is incomplete, however, and there are a handful of bugs.
- beginFrame() and endFrame() are now beginDraw() and endDraw(). Use these around drawing commands to a PGraphics created by createGraphics(). The defaults() method should not/need not be called, just beginDraw() and endDraw().

##### Changes between Alpha (Release 0069) and Beta (Release 0085)

Between revision 0069 (the last public alpha) and the beta release (0085), many, many functions have been added, and are detailed in the complete reference. Aside from that, this page lists functions whose names have changed or fundamental API differences between the two versions.

- loop() has been removed, and is instead called draw(). If you want applications to only run draw() once (the way draw() used to work), use the function noLoop() inside of setup().
- size() should now be the very first thing in your setup(), otherwise commands that come before it may be ignored. your settings for fill() and stroke(), for instance, will disappear after you call size().
- 2D and 3D graphics are no longer completely mixed. To specify 3D graphics, instead of size(200, 200), the new way is to use size(200, 200, P3D).
- You may find that by default, your code runs more slowly in a beta release than an alpha release. The new renderers might be slower for some things, faster for others. If you want faster pixel operations, try using P3D (until P2D is available). For high-quality lines and strokeWeight() and strokeCap(), use JAVA2D (the default).
- BImage → PImage, BFont → PFont, and so on...
- For advanced users who were making their own BGraphics objects in the previous release:

      BGraphics bg = new BGraphics(200, 200);

  should be changed to:

      PGraphics pg = new PGraphics2(200, 200, null);
      pg.defaults(); // clear the buffer, get it ready

      PGraphics pg = createGraphics(200, 200);
      pg.beginDraw();
      // drawing commands for pg here
      pg.endDraw();

  We didn't realize quite how many people were using this, so we'll probably add a createGraphics() method because PGraphics2 may be temporary (instead of just PGraphics), and the "null" thing is pretty weird. Even still, this isn't quite working as expected, but it's a high priority to fix for the future, see Bug 92 for the status.
- To use OpenGL rendering, change that to size(200, 200, OPENGL), and use Sketch → Import Library → opengl. OpenGL support is incomplete, but allows for much larger screen sizes and accelerated graphics that make use of a decent graphics card.
- When using the pixels[] array of the main window, or on an image, you should first call loadPixels(). Once you're done editing, call updatePixels(). This is because the new JAVA2D and OPENGL renderers both need to post-process the image data before displaying it, which is a time-consuming operation.
- Library events are handled differently because more than one serial port or video input device can be used with Processing beta. See the documentation for movieEvent, captureEvent, and serialEvent. Documentation for clientEvent and serverEvent for network will also eventually be linked from this page.
- push() → pushMatrix()
- pop() → popMatrix()
- textureMode(NORMAL_SPACE) → textureMode(NORMALIZED)
- textureMode(IMAGE_SPACE) → textureMode(IMAGE)
- textMode(ALIGN_LEFT) → textAlign(LEFT)
- textMode(ALIGN_RIGHT) → textAlign(RIGHT)
- textMode(ALIGN_CENTER) → textAlign(CENTER)
- textSpace(SCREEN_SPACE) → textMode(SCREEN)
- textSpace(OBJECT_SPACE) → textMode(MODEL)
- font.width(String s) → textWidth(String s)
- font.ascent() → textAscent()
- font.descent() → textDescent()
- Fonts should now be more accurately sized, if your font sizing looks weird, try using "Create Font" to create a new font using the most recent release of Processing. It's strongly suggested that you do this when updated projects from alpha to beta.
- The function alpha(), when used to create an alpha mask of an image, is now mask(), to remove a conflict with the alpha() function that extracts the alpha value of a color.
- Previous default ellipseMode was CORNER → now it's ellipseMode(CENTER)
- RGBA for images → ARGB (more technically accurate)
- CENTER_DIAMETER → CENTER
- objectX, objectY, objectZ → modelX, modelY, modelZ
- curveSegments() → curveDetail()
- bezierSegments() → bezierDetail()
- splitStrings() → split() (changed in rev 0069)
- splitInts() → toInt(split()) (changed in rev 0069)
- splitFloats() → toFloat(split()) (changed in rev 0069)
- angleMode() has been removed. Radians are used for all functions. If you don't like radians, you can convert to radians to degrees via the radians() function, i.e.: sin(radians(90)).
- Four calls to bezierVertex(x, y) should instead be a single call to vertex(x, y), followed by bezierVertex(cx1, cy1, cx2, cy2, x2, y2) (two control points followed by the destination point).
- The libraries for serial, video, and network have changed completely. Check out the examples or visit the libraries reference for the full details.