This site use cookies. Click the button to continue.

JsartoolkitNFT: simplified version of jsartoolkit5 for NFT

A screenshot of the arNft and jsartoolkitNFT development in the Atom editor

I have recently started the development of a lightened version of jsartoolkit5 dedicated exclusively to NFT (Natural Feature Tracking) markers with some improvements. For those who do not know what NFT markers are, I invite you to read this other article on my blog: NFT - Natural Feature Tracking with jsartoolkit5. I have currently removed all the code that is not necessary trying to leave only what is needed to import the KPM library that manages the NFT markers. I removed most of the code because it was not used at all for NFT markers, for example the getUserMedia and getUserMediaARController functions are useless in jsartoolkit5 since the video stream is managed outside the class and inside the WebWorker (artoolkit.worker.js ). I then deleted all the code concerning the Patterns, Barcodes and Multi Markers, because obviously I don’t care. What is the idea? To make the code as simple as possible, for this reason I developed an additional level to simplify and help the developer. I created a new arNFT library which once initialized allows you to write the code like this:

<script src="js/third_party/three.js/three.min.js"></script>
<script src="../dist/arNFT.min.js"></script>

  var nft = new ARnft(640, 480, 'config.json');

  nft.init("../examples/DataNFT/pinball", true);

  var mat = new THREE.MeshLambertMaterial({color: 0xff0000});
  var cubeGeom = new THREE.CubeGeometry(1,1,1);
  var cube = new THREE.Mesh(cubeGeom, mat);
  cube.position.z = 90;
  cube.position.x = 90;
  cube.position.y = 90;



As you can see it is very simplified, it is based on Three.js but maybe in the future I will be able to extend it to other 3D libraries. A json file (config.json) let you store all the configuration data inside it. In the near future I also want to implement a series of functions for the display on the marker of simple images or video objects. Furthermore, it is my intention to update the code to the most modern ES6 standards so that it can be used in projects such as React, Vue, and others.

In summary make this series of features:

  • arNFT layer
  • ES6 standard
  • set of functions to be reused for easy development
  • improve performances

I will write other articles to inform about further developments of the project. That’s all for now, stay tuned!

EDIT (18/11/2020): Now jsartoolkitNFT and ARnft are two separate project owned by WebAR Kit org.

Walter Perdan