Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

@webarkit/nft-marker-creator-app

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webarkit/nft-marker-creator-app

NFt Marker Creator based on WebARKitLib, ported thanks to Emscripten

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

github releases github stars github forks npm package version docker pulls CI Build Nft-Marker-Creator-App

Nft-Marker-Creator-App

This editor creates NFT markers for WebARKitLib and ARTOOLKIT 5.x, they are compatible with jsartoolkitNFT.js, jsartoolkit5.js, artoolkit5.js, ARnft.js and AR.js. A Node app is provided.

This project is based on the original NFT Marker Creator by Carnaux but has been updated to work with the latest versions of Node and NPM, and also to work with the latest version of Emscripten, plus other improvements.

Now with threading support!! Read more in Run the app section

Quick start ⚡

cd src
node NFTMarkerCreator.js -i PATH/TO/IMAGE --threaded <number_of_threads>

Example:

cd src
node NFTMarkerCreator.js -i pinball.jpg --threaded 8

Outputs land in src/output. See the sections below for setup, flags, and optional demo steps.

Prerequisites ✅

  • Tested on Windows 11 (PowerShell 5.1) and Ubuntu 22.04 LTS (bash)
  • Git 2.39+
  • Node.js v20.17.0 (.nvmrc) and npm 10+
  • nvm 0.39+ (optional but recommended for managing Node versions)
  • Docker 24+ (required only for the containerised build flow)

Node app

Installation 📦

  • Clone this repository (or download the latest prebuilt NFTMarkerCreator.js and build/ bundle from the GitHub Releases page).
  • Install Node via nvm (recommended):
    • nvm install
    • nvm use 20
  • Install dependencies: npm install

Run the app 🚀

  • Place the image you want to convert inside the src folder (either directly or inside a subfolder).
  • Generate the marker:
 cd src
 node NFTMarkerCreator.js -i PATH/TO/IMAGE

Example:

cd src
node NFTMarkerCreator.js -i pinball.jpg

The output files are saved in the src/output directory. Use --threaded <count> to speed up processing; start with the number of physical CPU cores and adjust based on thermals and available memory (e.g., laptops may peak at 4 threads, workstations can push higher):

cd src
node NFTMarkerCreator.js -i PATH/TO/IMAGE --threaded <number_of_threads>

Example:

cd src
node NFTMarkerCreator.js -i pinball.jpg --threaded 4

CLI flags ⚙️

Example: node NFTMarkerCreator.js -i image.png -level=4 -min_thresh=8

FlagDescriptionDefault
-zftCreate only the .zft file
-noConfSkip the confidence confirmation prompt
-DemoGenerate the demo configuration alongside the marker
-level=nFeature density preset from 0 (few) to 4 (many)2
-sd_thresh=<value>Override standard deviation thresholdAuto
-max_thresh=<value>Override maximum feature thresholdAuto
-min_thresh=<value>Override minimum feature thresholdAuto
-leveli=nInitial feature density preset from 0 to 31
-feature_density=<value>Manual feature density multiplierAuto
-dpi=fForce a DPI value instead of the embedded JPEG DPIImage metadata
-max_dpi=<value>Cap the maximum DPI processed for multi-scale markersAuto
-min_dpi=<value>Floor the minimum DPI processed for multi-scale markersAuto
-backgroundRun detached in the background (macOS/Linux only)
--help, -h, -?Print CLI usage information
--threaded <n>Run feature extraction using n threads1
-nofset / -fsetDisable or force generation of the .fset fileEnabled
-nofset3 / -fset3Disable or force generation of the .fset3 fileEnabled

Demo 🧪 (optional)

  • npm run demo
  • Open http://localhost:3000/
  • Add -Demo to the marker command to generate demo assets automatically: node NFTMarkerCreator.js -i image.png -Demo

Additional resources 📚

ES6 version of the build library

The library is built with Emscripten and is located in the build folder. It is an ES6 module and can be imported in your project.

<script type="module">

  import nftMC from '../build/NFTMarkerCreator_ES6_wasm.js';
  const mc = await nftMC();

</script>

Create your NTS markers with our docker image

First, you need docker installed in your system, if you haven't, follow the Docker engine installation instruction . Then inside the folder you want to run the docker image:

Linux/macOS:

docker run -dit --name nft-app -v "$(pwd):/src" webarkit/nft-marker-creator-app:0.2.5 bash

Windows (PowerShell):

docker run -dit --name nft-app -v "${PWD}:/src" webarkit/nft-marker-creator-app:0.2.5 bash

With the docker container generate the NFT marker:

docker exec nft-app node ../Nft-Marker-Creator-App/src/NFTMarkerCreator.js -I /src/pinball.jpg

remember to prepend the -I /src/<path to your image>

Build

Build emscripten files with docker:

Linux/macOS:

docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) -e "EMSCRIPTEN=/emsdk/upstream/emscripten" emscripten/emsdk:3.1.69 npm run build-local

Windows (PowerShell):

docker run --rm -v "${PWD}:/src" -e "EMSCRIPTEN=/emsdk/upstream/emscripten" emscripten/emsdk:3.1.69 npm run build-local

or better create a docker container and run the build command inside it:

Linux/macOS:

docker run -dit --name emscripten-nft-marker-creator-app -v $(pwd):/src emscripten/emsdk:3.1.69 bash
docker exec emscripten-nft-marker-creator-app npm run build-local

Windows (PowerShell):

docker run -dit --name emscripten-nft-marker-creator-app -v "${PWD}:/src" emscripten/emsdk:3.1.69 bash
docker exec emscripten-nft-marker-creator-app npm run build-local

In VSCode you can run the setup-docker and build-docker command inside package.json.

Planned Features

  • Multi threading support to speed up the creation of the markers.
  • Python version of the project and app.

Keywords

ARToolKit

FAQs

Package last updated on 27 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts