Question: In JavaScript/ WebGL For this assignment, you will create an enclosed 3D object with 8 or more faces. This should be done before coding via

In JavaScript/ WebGL

For this assignment, you will create an enclosed 3D object with 8 or more faces. This should be done before coding via pencil and paper. Remember to design the shape around 0,0,0. The shape must have at least 3 different colors in the vertices. When you click on the canvas it will spawn an instance of this object where you clicked and start moving in a random x and y. (Z can remain constant right now). It will also start rotating over the x, y and z at different rates for each. Should the object get close to the side (you determine how close it should be) it will bounce off the side of the canvas in the opposite direction.

If I click again, I should be able to spawn another object, and it will randomly move on its own. You do not have to worry about objects colliding with objects (unless you want too). You do not have to worry about perfect collision with the mesh and the side of the canvas, just use a distance formula.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!