-
Notifications
You must be signed in to change notification settings - Fork 11
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
Window error while testing artoolkit5-js with nodejs #1
Comments
@kalwalt the code you're referencing is not included in my build. The issue seems to result from a polyfill Babel uses to transpile Will check it |
Looking in your code i saw that --pre-js is not used in your project
ok thank you! |
I created a new build which fixes the "window reference" issue with Node.js. Root cause of the issue was Emscripten injecting an ES6 There is a new flag Please have a try! |
Yes i will try, which version of emscripten are you using? |
I will push another version tomorrow which implements the first methods like loadCamera(), addMarker() etc. |
That's Awesome! Emscripten fastcomp or upstream? |
Starting from 1.39.6 emscripten defaults to upstream. I'm using 1.39.8 to compile to WASM so it's using upstream now. |
Thank you for the info, i will test also the build under linux (Ubuntu 18.04) . I can confirm that this issue is solved, just tested it. 😄 |
Wonderful! I've also just committed a fresh build - nothing spectacular, but it should give you a pretty good idea which direction I'm going with the code. Check out this file for details. |
Hi @andypotato i tested the project with a simple nodejs project:
My package.json:
My index.js simply is:
const ARToolkit = require('artoolkit5-js');
in the output i get:
This becasue window is not supported by nodejs, i tried to fix this in my experimental branch https://github.com/kalwalt/jsartoolkit5/blob/a13cad4cd2731ddd001e6f5a5a755a73554355e9/js/artoolkit.api.js#L1-L11
I will do other tests! 🙂
The text was updated successfully, but these errors were encountered: