Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to use jsartoolkit in a new library #81

Open
JamesLMilner opened this issue Feb 20, 2019 · 3 comments
Open

Trying to use jsartoolkit in a new library #81

JamesLMilner opened this issue Feb 20, 2019 · 3 comments

Comments

@JamesLMilner
Copy link

Hey there, firstly thanks for your great library and hard work it's really appreciated.

I've been writing a little library that tries to bring together jartoolkit and ar.js under one roof using TypeScript and webpack. I feel like I've made a good start, and have vendored your latest build of artoolkit.debug.js with some minor alterations (exported it to be an ES6 module, and a few other minor changes to make it work with Webpack correctly). Unfortunately I've hit a brick wall trying to get the AR markers to register. getMarkerNum() is always returning zero (see https://github.com/JamesMilnerUK/THREEAR/blob/cb73d376286e6a0e79b1ef776663ba43e463a938/src/ARController.ts#L149), even when pointing directly at a basic hiro marker, but I'm struggling to figure out why. Most of the code is verbatim the same, just organized slightly differently as TypeScript files.

You can checkout the repo here: https://github.com/JamesMilnerUK/THREEAR and if you run a web server and try and open the basic demo (point your webcamera at: https://jeromeetienne.github.io/AR.js/data/images/HIRO.jpg) you'll see that the marker never appears as per https://github.com/jeromeetienne/AR.js/blob/master/three.js/examples/default.html. There are no error messages or warnings in the console.

Of course I have no expectations here, but if you happen to know why the markers are not being acknowledged, I'd be very appreciative. Happy to answer any additional questions anyone might have.

@kalwalt
Copy link

kalwalt commented Feb 20, 2019

@JamesMilnerUK Thank you for share this! I will try it when i have a bit of time...

@JamesLMilner
Copy link
Author

JamesLMilner commented Feb 20, 2019

@kalwalt no worries! Thanks for your reply. Just a heads up, I got this working last night using (a slightly modified) version of the jsartoolkit build that is used in ar.js. It looks like it hasn't been updated in two years however. Anyway, using that build the markers appear correctly for the scenario explained above. I wonder what the difference is between the two? It would be nice to use an updated version :) I might look into building it myself!

@kalwalt
Copy link

kalwalt commented Feb 20, 2019

That's super @JamesMilnerUK ! if you want an updated version take note of this: i had an issue compiling the jsartoolkit lib see this #78 and #40 not sure if it happens in all OS scenario. Eventually i filed also a pull request #79, maybe it can be useful for you.
There is a NFT branch in jsartoolkit, that's why i started to dig in this library...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants