HW1: Camera Control

CS 493, Dr. Lawlor

For this homework, I'd like you to build a usable camera control system using WebGL.

Here are the features your system should support:
  1. Drag the mouse, and the camera looks around. PixAnvil now supports "lib.mousedx" and "lib.mousedy" values, that give the mouse's per-frame relative motion in pixels. I personally like to only move the viewpoint if the mouse is down (using "lib.mouseleft"), but this is up to you. I also try to model the control after standard first-person games *without* Y inverted, but this is also to taste.
  2. Press the W key, and the camera moves forward (see "lib.key['w']"). Press the D or A key, and the camera should translate to the right or left respectively.
This can actually be accomplished using Euler angles, quaternions, or matrix math. I don't think there's a single correct choice--there are good and bad things about each approach.

I heartily recommend doing your initial testing using a simple object (like a lumpy sphere) first, since the THREE.Camera inherits basically all its motion commands (rotation, quaternion, and matrix) from the generic THREE.Object3D. Debug help: Turn in your HTML file (see the "Save" tab) via Blackboard by midnight Thursday, February 7.