Skip to content

Commit

Permalink
improved readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kalwalt committed Nov 6, 2024
1 parent 11d7ba3 commit 59d0d9f
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,30 @@ This project is based on the original **NFT Marker Creator** by [Carnaux](https:

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

- NFTmarkerCreatorAppFolder
- NFTmarkerCreatorApp Folder
- NFTMarkerCreator.js
- IMAGE.PNG :arrow_left:
- ...

or

- NFTmarkerCreatorAppFolder
- NFTmarkerCreatorApp Folder
- NFTMarkerCreator.js
- FOLDER/IMAGE.PNG :arrow_left:
- ...

4. Run it

` node NFTMarkerCreator.js -i PATH/TO/IMAGE`
```
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.
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 app.js -i image.png -level=4 -min_thresh=8`
e.g `node NFTMarkerCreator.js -i image.png -level=4 -min_thresh=8`

-zft
Flag for creating only the zft file
Expand Down Expand Up @@ -80,14 +83,14 @@ e.g `node app.js -i image.png -level=4 -min_thresh=8`

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

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

## 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](https://docs.docker.com/engine/install/) .
Then inside the folder you want to run docker:
Then inside the folder you want to run the docker image:

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

With the docker container generate the NFT marker:

Expand All @@ -99,13 +102,15 @@ remember to prepend the `-I /src/<path to your image>`

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.26 npm run build-local
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.26 bash
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.

0 comments on commit 59d0d9f

Please sign in to comment.