static void tick(int delta) {
		if (Mouse.isButtonDown(0)) {
			if (dragging) {
				// mouseDrag:
				dragHere = mouseToSphere();      // new ending position
				quatHere = new Quaternion(
					dragStart.dot  (dragHere),   // angle between position vectors
					dragStart.cross(dragHere)    // normal of position vectors
				);
			}
			else {
				// mouseDown:
				dragging = true;
				dragStart = mouseToSphere();     // new starting position
				quatStart = rotation;            // rotation starts at previous computed rotation
				quatHere  = Quaternion.IDENTITY; // no rotation so far
			}
		}
		else {
			if (dragging) {
				// mouseUp:
				dragging = false;
			}
		}

		scale += Mouse.getDWheel();
		if (scale <   10) { scale =   10; }
		if (scale > 1000) { scale = 1000; }
		rotation = quatHere.mul(quatStart).normalize();
	}