Basketball

Objective: Create a program using HTML, SVG, and JavaScript that allows the user to move a basketball that changes colors.

Problem: It is hard to make realistic rotations of the ball when it hits the wall. It is also hard to keep the gradient from rotating with the ball.

Solution: Create a basketball SVG which has gradients. Then create a box with the basketball inside that you can manipulate from its speed, position, and color using JavaScript programming. Add code that allows the gradient to move and not rotate with the ball.

Copyright © Geronimo Aldana 2019