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

Supporting A-Frame 1.6.0 and newer versions of three

Open nickw1 opened this issue 1 year ago • 4 comments

Do you want to request a feature or report a bug?

Bug. Haven't had much time for AR.js of late, and unlikely to have much time in the near future, but using a few days' break in my schedule to investigate a few things that are perhaps easily fixed.

What is the current behavior?

AR.js 3.4.5 does not support A-Frame 1.6.0 or latest versions of three.js e.g. 0.164.0.

If the current behavior is a bug, please provide the steps to reproduce.

Modify A-Frame dependency to 1.6.0 when building.

Please mention other relevant information such as the browser version, Operating System and Device Name

What is the expected behavior?

Should work, but location-based examples fail with: PlaneBufferGeometry is not a constructor.

This is easily fixed; use PlaneGeometry instead, e.g. see: https://stackoverflow.com/questions/77130600/error-three-planebuffergeometry-is-not-a-constructor

When this is fixed, the new-location-based A-Frame examples work.

If this is a feature request, what is motivation or use case for changing the behavior?

Able to support latest A-Frame.

@kalwalt not sure if you have any time to spend on AR.js these days (no worries if not... I don't have much time either, sadly!) but can you foresee any problems with upgrading A-Frame to 1.6.0 (and three to 0.164.0) on the marker and NFT side? Location-based side seems to work with the fix above.

Also wondering whether we need to include three as a dependency in package.json given it's already a dependency of A-Frame (see #504)

nickw1 avatar Sep 12 '24 20:09 nickw1

@nickw1 sadly I have no time to look into this. Did you try upgrading three.js also to the latest? I think it is not compatible with AR.js at this time. We should check upgrading three.js dependencies before upgrading A.frame? What do you think?

kalwalt avatar Sep 28 '24 19:09 kalwalt

@kalwalt makes sense, yes. I'm not familiar with the marker-based/NFT side of things though, so all I can really do is test the location-based side (which seems to work if the above fix is applied).

In fact (as I messaged you a while back) I'm thinking of separating out the location-based AR into its own project within the AR.js organisation. I feel that this will result in faster bugfixes and improved compatibility with latest three or A-Frame as I will be able to do this without worrying about marker-based or NFT. Any thoughts?

nickw1 avatar Oct 01 '24 10:10 nickw1

Update for anyone reading this: there's now a new standalone location-based project here:

https://github.com/AR-js-org/locar.js

which aims (amongst other things) to keep up to date with latest versions of three.js.

nickw1 avatar Oct 14 '24 19:10 nickw1

Great @nickw1! i will try to upgrade A-frame and three.js in the main repository too, i have more time now.

kalwalt avatar Oct 16 '24 13:10 kalwalt

@kalwalt just an update: I have made live LocAR.js examples (only two so far) available via GitHub Pages https://ar-js-org.github.io/. A while ago I think you mentioned the idea of making more examples available live, do we want to add some for other parts of AR.js?

nickw1 avatar Oct 27 '24 13:10 nickw1

@kalwalt just an update: I have made live LocAR.js examples (only two so far) available via GitHub Pages https://ar-js-org.github.io/. A while ago I think you mentioned the idea of making more examples available live, do we want to add some for other parts of AR.js?

Nice job @nickw1! maybe we can think in a near future to buy a web domain and have a simple web page of the github organization. As we talked in the past we should have more live examples, we can start with the simple pattern markers and so continue with the others.

kalwalt avatar Oct 27 '24 19:10 kalwalt

In regards of this issue i will start to upgrade AR.js to a more recent three.js version, I will start this week with a draft PR.

kalwalt avatar Oct 27 '24 19:10 kalwalt

@kalwalt Thanks! Sounds good.

nickw1 avatar Oct 28 '24 14:10 nickw1

Im working on this issue in draft PR #615. As mentioned in the PR it seems that it solves the issue #504 about the multiple Three.js instances. I think we need a .module version for all the build libs...

kalwalt avatar Oct 28 '24 19:10 kalwalt

I merged PR #615 in the dev branch anyone interested can test it and report here any issue (about this issue of course...) In few days i will make a new release if nothing against.

kalwalt avatar Dec 16 '24 17:12 kalwalt

@kalwalt great!

nickw1 avatar Dec 18 '24 22:12 nickw1

I'm opening a new PR to enhance the readme with the new changes and to make last small fixes before the release.

kalwalt avatar Dec 19 '24 18:12 kalwalt

The code from #615 and #625 is merged in master! 🎉

kalwalt avatar Dec 22 '24 21:12 kalwalt