Janet Lam CPSC 314 Assignment 5 Resources used: Piazza Three.js http://learningthreejs.com/data/THREEx/docs/THREEx.KeyboardState.html (for keyboard events) http://stackoverflow.com/questions/10341581/javascript-threejs-equation-to-move-an-object-in-a-circle-around-a-central-y (for moving camera) Also consulted code from assignment 2. https://github.com/mrdoob/three.js/issues/1532 To change uniform values USE FIREFOX!! d) I changed the position of the sphere with the phong lighting model to be on the outside (leftmost cube). I added two spheres, one to the left and one to the right. To the left sphere, I added a combination of refraction and refraction. To the right sphere, I used a texture map so that the sphere looks like Mars. I also added keyboard animations. Pressing 'q' makes the reflective sphere and refractive sphere orbit around the middle sphere which has yellow lighht and ambient component so it looks like a sun. Pressing 'w' stops the animation Pressing c, the camera rotates allowing the exploration of the cube map. Pressing 'r' stops the rotation Pressing s, creates a snowman as the created spheres move to the middle sphere. Pressing 'f' moves the sphere back to the outer positions. The rotation around the planet takes priority so if the sphere is rotating, it won't become part of the snowman. Pressing 'a' changes the ambient and light colour parameters randomly. To disallow extreme changes, one component has to stay the same. Pressing 'r' returns the sphere colours to default (gray). Did not change the diffuse component as that does not affect he entire sphere if shininess is high.