Skip to content

Instantly share code, notes, and snippets.

View davidedc's full-sized avatar

Davide Della Casa davidedc

View GitHub Profile
@paulsonnentag
paulsonnentag / cup-and-ball
Last active July 25, 2017 08:10
livecodelab sample
t = time*3
rotate 0.2, t/10, 0
scale 0.3+0.03*abs(sin(t))
pushMatrix
scale 6, 0.1, 6
box
popMatrix
leveltime=0
width=256
sealevel=20
screenshake=0
--slug
px=64
py=20
pdx=0
pdy=0
pflip=false
scale 0.4
rotate time / 800, time / 800, time / 1000
spread = ((frame / 10) % 10) - 5
move -2*spread,-2*spread,-2*spread
3 times ->
move 0,0,spread
pushMatrix
3 times ->
move 0,spread,0
pushMatrix
@vvasabi
vvasabi / TouchEvents.pde
Created September 12, 2011 18:33
Touch Events in Processing.js
void setup() {
size(400, 300);
background(255);
}
void touchMove(TouchEvent touchEvent) {
// empty the canvas
noStroke();
fill(255);
rect(0, 0, 400, 300);