Created
October 29, 2021 12:17
-
-
Save KrabCode/6f441da0f92666c76b54e7d2b8fe933c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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