-
Notifications
You must be signed in to change notification settings - Fork 0
/
opy.js
51 lines (41 loc) · 994 Bytes
/
opy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
window.resizeTo(100,100);
var canvas = document.createElement("canvas");
canvas.setAttribute("width", window.innerWidth);
canvas.setAttribute("height", window.innerHeight);
canvas.setAttribute("style", "position: absolute; x:0; y:0;");
document.body.appendChild(canvas);
//Then you can draw a point at (10,10) like this:
var ctx = canvas.getContext("2d");
var x_size = 10;
var y_size = 10;
class particle {
constructor(x,y) {
this.x = x;
this.y = y;
this.a = a;
this.b = b;
}
fall(){
this.y = this.y + 1;
}
}
let user = new User("John");
user.sayHi();
function grow(input){
var output;
if (input == 99) {
output = 0;
}
else {
output = input + 1;
}
return (output);
}
while(){
var particle_array = []
//every second,
//generate particle at random x value
//add particle to array
//check that each particle has a value above minimum threshold
//remove the ones that are below from the array
}