Skip to content

JonathanShihGravityBalls - #59

Open
jshih123 wants to merge 16 commits into
UCMHSProgramming2015:masterfrom
jshih123:master
Open

JonathanShihGravityBalls#59
jshih123 wants to merge 16 commits into
UCMHSProgramming2015:masterfrom
jshih123:master

Conversation

@jshih123

Copy link
Copy Markdown

No description provided.

jshih123 and others added 16 commits November 9, 2015 12:39
Color of ball based on x and y position on screen
Added air resistance to make sure the ball bounces to a smaller height
every time
Added array to control count of balls
Make sure ball doesn't escape from bottom of screen
Added a background image
Increase diameter if mouse is inside circle
If mouse is not in contact and the circle is larger than the original
size, decrease the size until it matches the original size.
Reset circle to original size if it is bigger than the width or height
of the canvas.
Rewrote code so diameter is related to -cosine function. This allows the
ball to return to its original size when the ball becomes too big.
Streamline the code using the distance function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants