Rewrite the processHits function to remove the balls in the hit list from the scene. If the user has removed all of the balls from the scene, display a message with the elapsed time for accomplishing this task.
Hint
Use scene.remove(objectName) in the processHits function if the alias starts with ball_.
Use scene.remove(objectName) in the processHits function if the alias starts with ball_.
Hint
Once the hits are removed from the scene, revisit the scene.objects list and make sure that there are no objects whose alias starts with ball_.
Once the hits are removed from the scene, revisit the scene.objects list and make sure that there are no objects whose alias starts with ball_.
Hint
Use a JavaScript timer to measure and display the elapsed time until task completion.
Use a JavaScript timer to measure and display the elapsed time until task completion.