The document provides instructions for setting up and running Processing sketches within IntelliJ IDEA. It outlines steps like creating a new IntelliJ project, adding Processing's core.jar library, writing a basic Processing sketch class, and tips for running sketches and adding additional libraries.
19. Create the data folder in the root of your project.
Right click on the root folder →New →Directory
20. Basic sketch skelleton
import processing.core.PApplet;
public class Sketch1 extends PApplet {
public void setup() {}
public void draw(){}
}
21. Wanna have fullscreen mode?
static public void main(String args[]) {
PApplet.main(new String[] { "--present",
"yourPackageName.yourClassName" });
}
22. Some differences from processing
color cl = color (255, 0, 0);
becomes
int cl = color (255, 0, 0);
float f = 1.2;
becomes
float f = 1.2f;
mouseMoved(){}, draw(){}, keyPressed(){} etc.
becomes
public mouseMoved(){}, public draw(){},
public keyPressed(){}
23. Need another library
Download and unzip the library
Choose File→Project Structure
Same way as adding processings core.jar
24. Using OPENGL
Add opengl.jar, jogl.jar and gluegen-rt.jar like the core.jar
Note, On OSX the libraries are located at:
Processing.app/Contents/Resources/Java/libraries/opengl/library
Copy them to a folder of your choice.