This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix motion tracking on iOS
For iOS, now both finger and sensor rotation is supported at the same time, bringing it to par with Android: scihant/CTPanoramaView#47 |
@cristianocca I'll be merging this into a branch here, so I can continue with incorporating these changes. |
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
First of all, thanks for the amazing work!
I've been updating the source code of this library to fit my project's needs, and I thought it would be nice to share this work back with a PR. Please note that there are a few breaking changes, so you may want to review this carefully and/or update it briefly.
Summary (non breaking changes):
imageUrl
now supports a local file://path or /file/path file (also fixes bridge.bridgeLoader is deprecated and will not work in newer versions of RN #23)Summary (breaking):
enableTouchTracking={true}
disabled motion tracking (as opposed to Android). With this change, both motion and touch can be enabled, although once touching starts, sensor tracking gets disabled. In order to do this, I had to also fork theCTPanoramaView
library. This means that untilCTPanoramaView
merges the PR (which has some improvements), the dependency has to be added on the user's podfile as described on the readme (pod 'CTPanoramaView', :git => 'https://github.com/cristianoccazinsp/CTPanoramaView.git', :branch => 'control-both'
). CTPanoramaView doesn't seem maintained, so perhaps it's a better idea to include it on this repo, but I wasn't able to compile both swift and obj-c together like this.TODOs:
Bring back the @lightbasenl namespace or change the package's npm location to just be react-native-panorama
Vendor CTPanoramaView either by adding it to the source code or creating a new pod repo so we don't need to wait for the author merging new changes; the repo seems quite dead honestly.
Continue to improve CTPanoramaView to support simultaneous touch and sensor rotation (or update Android version to have the same behaviour as iOS)
GVRSDK is deprecated, it needs to be replaced with the new cardboard SDK on Android
Allow Android to disable sensor rotation and only use touch-based controls (like iOS). Once this is done,
enableTouchTracking
should be changed to be an option to pick between "both", "touch", "sensor" so all 3 options can be used.Lastly, I might be adding a few more improvements, but wanted to share these changes early :)