anchor.diff:    }
   
     void animate(double elapsed) {
  -    if (_mouse.currentlyPressedMouseButton(Mouse.LEFT) ||
  -        _mouse.currentlyPressedMouseButton(Mouse.MIDDLE)) {
  +    if (mouse.currentlyPressedButton(Mouse.LEFT) ||
  +        mouse.currentlyPressedButton(Mouse.MIDDLE)) {
         //azimuth += e.movement.x*0.01;
         //polar += e.movement.y*0.01;
  -      azimuth += _mouse.moveDeltaX * 0.01;
  -      polar += _mouse.moveDeltaY * 0.01;
  -    }
  -
  -    if (_keyboard.currentlyPressedKey(Keyboard.LEFT)) {
  +      azimuth += mouse.moveDeltaX * 0.01;
  +      polar += mouse.moveDeltaY * 0.01;
  +    }
  +
  +    if (keyboard.currentlyPressedKey(Keyboard.LEFT)) {
         azimuth += (0.03);
  -    } else if (_keyboard.currentlyPressedKey(Keyboard.RIGHT)) {
  +    } else if (keyboard.currentlyPressedKey(Keyboard.RIGHT)) {
         azimuth -= (0.03);
       }
   
  -    if (_keyboard.currentlyPressedKey(Keyboard.UP)) {
  +    if (keyboard.currentlyPressedKey(Keyboard.UP)) {
         polar += (0.03);
  -    } else if (_keyboard.currentlyPressedKey(Keyboard.DOWN)) {
  +    } else if (keyboard.currentlyPressedKey(Keyboard.DOWN)) {
         polar -= (0.03);
       }
   
  -    if (_keyboard.currentlyPressedKey(Keyboard.PAGEUP)) {
  +    if (keyboard.currentlyPressedKey(Keyboard.PAGEUP)) {
         _radius *= 0.99;
  -    } else if (_keyboard.currentlyPressedKey(Keyboard.PAGEDOWN)) {
  +    } else if (keyboard.currentlyPressedKey(Keyboard.PAGEDOWN)) {
         _radius *= 1.01;
       }
   
  -    if (_keyboard.currentlyPressedKey(Keyboard.SPACE)) {
  +    if (keyboard.currentlyPressedKey(Keyboard.SPACE)) {
         azimuth = 0.0;
         polar = 0.0;
       }
   
  -    double d = _mouse.wheelDeltaY * mouseWheelFactor;
  +    double d = mouse.wheelDeltaY * mouseWheelFactor;
       if (_radius - d > 0) _radius -= d;
   
       polar = polar.clamp(-Math.pi / 2 + 0.1, Math.pi / 2 - 0.1);
  
positive.code:     addPosFromVec(_lookAtPos);
      lookAt(_lookAtPos);
      rollLeft(roll);
      _keyboard.AfterFrameCleanup();
      _mouse.AfterFrameCleanup();
    }
  }
  
  
negative.code:     */
    }
  
    bool currentlyPressedButton(int key) =>
        _currentlyPressedButtons.contains(key);
  
    // if you use this function make sure you call AfterFrameCleanup
    bool justPressedButton(int key) => _justPressedButtons.contains(key);
  
    // if you use this function make sure you call AfterFrameCleanup
    bool justReleasedButton(int key) => _justReleasedButtons.contains(key);
  
    void AfterFrameCleanup() {
      moveDeltaY = 0;
      moveDeltaX = 0;
      wheelDeltaY = 0;
      _justReleasedButtons.clear();
      _justPressedButtons.clear();
    }
  }
  
  