Emscripten port of WebARKitLib to JavaScript. Modified and lighter version of JSARToolKit5.
Try the example !! kalwalt.github.io/jsartoolkitNFT/examples/arNFT_example.html
JSARToolKitNFT support only this types of markers:
- NFT (natural feature tracking) markers ✅ 🎉 🎨
has WASM embedded in a single file!
You can use raw.githack.com links:
WASM version of the libary:
<script src="https://raw.githack.com/kalwalt/jsartoolkitNFT/master/build/artoolkitNFT_wasm.js">
NO WASM minified:
<script src="https://raw.githack.com/kalwalt/jsartoolkitNFT/master/build/artoolkitNFT.min.js">
or you can install with npm:
npm i @kalwalt/jsartoolkit-nft
or you can clone the repository with git, follow the instructions below:
- Clone this repository
- Clone ARToolKit5 project to get the latest source files. From within JSARToolKitNFT directory do
git submodule update --init
. If you already cloned ARToolKit5 to a different directory you can:
- create a link in the
jsartoolkitNFT/emscripten/
directory that points to ARToolKit5 (jsartoolkitNFT/emscripten/artoolkit5
) (Linux and macOS only) - or, set the
WEBARKITLIB_ROOT
environment variable to point to your ARToolKit5 clone - or, change the
tools/makem.js
file to point to your artoolkit5 clone (line 20)
JSARToolKitNFT is used by ARnft a small libary that help developers to create WebAR apps.
build/
(compiled debug and minified versions of JSARToolKitNFT)doc/
(documentation, coming...)emscripten/
(source code for ARToolKit)examples/
(demos and examples using JSARToolKitNFT)js/
(compiled versions of ARToolKit.js with Three.js helper api)tools/
(build scripts for building JSARToolKitNFT)
JSARToolKitNFT supports WebAssembly. The libary builds WebAssembly artifacts during the build process, WASM is embdded in a single file. This is build/artoolkitNFT_wasm.js
. To use it, include the artoolkit_wasm.js
into your html page like this:
<script src="../build/artoolkitNFT_wasm.js"></script>
As loading the WebAssembly artifact is done asynchronously, there is a callback that is called when everything is ready.
window.addEventListener('artoolkitNFT-loaded', () => {
//do artoolkit stuff here
});
See the example for details.
Go to the wiki for more infos