Package Exports
- @kalwalt/jsartoolkit-nft
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@kalwalt/jsartoolkit-nft) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
JSARToolKitNFT
Emscripten port of WebARKitLib to JavaScript. Modified and lighter version of JSARToolKit5.
Try the example !! kalwalt.github.io/jsartoolkitNFT/examples/arNFT_example.html
Markers Types
JSARToolKitNFT support only this types of markers:
- NFT (natural feature tracking) markers ✅ 🎉 🎨
has WASM embedded in a single file!
❕ from 0.8.0 version has ES6 feature 🎉 😻
Using the library 💥
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 (recommended) use the UMD libary:
<script src="https://raw.githack.com/kalwalt/jsartoolkitNFT/master/dist/ARToolkitNFT.js">or you can install with npm and use as a module:
npm i @kalwalt/jsartoolkit-nftthen:
import { ARToolkitNFT, ARControllerNFT } from '@kalwalt/jsartoolkit-nft'or you can clone the repository with git, follow the instructions below:
Clone the repository 🌀
- 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_ROOTenvironment variable to point to your ARToolKit5 clone - or, change the
tools/makem.jsfile to point to your artoolkit5 clone (line 20)
ARnft library
JSARToolKitNFT is used by ARnft a small libary that help developers to create WebAR apps.
Project Structure 📂
build/(compiled debug and minified versions of JSARToolKitNFT)dist/(compiled UMD lib with ES6 of JSARToolKitNFT)doc/(documentation, coming...)emscripten/(source code for ARToolKitNFT)examples/(demos and examples using JSARToolKitNFT)js/(compiled versions of ARToolKit.js with Three.js helper api)tools/(build scripts for building JSARToolKitNFT)
WebAssembly 👋
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 examples for details.
Build the project 🔨
Go to the wiki for more infos