You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,18 +27,19 @@ When writing JavaScript and making changes be aware that the emscripten uglifier
27
27
-`tools/` (build scripts for building ARToolKit.js)
28
28
29
29
## WebAssembly
30
-
JSARToolKit5 supports WebAssembly. The libary builds two WebAssembly artefacts during the build process. These are ```build/artoolkit_wasm.js``` and ```build/artoolkit_wasm.wasm```. To use those include the artoolkit_wasm.js into your html page and define ```var artoolkit_wasm_url = '<<PATH TO>>/artoolkit_wasm.wasm';``` prior to loading the artoolkit_wasm.js file, like so:
30
+
31
+
JSARToolKit5 supports WebAssembly. The libary builds two WebAssembly artifacts during the build process. These are ```build/artoolkit_wasm.js``` and ```build/artoolkit_wasm.wasm```. To use those, include the artoolkit_wasm.js into your html page and define ```var artoolkit_wasm_url = '<<PATH TO>>/artoolkit_wasm.wasm';``` before loading the artoolkit_wasm.js file, like this:
31
32
32
33
```js
33
34
<script type='text/javascript'>
34
35
var artoolkit_wasm_url ='../build/artoolkit_wasm.wasm';
@@ -52,20 +53,22 @@ See examples/simple_image_wasm.html for details.
52
53
- or, set the `ARTOOLKIT5_ROOT` environment variable to point to your ARToolKit5 clone
53
54
- or, change the `tools/makem.js` file to point to your artoolkit5 clone (line 20)
54
55
55
-
## Build Instructions
56
+
## Build the project
56
57
57
58
### Recommended: Build using Docker
58
-
1. Install Docker (if you havn't already) [Docker](https://www.docker.com/) -> Get Docker
59
+
60
+
1. Install Docker (if you havn't already): [get Docker](https://www.docker.com/)
59
61
2. Clone artoolkit5 repository on your machine: `git submodule update --init`
60
62
3.`npm install`
61
-
4. From inside jsartoolkit5 directory run `docker run -dit --name emscripten -v $(pwd):/src trzeci/emscripten-slim:latest bash`- download and start the container, in preparation for the build
62
-
5.`docker exec emscripten npm run build-local`- build JS version of artoolkit5
63
-
6.`docker stop emscripten`- stop the container after the build if needed
64
-
7.`docker rm emscripten`- remove the container
65
-
8.`docker rmi trzeci/emscripten-slim:latest`- remove the image if you don't need it anymore
66
-
9. The build artefacts are in `/build`. There's a build with debug symbols in `artoolkit.debug.js` and the optimized build with bundled JS API in `artoolkit.min.js` and a WebAssembly build artoolkit_wasm.js and artoolkit_wasm.wasm
63
+
4. From inside jsartoolkit5 directory run `docker run -dit --name emscripten -v $(pwd):/src trzeci/emscripten-slim:latest bash`to download and start the container, in preparation for the build
64
+
5.`docker exec emscripten npm run build-local`to build JS version of artoolkit5
65
+
6.`docker stop emscripten`to stop the container after the build, if needed
66
+
7.`docker rm emscripten`to remove the container
67
+
8.`docker rmi trzeci/emscripten-slim:latest`to remove the Docker image, if you don't need it anymore
68
+
9. The build artifacts will appear in `/build`. There's a build with debug symbols in `artoolkit.debug.js`file and the optimized build with bundled JS API in `artoolkit.min.js`; also, a WebAssembly build artoolkit_wasm.js and artoolkit_wasm.wasm
67
69
68
70
### ⚠️ Not recommended ⚠️ : Build local with manual emscripten setup
71
+
69
72
To prevent issues with Emscripten setup and to not have to maintain several build environments (macOS, Windows, Linux) we only maintain the **Build using Docker**. Following are the instructions of the last know build on Linux which we verified are working. **Use at own risk.**
0 commit comments