andypotato / artoolkit5-js Goto Github PK
View Code? Open in Web Editor NEWNode.JS / ES6 module port of artoolkit5
License: Other
Node.JS / ES6 module port of artoolkit5
License: Other
Currently the addNFTMarker is not implemented. Need to port the code from here.
Hi @andypotato i tested the project with a simple nodejs project:
My package.json:
{
"name": "test-artoolkit5-js",
"version": "1.0.0",
"description": "test",
"main": "index.js",
"scripts": {
"test": "node index.js"
},
"keywords": [
"jsartoolkit5"
],
"author": "kalwalt",
"license": "ISC",
"dependencies": {
"artoolkit5-js": "0.0.1"
}
}
My index.js simply is:
const ARToolkit = require('artoolkit5-js');
in the output i get:
npm run test
> [email protected] test /home/walter/kalwalt-github/test/test-artoolkit5-js
> node index.js
/home/walter/kalwalt-github/test/test-artoolkit5-js/node_modules/artoolkit5-js/dist/ARToolkit.js:1
!function(A,I){"object"==typeof exports&&"object"==typeof module?module.exports=I():"function"==typeof define&&define.amd?define([],I):"object"==typeof exports?exports.ARToolkit=I():A.ARToolkit=I()}(window,(function(){return function(A){var I={};function g(B){if(I[B])return I[B].exports;var C=I[B]={i:B,l:!1,exports:{}};return A[B].call(C.exports,C,C.exports,g),C.l=!0,C.exports}return g.m=A,g.c=I,g.d=function(A,I,B){g.o(A,I)||Object.defineProperty(A,I,{enumerable:!0,get:B})},g.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},g.t=function(A,I){if(1&I&&(A=g(A)),8&I)return A;if(4&I&&"object"==typeof A&&A&&A.__esModule)return A;var B=Object.create(null);if(g.r(B),Object.defineProperty(B,"default",{enumerable:!0,value:A}),2&I&&"string"!=typeof A)for(var C in A)g.d(B,C,function(I){return A[I]}.b
ReferenceError: window is not defined
at Object.<anonymous> (/home/walter/kalwalt-github/test/test-artoolkit5-js/node_modules/artoolkit5-js/dist/ARToolkit.js:1:200)
at Module._compile (internal/modules/cjs/loader.js:1151:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1040:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/walter/kalwalt-github/test/test-artoolkit5-js/index.js:1:19)
at Module._compile (internal/modules/cjs/loader.js:1151:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
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! 🙂
Hi Andreas, i was testing your repo and i'm wondering if you have some example code to share, It will be very appreciated! 🙂
I'd like to use AR_MATRIX_CODE_3x3_HAMMING63 markers.
There is no documentation or demo that sets any AR_MATRIX_CODE... as marker type.
There is a line in a cpp file
lib/ARBindEM.cpp: constant("AR_MATRIX_CODE_3x3_HAMMING63", AR_MATRIX_CODE_3x3_HAMMING63 + 0);
But I don't know how these constants are exposed when importing artoolkit5-js.
请问这个库和artoolkit5-js 有啥区别,是里面用的arjs的代码是最近的么?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.