Changement waveball pour un mouvement vertical
This commit is contained in:
parent
1af2291059
commit
57c54f92c2
@ -114,7 +114,7 @@ var myp5 = new p5(circleBall, 'c4');
|
||||
var myp5 = new p5(circleBall, 'c4bis');
|
||||
|
||||
var waveBall = function (p) {
|
||||
var x = 25;
|
||||
var x = 50;
|
||||
var y = 25;
|
||||
var ballRadius = 20;
|
||||
var t = 0;
|
||||
@ -127,7 +127,7 @@ var waveBall = function (p) {
|
||||
p.background(white);
|
||||
p.fill(black);
|
||||
t += speed;
|
||||
x = p.cos(t) * pathRadius + 50;
|
||||
y = p.cos(t) * pathRadius + 50;
|
||||
p.ellipse(x, y, ballRadius, ballRadius);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user