Skip to content

Instantly share code, notes, and snippets.

@KrabCode
Created October 29, 2021 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KrabCode/6f441da0f92666c76b54e7d2b8fe933c to your computer and use it in GitHub Desktop.
Save KrabCode/6f441da0f92666c76b54e7d2b8fe933c to your computer and use it in GitHub Desktop.
import processing.core.PApplet;
public class ExampleSketch extends TransparentApplet{
public static void main(String[] args){
PApplet.main(java.lang.invoke.MethodHandles.lookup().lookupClass());
}
@Override
public void settings(){
size(400,400,P2D);
}
@Override
public void setup(){
super.setup();
background(255);
}
@Override
public void draw(){
super.draw();
rect(width/2f-25,height/2f-25,50,50);
}
}
import processing.core.PApplet;
public class TransparentApplet extends PApplet {
public void setup(){
// do stuff here that always happens before setup() in the extending sketch
}
public void draw(){
// do stuff here that always happens before draw() in the extending sketch
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment