Sunday, September 7, 2014

Processing with maven

This guide is old. Check the the new one

In case you don't know it processing is an amazing project in Java that allows you to do graphics.
(yeah, basically whatever you think of). Check the site for examples.


I took the latest stable version of processing (2.2.1), mavenized it and put it online so you can use processing in your projects with your IDE of choice

Declare this pom property
Add this third party repo to your pom:
And these dependencies:
You will need processing core that contains the processing classes.
And if you want 3D (OpenGL support) you will need gluegen and jogl-all dependencies, with their native binaries. See the following list to pick the best for you (I used natives-windows-amd64 in my case)

Example Script

After creating the project and setting up the pom file you can create a class like this one:
That will give you a nice spinning 3D cube:

Check the web for in case of error.
(You will need working video card drivers for this example to run)

No comments:

Post a Comment