Last active
October 17, 2019 09:35
-
-
Save KrabCode/f7db08edad3462e856208f0ec7a19cee to your computer and use it in GitHub Desktop.
IntelliJ IDEA file template for my Processing Sketches
This file contains hidden or 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 applet.HotswapGuiSketch; | |
| import processing.core.PGraphics; | |
| public class ${NAME} extends HotswapGuiSketch { | |
| public static void main(String[] args) { | |
| HotswapGuiSketch.main("${NAME}"); | |
| } | |
| private float t; | |
| private PGraphics pg; | |
| public void settings() { | |
| size(800, 800, P2D); | |
| } | |
| public void setup() { | |
| surface.setAlwaysOnTop(true); | |
| pg = createGraphics(width, height, P2D); | |
| pg.beginDraw(); | |
| pg.background(0); | |
| pg.endDraw(); | |
| } | |
| public void draw() { | |
| t += radians(slider("t",1, true)); | |
| pg.beginDraw(); | |
| pg.background(0); | |
| pg.endDraw(); | |
| image(pg, 0, 0); | |
| rec(pg); | |
| gui(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment