npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@webarkit/nft-marker-creator-app

v0.2.4

Published

NFt Marker Creator based on WebARKitLib, ported thanks to Emscripten

Downloads

791

Readme

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.

Check out the wiki to learn how to generate good markers! https://github.com/Carnaux/NFT-Marker-Creator/wiki/Creating-good-markers

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.

Node app

How to use it

  1. Clone this repository.

  2. Install all dependencies. First run

    nvm install

    it will download the node version specified in the .nvmrc file. You need to install nvm first if you don't have it. Then run nvm use 18 to use the node version specified in the .nvmrc file.

    Then finally run

    npm install

  3. Put the image you want inside the src folder. You can just paste it or you can create a folder. e.g

    • NFTmarkerCreatorApp Folder
    • NFTMarkerCreator.js
    • IMAGE.PNG :arrow_left:
    • ...

    or

    • NFTmarkerCreatorApp Folder
    • NFTMarkerCreator.js
    • FOLDER/IMAGE.PNG :arrow_left:
    • ...
  4. Run it

cd src
node NFTMarkerCreator.js -i PATH/TO/IMAGE

In the end of the process an "output" folder will be created (if it does not exist) with the marker files.

You can use additional flags with the run command.

e.g node NFTMarkerCreator.js -i image.png -level=4 -min_thresh=8

-zft
      Flag for creating only the zft file
-noConf
      Disable confirmation after the confidence level
-Demo
      Creates the demo configuration
-level=n
     (n is an integer in range 0 (few) to 4 (many). Default 2.'
-sd_thresh=<sd_thresh>
-max_thresh=<max_thresh>
-min_thresh=<min_thresh>
-leveli=n
     (n is an integer in range 0 (few) to 3 (many). Default 1.'
-feature_density=<feature_density>
-dpi=f:
      Override embedded JPEG DPI value.
-max_dpi=<max_dpi>
-min_dpi=<min_dpi>
-background
     Run in background, i.e. as daemon detached from controlling terminal. (macOS and Linux only.)
--help -h -?
      Display this help
  1. The generated files will be on the "output" folder.

  2. (OPTIONAL) You can test your marker using the demo folder!

    • Just run npm run demo.

    • It should open a server at: http://localhost:3000/

    If you want to create the demo configuration when you create a marker, add -Demo to the command parameters.

    e.g node NFTMarkerCreator.js -i image.png -Demo

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:

docker run -dit --name nft-app -v "$(pwd):/src" webarkit/nft-marker-creator-app:0.2.4 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:

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

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

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.