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.
Hey @TiagoCavalcante
This pull request will add support for map controls without having any breaking changes. It will also fix issues faced by #31 and #40
#31 - The main problem here was that in react native locationX and locationY values get reset when you enter a new view this would cause abrupt reset of target. Using PageX and PageY will fix this issue
This can additionally be improved by having a function that checks if touches are outside the canvas and use that to prevent any actions if touches go outside canvas
#40 - I have added the support for Map controls, the changes closely reflect the gesture system used by google maps that native users are more familiar of compared to the existing implementation of map controls in threejs
One finger touch to Pan
Two finger rotation to Rotate
Two finger vertical movement for tilt
Two finger pinch for zoom
Description of commits
WRT, to API there are no breaking changes so a new release version should be able to support orbit controls and map controls out of the box, However I have internally changed the structure of code to support both the modes effectively
We can together re do this if you prefer it in a different way.
Please let me know if you need any additional changes to get this merged.
I personally believe that the correct way to using these controls would be to implement
React native gesture handler
for handling the gestures but untill then this could be the first working version of map controls for react native.