-
Notifications
You must be signed in to change notification settings - Fork 2
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
artoolkitX.js as a npm package #28
Comments
@ThorstenBux it should be sufficient to add this line/option in package.json:
and then authenticate:
final step:
|
if it is that easy I'd say we already add it to jsartoolkit5 and publish it directly from artoolkitx/jsartoolkit5 what do you think? |
@ThorstenBux i was refering to this project, but refering to jsartoolkit5 i found the old package https://www.npmjs.com/package/jsartoolkit5 but it is linked by https://github.com/artoolkit/jsartoolkit5, it is outdated (4 years old) trying to run on Runkit it fails. |
about artoolkitx/jsartoolkit5 i found this issue artoolkitx/jsartoolkit5#26 but the npm artoolkitx/jsartoolkit5 was not updated after this. |
It would be also interesting to test them in a node environment. I'd like to do if i have time. |
Maybe we can contact the authot of that issue/PR @hakandilek and let us know if he can add us as collaborators. |
Let us see if he responds |
👋 Yes sure, I can re-publish it or give access to any of you guys. I cannot find the original project (github.com/artoolkit/jsartoolkit5) on Github. One I could find and associate with the published code is the https://github.com/artoolkitx/jsartoolkit5 but this one seems to be outdated as well. I'd be nice if you could pull me in the context with some history lecture. ;-) Also, README.md in this repo is not much npmjs.org friendly. It documents how to build the library within the shell quite well but misses the installation instructions for |
History lesson in short as I’m on the phone. DAQRI the owner of artoolkit org deleted the account today.
ArtoolkitX is the follow up repo. Would be good if you could give me access to the npm project. I’m one of the main contributors to artoolkit(x). And kalwalt as well as he is the one that does the most of the jsartoolkit5 work right now.
If you could help us with a proper npm friendly readme that would be awesome.
Can reply in detail later if you have more questions I’m happy to answer those.
Many thanks in advance.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Hakan Dilek <[email protected]>
Sent: Wednesday, January 8, 2020 8:54:18 PM
To: augmentmy-world/artoolkitX.js <[email protected]>
Cc: Thorsten Bux <[email protected]>; Mention <[email protected]>
Subject: Re: [augmentmy-world/artoolkitX.js] artoolkitX.js as a npm package (#28)
👋
Hi here I am,
Yes sure, I can re-publish it or give access to any of you guys.
I cannot find the original project (github.com/artoolkit/jsartoolkit5) on Github. One I could find and associate with the published code is the https://github.com/artoolkitx/jsartoolkit5<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fartoolkitx%2Fjsartoolkit5&data=02%7C01%7C%7C1424970c2e20470e2ec308d7940ff778%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637140668597086961&sdata=xDIdAuRkhU2hq2AjNbrn19crjgvv53MgKxG9nGAd2dA%3D&reserved=0> but this one seems to be outdated as well. I'd be nice if you could pull me in the context with some history lecture. ;-)
Also, README.md in this repo is not much npmjs.org friendly. It documents how to build the library within the shell quite well but misses the installation instructions for npm install.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Faugmentmy-world%2FartoolkitX.js%2Fissues%2F28%3Femail_source%3Dnotifications%26email_token%3DAD765PGZN34GXTN2XXILK7DQ4WBCVA5CNFSM4KC5SI2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEILP7AQ%23issuecomment-571932546&data=02%7C01%7C%7C1424970c2e20470e2ec308d7940ff778%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637140668597096966&sdata=hVgZ%2BWlJe8w7ffYe8Wx7U0WwBGeDmMxokvdZzhy4CI0%3D&reserved=0>, or unsubscribe<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD765PEUBVWDH24P4G7I6O3Q4WBCVANCNFSM4KC5SI2A&data=02%7C01%7C%7C1424970c2e20470e2ec308d7940ff778%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637140668597096966&sdata=fXQ6ZVVM5QPXobFb9PJ5deBpTgV0bWuvr716oS8s1fA%3D&reserved=0>.
|
Forgot, we will update artoolkitX/jsartoolkit5 with the pr from kalwalt within the next weeks
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Thorsten Bux <[email protected]>
Sent: Wednesday, January 8, 2020 9:01:43 PM
To: augmentmy-world/artoolkitX.js <[email protected]>; augmentmy-world/artoolkitX.js <[email protected]>
Cc: Mention <[email protected]>
Subject: Re: [augmentmy-world/artoolkitX.js] artoolkitX.js as a npm package (#28)
History lesson in short as I’m on the phone. DAQRI the owner of artoolkit org deleted the account today.
ArtoolkitX is the follow up repo. Would be good if you could give me access to the npm project. I’m one of the main contributors to artoolkit(x). And kalwalt as well as he is the one that does the most of the jsartoolkit5 work right now.
If you could help us with a proper npm friendly readme that would be awesome.
Can reply in detail later if you have more questions I’m happy to answer those.
Many thanks in advance.
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Hakan Dilek <[email protected]>
Sent: Wednesday, January 8, 2020 8:54:18 PM
To: augmentmy-world/artoolkitX.js <[email protected]>
Cc: Thorsten Bux <[email protected]>; Mention <[email protected]>
Subject: Re: [augmentmy-world/artoolkitX.js] artoolkitX.js as a npm package (#28)
👋
Hi here I am,
Yes sure, I can re-publish it or give access to any of you guys.
I cannot find the original project (github.com/artoolkit/jsartoolkit5) on Github. One I could find and associate with the published code is the https://github.com/artoolkitx/jsartoolkit5<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fartoolkitx%2Fjsartoolkit5&data=02%7C01%7C%7C1424970c2e20470e2ec308d7940ff778%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637140668597086961&sdata=xDIdAuRkhU2hq2AjNbrn19crjgvv53MgKxG9nGAd2dA%3D&reserved=0> but this one seems to be outdated as well. I'd be nice if you could pull me in the context with some history lecture. ;-)
Also, README.md in this repo is not much npmjs.org friendly. It documents how to build the library within the shell quite well but misses the installation instructions for npm install.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Faugmentmy-world%2FartoolkitX.js%2Fissues%2F28%3Femail_source%3Dnotifications%26email_token%3DAD765PGZN34GXTN2XXILK7DQ4WBCVA5CNFSM4KC5SI2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEILP7AQ%23issuecomment-571932546&data=02%7C01%7C%7C1424970c2e20470e2ec308d7940ff778%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637140668597096966&sdata=hVgZ%2BWlJe8w7ffYe8Wx7U0WwBGeDmMxokvdZzhy4CI0%3D&reserved=0>, or unsubscribe<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD765PEUBVWDH24P4G7I6O3Q4WBCVANCNFSM4KC5SI2A&data=02%7C01%7C%7C1424970c2e20470e2ec308d7940ff778%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637140668597096966&sdata=fXQ6ZVVM5QPXobFb9PJ5deBpTgV0bWuvr716oS8s1fA%3D&reserved=0>.
|
Thank you @hakandilek for the answer and the help! |
😒
Sure thing. Do you use the same alias for npmjs?
Can you please provide instructions for npm integration? I'm not actively developing AR applications anymore. But I can test and provide feedback later. |
@hakandilek do you made the typescript porting of jsartoolkit5 ? I would to know if we should make some updates in the code (i did but not sure of). Sorry for the off topic, I'm sure that is related in some way, i will open other issue on my repo. |
oh nooo! why this? this is a nonsense... |
DAQRI is bankrupt and is winding down. |
Artoolkitx.js could not be used as a node package at the moment as it is.
with this in mind i try to adequate to this three points the code in a locale repo for testing. this the folder structure: test-npm-artoolkitxjs
inside the artoolkitX.js folder SDK/lib folder with all the libs, and index.js: // index.js
module.exports = function() {
require( './SDK/lib/artoolkitX.api.js');
}; and test-npm-artoolkitxjs/index.js: const artoolkitxjs = require("artoolkitX.js");
console.log('Hello ArtoolkitX.js!');
console.log(artoolkitxjs);
var cameraParam = new artoolkitxjs.ARCameraParam();
console.log(cameraParam); and test-npm-artoolkitxjs/package.json: {
"name": "test-npm-artoolkitxjs",
"version": "1.0.0",
"description": "testing artoolkitxjs",
"main": "index.js",
"devDependencies": {
"artoolkitX.js": "^0.0.0"
},
"scripts": {
"test": "",
"build": "node index.js"
},
"keywords": [
"artoolkitX.js"
],
"author": "@kalwalt",
"license": "GPL-3.0-or-later"
}
i run the command:
result:
what i have done wrong? |
The problem is that you're exporting a function: const artoolkitxjs = require("artoolkitX.js");
console.log('Hello ArtoolkitX.js!');
console.log(artoolkitxjs); // <--- note that this logs [Function (anonymous)] So you should call it before using it: const artoolkitxjs = require("artoolkitX.js")(); // <--- call the required function After the change, the require will work and here's the real problem:
The artoolkitX you're using as a library has EDIT: Nodejs 13 has experimental support for ECMAScript modules. If you do this and try to import: import artoolkitxjs from './node_modules/artoolkitX.js/SDK/lib/artoolkitX.api.js'; it will "work" with this error:
which is a step forward :D |
Thank you @le0m i will think about this. At the moment i have other priority about this project, but i think it would be interesting to make it nodejs compatible. |
thanks @le0m for the steps you added! |
another part in which a window object is present |
For anyone else interested i created this repository https://github.com/kalwalt/artoolkitxjs-nodejs |
Glad to help, I may have more time to look into this next week! Taking a step back for a moment: does Nodejs compatibility have an usecase? Just throwing this out there, what you think? |
Thank you! It will be awesome!
I have no idea. i will look into the node-webcam package you posted. Maybe we can found some infos on Emscripten site. |
@le0m have you tried again with node? I did some little steps ahead but still can't use it with node. |
I'm sorry but I was busy with other personal projects, I'll try to have a look at your nodejs repo this week. |
Ok, no problem, just to know what do you think, thank you! 😄 |
I fixed this issue in my own ES6 build of ARToolkit, see the related issue. The root cause is Emscripten injecting some code that doesn't play nice with Node.js. My solution was to:
This will make ARToolkit itself run in all environments without issues. |
@andypotato thank you 🙂, sure I will try to build as a single file, it will solve the wasm issue, i will see if it is affected by other problems. |
As a single file is better: the wasm issue disappear. Pr here augmentmy-world/artoolkitx#5 EDIT: that PR is closed go to the new one: augmentmy-world/artoolkitx#6 |
@le0m I created a npm scoped package https://www.npmjs.com/package/@kalwalt/artoolkitx.js to test ArtoolkitX.js with react try this little project https://github.com/kalwalt/artoolkitxjs-react , Although it is not finished yet, at least it loads correctly ArtoolkitX.js... 😄 |
Great work @kalwalt! |
No worries @leom, just to inform you. But I haven't tested with node, I think i have to apply the modify @andypotato suggested. More to come stay tuned! |
It seems that recently Github let you deploy a npm package with zero effort, at least this seems to me.
I will investigate on this.
The text was updated successfully, but these errors were encountered: