simple ease
in
Programming Questions
•
1 year ago
Hey guys,
I'm learning about easing in processing, but I'm getting terrible headaches to make this work, with something that might be simple to do.. so, with this exercise, how can I make the ball slow down the velocity while it goes to the stage width lenght??
- float x = 0;
- float speed = 5;
- void setup(){
- size(200,200);
- smooth();
- frameRate(30);
- }
- void draw() {
- background(255);
- x = x + speed;
- if (x>width){
- x = width;
- }
- //display circle at X location
- stroke(0);
- fill(175);
- ellipse(x,100,32,32);
- }
1