Skip to content

Instantly share code, notes, and snippets.

@monkstone
Last active September 27, 2015 20:48
Show Gist options
  • Save monkstone/1330060 to your computer and use it in GitHub Desktop.
Save monkstone/1330060 to your computer and use it in GitHub Desktop.
Processing Main Applet Produced From Template
<#assign licenseFirst = "/*">
<#assign licensePrefix = " * ">
<#assign licenseLast = " */">
<#include "../Licenses/license-${project.license}.txt">
import processing.core.*;
/**
*
* @author ${user}
*/
@SuppressWarnings("serial")
public class ${name} extends PApplet{
@Override
public void setup(){
size(300, 300, P3D);
}
@Override
public void draw(){
}
/**
* @param passedArgs the command line arguments
*/
static public void main(String[] passedArgs) {
String[] appletArgs = new String[] {${name}.class.getName()};
if (passedArgs != null) {
PApplet.main(concat(appletArgs, passedArgs));
} else {
PApplet.main(appletArgs);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment