Three location based example fix #409
Merged
+60
−34
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.
What kind of change does this PR introduce?
Bugfix for three.js location-based example.
Can it be referenced to an Issue? If so what is the issue # ?
#376
How can we test it?
Available online at:
https://hikar.org/nex/three.js/examples/location-based/
Summary
three.js location-based example had some bugs, e.g. in some circumstances it tried to start real and fake GPS simultaneously.
I have also made the example easier to test so that the four test boxes are added adjacent to the initial GPS position, or the fake position if fake GPS is used. I have added in commented-out code to initialise fake GPS, which can be turned on simply by uncommenting.
Does this PR introduce a breaking change?
No
Please TEST your PR before proposing it. Specify here what device you have used for tests, version of OS and version of Browser
Chrome, Firefox Linux desktop
Chrome on Android 12 / Pixel 3
Other information
@kalwalt would it be ok to merge this into dev, and also into master, as soon as possible? The current example does not seem to be working correctly, this one is easier to understand and definitely works (for me) on desktop and mobile, and using both fake GPS and a GPS simulator (Location Guard) on desktop.
This is separate to my recent PR #406.