Have a Go: Clearing the Scene

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_.
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_.
Hint

Use a JavaScript timer to measure and display the elapsed time until task completion.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.245.196