This file contains 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
void setup() { | |
size(400, 400, P3D); | |
} | |
void draw() { | |
background(230, 230, 230); | |
pushMatrix(); | |
translate(width/2, height/2); | |
rotateX(frameCount * 0.01); |
This file contains 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
PImage img; | |
void setup() { | |
size(400, 400); | |
img = loadImage("./photo.jpg"); | |
} | |
void draw() { | |
image(img, 0, 0); |
This file contains 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
Jitter[] bugs = new Jitter[50]; | |
void setup() { | |
size(710, 400); | |
for (int i = 0; i < bugs.length; i++) { | |
bugs[i] = new Jitter(); | |
} | |
} |
This file contains 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
void setup() { | |
size(400, 400); | |
} | |
void draw() { | |
background(230); | |
pushMatrix(); | |
translate(100, 100); | |
rotate(radians(30)); |
This file contains 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
int a = 2; | |
int b = 3; | |
void setup() { | |
println(sum(a, b)); | |
println(isEvenNumber(a)); | |
println(makeText(a, b)); |
This file contains 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
int ellipseSize = 50; | |
float ellipseX = 100; | |
float ellipseY = 200; | |
void setup() { | |
size(400, 400); | |
} | |
void draw() { |
This file contains 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
let img; | |
var w = 800; | |
var h = 450; | |
function preload() { | |
img = loadImage('pict.png'); | |
} | |
function setup() { |
This file contains 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
int startX, goalX; | |
int r = 25; | |
int circleNum = 3; | |
Circle[] circles = new Circle[circleNum]; | |
void setup() { | |
size(400, 300); | |
startX = 50; | |
goalX = width - 50; |
This file contains 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
// http://icooon-mono.com/11088/ | |
PShape shape; | |
int fishNum = 50; | |
Fish[] fish = new Fish[fishNum]; | |
void setup() { | |
size(800, 600); | |
colorMode(HSB, 360, 100, 100); |
This file contains 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
let interval; | |
const buttonMapping = { | |
0: 'A', | |
1: 'X', | |
2: 'B', | |
3: 'Y', | |
4: 'RSL', | |
5: 'RSR', | |
9: 'PLUS', |
NewerOlder