jeromeetienne / AR.js

Efficient Augmented Reality for the Web - 60fps on mobile!
MIT License
15.79k stars 2.22k forks source link

Problem using ARJS with OpencvJS #490

Closed YasserManss closed 4 years ago

YasserManss commented 5 years ago

I think that using two Emscripten dependent libraries in the same html page is causing problems. I think that the solution is to build ARjs with Emscripten option "-s MODULARIZE=1". If there is any instructions about how to rebuild the library (ARjs with threejs), please post it. Also, if anyone managed to use both Opencv js and ARjs, please share how you did it. Thank you in advance.

JamesLMilner commented 5 years ago

@YasserManss can you try with https://github.com/JamesMilnerUK/THREEAR and see if you have the same issue? I bundled in artoolkitjs so that might help if you're having namespacing issues.

YasserManss commented 5 years ago

@JamesMilnerUK Thank you very much sir! Your bundle works perfectly with opencvJS.

nicolocarpignoli commented 5 years ago

@YasserManss hey, so you managed to user OpenCV.js with AR.js with success? This could be very interesting for the AR.js future! Can you tell us more, or give us a repository to look at? Thank you in advance from the community!

kalwalt commented 5 years ago

I think that using two Emscripten dependent libraries in the same html page is causing problems. I think that the solution is to build ARjs with Emscripten option "-s MODULARIZE=1". If there is any instructions about how to rebuild the library (ARjs with threejs), please post it. Also, if anyone managed to use both Opencv js and ARjs, please share how you did it. Thank you in advance.

@YasserManss Ar.js is based on jsartoolkit5 i can try to build with that option. It is not a proirity but i will try to do when i have a bit of time.

evaristoc commented 5 years ago

@JamesMilnerUK excellent, nice to know about your option!

@kalwalt adding the possibility to bundle opencvjs together arjs will be an interesting add on. I suspect there will be a bit of a conflict to solve.

kalwalt commented 5 years ago

@evaristoc yes i agree with you. But i have the suspect that It Is not so simple, It Is not sufficient to build jsartoolkit5 with the Modularize option...

nicolocarpignoli commented 4 years ago

Closing this issue due to dismission of this repository. New repository of AR.js will be up at https://github.com/AR-js-org/AR.js/

Feel free to re-open the issue there if still valid.