This file contains hidden or 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
| var earth = []; | |
| var moon = []; | |
| function setup() { | |
| createCanvas(800, 500); | |
| background(0); | |
| for (var i = 0; i < 3; i++) { | |
| moon.push(new Particle(random(100, 200), random(150, 250), random(1, 3))); | |
| moon[i].vel.y = random(1, 2); |
This file contains hidden or 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
| var planets = []; | |
| var particles = []; | |
| function setup() { | |
| createCanvas(1200, 800); | |
| for (var i = 0; i < 7; i++) { | |
| planets.push(new Planet(-500 + 130 * i, -400 + 130 * i, random(80, 120))); // x,y,radius | |
| } |
This file contains hidden or 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
| var earth; | |
| var moon; | |
| function setup() { | |
| createCanvas(1000, 600); | |
| background(0); | |
| earth = new Earth(0, 0, random(30, 50)); | |
| moon = new Moon(100, 100, random(3, 5)); |
This file contains hidden or 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
| var planets = []; | |
| var particles = []; | |
| function setup() { | |
| createCanvas(1200, 800); | |
| planets.push(new Planet(-300, random(-200, 200), random(80, 120))); // x,y,radius | |
| planets.push(new Planet(300, random(-200, 200), random(150, 200))); // x,y,radius |
This file contains hidden or 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
| var particles = []; | |
| function setup() { | |
| createCanvas(1000, 600); | |
| background(0); | |
| for (var i = 0; i < 80; i++) { | |
| particles.push(new Particle(width / 2, height / 2)); | |
| } | |
| } |
This file contains hidden or 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
| var circles = []; | |
| var gravity; | |
| var mouseForce; | |
| function setup() { | |
| createCanvas(500, 600); | |
| background(0); | |
| for (var i = 0; i < 10; i++) { |
This file contains hidden or 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
| var x; | |
| var y = 1; | |
| var xspeed, yspeed; | |
| var gravity; | |
| var mouseForce; | |
| var randomSize; | |
| var randomColor; | |
| function setup() { | |
| createCanvas(500, 600); |
This file contains hidden or 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
| //co-coding With GuangyuWu | |
| boolean serialMode = true; | |
| boolean debugMode = false; | |
| boolean testMode = false; | |
| boolean xbeeOn = false; | |
| boolean showData = false; | |
| boolean gameEnd = false; | |
| int timeFromEnd = 0; | |
| //int _endFrameCount = 0; |
This file contains hidden or 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
| import ddf.minim.*; | |
| Minim minim; | |
| AudioPlayer groove; | |
| PImage img; | |
| PImage img1; | |
| PImage img2; | |
| PImage img3; |
This file contains hidden or 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
| import processing.serial.*; | |
| Serial myPort; | |
| int valueFromArduino; | |
| void setup() { | |
| size(500, 500); | |
| background(0); | |
| // print(int('a'));// print out=97 | |
| //print(char(97));// print out=a | |
| //print(Serial.list()); |