Skip to content

Instantly share code, notes, and snippets.

@bdaver
bdaver / animation example
Created April 19, 2018 09:04
Animation Example using Ani Library in Processing.
import de.looksgood.ani.*;
import de.looksgood.ani.easing.*;
int y = 0;
int y2 = 0;
AniSequence seq;
void setup() {
size(500,500);
Ani.init(this); // initialize the library...
String[] data;
String[][] processedData;
int satir;
int sutun;
void setup() {
size(500,500);
background(0);
data = loadStrings("formula.csv");
satir = data.length;
sutun = split(data[0],",").length;
String yazi = "";
PFont font;
void setup() {
size(500,500);
background(0);
font = loadFont("MyanmarMN-48.vlw");
textFont(font,48);
}
void draw() {
//
void setup() {
size(500,500);
background(0);
}
void draw() {
//
}
void keyPressed(){
println(keyCode);
int tus = key;
@bdaver
bdaver / pmouseX test
Created April 5, 2018 11:48
previous and current mouse locations
void setup() {
size(500,500);
}
void draw() {
float hiz = abs(mouseX-pmouseX);
strokeWeight(hiz);
line(pmouseX,pmouseY,mouseX,mouseY);
}
float rectSize = 10;
void setup() {
size(200,200);
rectMode(CENTER);
}
void draw() {
background(0);
rect(100,100,rectSize,rectSize);
}
void mouseWheel(MouseEvent e) {
void setup() {
size(500,500);
rectMode(CENTER);
}
void draw() {
line(width/2,height/2,mouseX,mouseY);
}
void mousePressed() {
println("BASTILAR");
print(mouseButton);
String[] data;
String[][] processedData;
int sutun;
int satir;
PFont font;
void setup() {
size(1000,1000);
background(0);
// font yukleyelim
font = loadFont("Monaco-24.vlw");
color renk1 = 255; // 50,50,50
color[] renkler = {#FE4365,#FC9D9A,#F9CDAD,#C8C8A9,#83AF9B,#FE4365,#FC9D9A,#F9CDAD};
void setup() {
colorMode(RGB); //RGB OR HSV
size(1280,1024);
noStroke();
background(renk1);
frameRate(100);
print(random(10,20));
color[] palet = {#CAB286,#453633,#FFE9D4,#0F1C3C,#FF4135,#CAB286,#453633,#FFE9D4};
void setup() {
size(1280,1024);
background(255);
//print(random(10,20));
noStroke();
}
void draw() {