AR.js icon indicating copy to clipboard operation
AR.js copied to clipboard

three.js location based - support iOS and Safari

Open nickw1 opened this issue 4 years ago • 7 comments

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!

nickw1 avatar Oct 19 '21 13:10 nickw1

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.

raywu avatar Oct 26 '21 07:10 raywu

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 avatar Oct 26 '21 11:10 nickw1

@nickw1 do you have an example I can check out and test on Chrome/iOS or Safari/iOS?

raywu avatar Nov 11 '21 04:11 raywu

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

kalwalt avatar Feb 04 '22 16:02 kalwalt

Now this feature is merged in master branch. :slightly_smiling_face:

kalwalt avatar Mar 10 '22 19:03 kalwalt

@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.

nickw1 avatar Mar 11 '22 15:03 nickw1

Also would be great if anyone with an iDevice can test out the pull request #406.

nickw1 avatar Mar 15 '22 18:03 nickw1