top of page
Search
  • thebease1020

P5 Animation Test

What I did for my animation assignment on the P5 site was that I designed a blue circle and had it literally bounce all over the place. Similar to what I did in class by having an xSpeed to make it move back and forth from left to right, I also added a ySpeed so it can go up and down as well. The codes: if((xPos > 300) || (xPos < 0)) {xSpeed = -xSpeed;} and if((yPos > 350) || (yPos < 0)) {ySpeed = -ySpeed;} basically explains that if in case the circle attempts to go off screen, it automatically goes the opposite direction. The only trouble I had was trying to get it to change color after touching each background edge. Overall, I feel like I did OK here.


3 views0 comments

Recent Posts

See All
Post: Blog2_Post
bottom of page