I'm using deviceorientationcontroller.js for three.js whch uses quaternions for camera orientation. When a user touches the device it overrides the gyro input and uses touch input instead. When the user releases the touch it snaps back to the absolute gyro input quaternion as opposed to offsetting the gyro to accommodate the new camera orientation.
I need to take an initial quaternion value from the camera orientation and offset the gyro input to reflect this starting position.