Jeff Ostergaard
Programming Concepts and Applications

ACCAD 756


Task# 12
Navigating An Environment
Due Date November 19, 2002
Click on the above image once. Then use the following list of controls:

Page Up- Zoom in
Page Down- Zoom out
Right Arrow- Move crosshairs right
Left Arrow- Move crosshairs left
Up Arrow- Move crosshairs up
Down Arrow- Move crosshairs down
Source Code

//
// Ostergaard, Task 12
// Navigating An Environment
//
//
// incriment values
var dist = 10;
var scal = 5;
//
function updateFrame() {
     // called upon key event
    // moves or scales the Michigan M in relation to the key pressed below
    //
    switch (Key.getCode()) {
    case Key.UP :
      mich._y -= dist;
      break;
   case Key.DOWN :
      mich._y += dist;
      break;
   case Key.LEFT :
      mich._x -= dist;
      break;
   case Key.RIGHT :
      mich._x += dist;
      break;
   case Key.PGUP :
      mich._xscale += scal;
      mich._yscale += scal;
      break;
   case Key.PGDN :
      mich._xscale -= scal;
      mich._yscale -= scal;
      break;
   case Key.SPACE :
      // add animation frames
      break;
    }
}
//