Skip to content

Instantly share code, notes, and snippets.

View firepunch's full-sized avatar

Mirim Yu firepunch

View GitHub Profile
@firepunch
firepunch / keyPressed()
Created May 6, 2017 15:14
Processing function - It is executed automatically when a key is pressed.
void keyPressed() {
if(key =='[') {
currentColumn--;
if(currentColumn < 0) {
currentColum = currentCount - 1;
}
} else if (key == ']') {
currentColumn++;
if(currentColumn == columnCount) {
currentColumn = 0;
@firepunch
firepunch / hellomouse.pde
Created March 19, 2017 06:59
draw a line using mouse
void setup() {
size(400, 400);
stroke(255);
// background(192,64,0);
}
void draw() {
// background(192,64,0);
line(150, 25, mouseX, mouseY);
saveFrame("helloMouse-ouput-###.png");
@firepunch
firepunch / helloworld.pde
Created March 19, 2017 06:46
draw a line
size (400,400); //sizing window
background(192,64,0);
stroke(255); //set stroke color
line (150,25,270,350);