Commits

Cliff Biffle committed 8c25cb9

Pinch-zoom gestures now dolly the camera in and out of the scene.

Comments (0)

Files changed (1)

   }
 }
 
+- (void) magnifyWithEvent: (NSEvent *)theEvent {
+  float mag = (float) [theEvent magnification];
+  camera.pos.z += mag;
+  camera.target.z += mag;
+  [self updateProjection];
+  [self setNeedsDisplay: YES];
+}
+
 -(void)keyDown: (NSEvent *)theEvent
 {
   NSString *characters = [theEvent characters];