-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Groundwork for Feature MO-7031 #3
Conversation
// TODO: [jaredsinclair] Consider adding constants for the multipliers | ||
// TODO: [jaredsinclair] Find out why the y multiplier is 0.4 and not 0.5 | ||
position = CGPointMake(position.x + 2 * M_PI * rotateDelta.x / viewSize.width * 0.5, | ||
position.y + 2 * M_PI * rotateDelta.y / viewSize.height * 0.4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious why the y component uses a 0.4 multiplier instead of 0.5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when we were testing the movements this speed was discomforting on the y axis
👍 after my comments are addressed, and this is a simple enough PR (in code I'm familiar with) I'm not going to add a second reviewer. |
- Makes all schemes shared. - Adds the unit test target to the module's test phase. - Includes source files in the unit tests build phase so that it does not depend on the public 360 module.
@cdzombak I've addressed all your comments, though in order to fix |
👍 this works for me. Thanks, @jaredsinclair. |
MO-7031 Calls for selectively disabling vertical panning for 360 player views embedded inline in a scroll view. This PR lays down the groundwork for supporting this feature:
NYT360CameraController.m
into separateNYT360EulerAngleCalculations
helper functions, both to isolate this logic and also to expose it more easily to unit tests.allowedPanningAxes
property toNYT360CameraController
which allows host applications to suppress x or y (or both) axis input from both device motion and pan gesture changes.NYT360EulerAngleCalculations
helper functions.With these changes in place, it should be possible in a followup PR to adjust the axis option on both
NYT360ViewController
and on any future inline 360 video player view.