AR.js
AR.js copied to clipboard
three.js location based - support iOS and Safari
Do you want to request a feature or report a bug?
Feature
What is the current behavior? three.js location based feature (see #188, #346) only known to work on Chrome/Android.
If the current behavior is a bug, please provide the steps to reproduce.
Please mention other relevant information such as the browser version, Operating System and Device Name
What is the expected behavior?
Should work on Chrome/iOS and Safari/iOS too.
If this is a feature request, what is motivation or use case for changing the behavior?
To support iOS.
This is possible with webkitCompassHeading (Safari) and granting permission to use the compass (necessary on iOS for any browser). However I do not have any iOS devices and therefore am unable to test.
So if anyone can enhance the three.js location-based code (see location-based directory inside three.js on dev branch) - that would be great!
I’d like to try and help, if I can. I’ve been using AR.js 0.92 AFrame location implementation. so haven’t seen the three.js location implementation on Android that you did. I was reading through #31 and saw your example on dev. In your opinion what’s the advantage of using pure three.js over AFrame? I’m going to try and run the example next time to check it out. On my phone right now.
Hi @raywu many thanks. There is no particular advantage, but A-Frame and pure three.js have different coding styles and some might prefer one or another. Also I think pure three.js is easier to integrate with other web frameworks, but not sure.
Also the three.js implementation is completely separate from the A-Frame implementation (currently, though plans are to re-implement the A-Frame code) so if you have any bugs with the A-Frame implementation, the pure three.js implementation might not have those bugs.
@nickw1 do you have an example I can check out and test on Chrome/iOS or Safari/iOS?
For anyone interested Three.js location based is in the dev branch now and there is also a new npm beta package 3.3.3-es6-beta-03 https://www.npmjs.com/package/@ar-js-org/ar.js
Now this feature is merged in master branch. :slightly_smiling_face:
@raywu Sorry I missed your earlier message.
If you look at https://github.com/AR-js-org/AR.js/tree/master/three.js/examples/location-based you can see an example.
Also would be great if anyone with an iDevice can test out the pull request #406.