Skip to content

Instantly share code, notes, and snippets.

View somaholiday's full-sized avatar

Soma Holiday somaholiday

View GitHub Profile
@somaholiday
somaholiday / gif_template.pde
Last active October 4, 2020 19:51
Processing Template for Creating Looping Animated GIFs (with many thanks to beesandbombs)
/*
This file is slightly adapted from the template used by beesandbombs (https://gist.github.com/beesandbombs)
Many thanks to him for sharing his work with the rest of us!
*/
void drawFPS() {
if (frameCount % 30 == 0) {
surface.setTitle(this.getClass().getName() + " | FPS : " + nf(frameRate, 2, 2) + " | Runtime: " + frameCount + " | t: " + nf(t, 1, 5));
}
}
@somaholiday
somaholiday / sketch_00_rect_follows_mouse.pde
Last active May 23, 2021 17:15
Seamlessly Looping Art • Code Samples
int rectSize = 100;
void setup() {
size(500, 500);
}
void draw() {
// This will draw a rectangle with a top-left corner where your mouse cursor is.
rect(mouseX, mouseY, rectSize, rectSize);
}