Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing nft #1

Closed
wants to merge 314 commits into from
Closed
Show file tree
Hide file tree
Changes from 113 commits
Commits
Show all changes
314 commits
Select commit Hold shift + click to select a range
6b1a7fa
update tests to measure markerDetect
ThorstenBux Jan 11, 2018
60d6396
updated luma calculation
ThorstenBux Jan 11, 2018
d76b8a6
Video luma optimization and test fixing
ThorstenBux Jan 11, 2018
0d25070
Changes to the threejs_from_scratch example and the underlying API to…
ThorstenBux Jan 14, 2018
5f458cc
Updated all examples to work with the underlying ARToolKit API changes
ThorstenBux Jan 14, 2018
56dec36
Changed pre-recorded video to .mp4 to support all browsers incl. Safa…
ThorstenBux Jan 14, 2018
17f489e
support for iOS 11 video in Safari
ThorstenBux Jan 15, 2018
dabea7d
Test remarks
ThorstenBux Jan 15, 2018
ea62d07
Merge pull request #59 from artoolkitx/artk-update
ThorstenBux Jan 15, 2018
a009011
Merge pull request #52 from nylki/patch-2
ThorstenBux Jan 15, 2018
afd2765
WIP: Type definitions
ThorstenBux Jan 15, 2018
761228d
WIP: Type definitions
ThorstenBux Jan 21, 2018
62d43ca
Merge pull request #60 from ThorstenBux/ts-fromCommunity
ThorstenBux Jan 22, 2018
ea819f1
add setDefaultMarkerWidth
ThorstenBux Jan 29, 2018
075c496
Merge pull request #64 from ThorstenBux/ts-fromCommunity
ThorstenBux Jan 29, 2018
c88a144
Fixed type definitions
ThorstenBux Feb 4, 2018
c9da9f3
Added tests and fixed error with registering empty string as marker
ThorstenBux Feb 4, 2018
a832f82
Merge pull request #66 from artoolkitx/trackable-registration-bug
ThorstenBux Feb 4, 2018
8f1afc5
Updated recommended version of the emscripten image to compile with D…
ThorstenBux May 14, 2018
a00c8ac
prevent WASM build and fix ARCameraParam constructor error.
ThorstenBux Jul 4, 2018
0310e0f
Fixed tests to run with the .min.js file
ThorstenBux Jul 4, 2018
4229ff6
Working example with wasm support
ThorstenBux Jul 4, 2018
4f4c954
making it async again
ThorstenBux Jul 4, 2018
2c14fe6
Added wasm loading into jsartoolkit5 API
ThorstenBux Jul 4, 2018
b96dfa1
Merge pull request #74 from ThorstenBux/webassembly-support
Neuroforge Jul 4, 2018
b2a6c75
performance tests
ThorstenBux Aug 26, 2018
336397e
deleting deprecated method at line 1216
kalwalt Feb 6, 2019
daf1322
adding artoolkit minifyed version
kalwalt Feb 6, 2019
83813eb
trying to compile the lib with AR_PIXEL_FORMAT_MONO
kalwalt Feb 6, 2019
724a01f
NO_BROWSER flag is no longer needed/used by emscripten 1.37 +
kalwalt Feb 7, 2019
c57c7c5
added variable for compiling BUILD_WASM_FILE = 'artoolkit_wasm.js'
kalwalt Feb 7, 2019
f489f48
added flags to use ZLIB
kalwalt Feb 7, 2019
a2f8976
added msse flags
kalwalt Feb 7, 2019
6534720
added compile_kpm statement for the lib compilation
kalwalt Feb 7, 2019
e196ff2
added compile_wasm and modified compile
kalwalt Feb 7, 2019
1c90c4d
better log error and addJob for compiling kpm (not sure if correct)
kalwalt Feb 7, 2019
9ad5f87
changes from BUILD_FILE to BUILD_DEBUG_FILE and compile_all
kalwalt Feb 7, 2019
0ebc0de
adding more MAIN_SOURCES def
kalwalt Feb 8, 2019
387aeb3
more ar_sources
kalwalt Feb 8, 2019
f0cea17
added -D HAVE_NFT
kalwalt Feb 8, 2019
7b6a792
added -Wno-warn-absolute-paths flag
kalwalt Feb 8, 2019
c9af3bc
reverting to https://github.com/kalwalt/jsartoolkit5/commit/9ad5f8748…
kalwalt Feb 8, 2019
b8d5cfc
fixing issue with window
kalwalt Feb 8, 2019
2d671d0
reverting to RGBA pixel format because code not detect nft markers
kalwalt Feb 8, 2019
7d95d41
new debug and min lib
kalwalt Feb 8, 2019
0abbf16
trying to update to the latest, partially
kalwalt May 28, 2019
b3b9682
better but issue with jpeg lib
kalwalt Jun 1, 2019
b5d527b
this is compiled without errors
kalwalt Jun 2, 2019
2ddedd4
no undefinded symbols and examples
kalwalt Jun 2, 2019
c647b52
using pixFormat variable
kalwalt Jun 2, 2019
8220c78
adding typescripts
kalwalt Jun 2, 2019
fee9da1
adding videoLuma and videoLumaPointer
kalwalt Jun 4, 2019
c5e3c2b
missed videoSize
kalwalt Jun 4, 2019
0a627ed
adding console error
kalwalt Jun 4, 2019
e48384b
adding transformGL_RH
kalwalt Jun 4, 2019
544c071
Debug Luma in DebugDraw function!
kalwalt Jun 4, 2019
10053ab
changes in debugSetup
kalwalt Jun 4, 2019
603a4c2
added other properties
kalwalt Jun 4, 2019
28890c7
new dispose function
kalwalt Jun 4, 2019
a92121a
new play function in artoolkit.api
kalwalt Jun 4, 2019
41a6975
new success function
kalwalt Jun 4, 2019
d5d33ae
minor fixes in getUserMedia artoolkit.api
kalwalt Jun 4, 2019
91090c8
last fixes in getUserMedia
kalwalt Jun 4, 2019
b6b6ca2
changes in getUserMediaARController()
kalwalt Jun 4, 2019
3256195
adding _teardownVideo() function
kalwalt Jun 4, 2019
4ea9292
updated ARCameraParam
kalwalt Jun 4, 2019
8356e6c
missed cameraPara
kalwalt Jun 4, 2019
2b0e3e4
updated trackPatternMarkerId
kalwalt Jun 4, 2019
913a4ce
updated trackBarcodeMarkerId
kalwalt Jun 4, 2019
44d71c0
updated loadMarker() function
kalwalt Jun 4, 2019
9ff9d15
changing UID in getTransMatSquare and other funcs
kalwalt Jun 4, 2019
31f49d3
modified transMatToGLMat()
kalwalt Jun 4, 2019
28b05fd
adding new arglCameraViewRHf() function
kalwalt Jun 4, 2019
17dd35d
rebuild libs
kalwalt Jun 4, 2019
1cd810e
updated load function
kalwalt Jun 4, 2019
50777d8
updates in addMarker()
kalwalt Jun 4, 2019
fd4f890
minor changes in a forEach(...)
kalwalt Jun 4, 2019
c8324d2
updates in addMultiMarker(...)
kalwalt Jun 4, 2019
3a945e7
minor fix in loadCamera()
kalwalt Jun 4, 2019
e10b492
addin errorCallback to ajax function
kalwalt Jun 4, 2019
5c39254
linting
kalwalt Jun 4, 2019
8fe3804
rebuild libs
kalwalt Jun 4, 2019
51314eb
small changes in artoolkit.api as in master
kalwalt Jun 4, 2019
8a00b40
changin matrix.elements to matrix.fromArray
kalwalt Jun 4, 2019
82b49cf
linting
kalwalt Jun 4, 2019
43e1cc5
missed framepointer, framesize and dataHeap variables initialization
kalwalt Jun 5, 2019
33bc94c
not this.width but this.canvas.width
kalwalt Jun 5, 2019
9c2289c
changes in dispatchEvent
kalwalt Jun 5, 2019
7523114
rebuilding libs
kalwalt Jun 5, 2019
ccaeb65
small linting changes
kalwalt Jun 5, 2019
ecf114d
last changes in the api and in the examples
kalwalt Jun 21, 2019
600ce4e
small changes not relevant
kalwalt Jun 21, 2019
96f193f
missed an important memory allocation in ARToolKitJS.cpp
kalwalt Jun 24, 2019
41ffba6
changing vdeoframe to videoLuma in kpmMatching()
kalwalt Jun 24, 2019
89c5c99
adding matrixGL_RH to NFt markers routine
kalwalt Jun 24, 2019
9fc42bf
adding nftMarkers to the typescript version
kalwalt Jul 5, 2019
ba1c8bc
removing the "var Module=typeof Module!=="undefined"?Module:{}"
kalwalt Jul 5, 2019
33ece86
only for testing
kalwalt Jul 5, 2019
ec9d72b
this is the solution! Nft works now!
kalwalt Jul 7, 2019
aaf4c9e
onRuntimeInitialized in the artoolkit.api and async for debug script tag
kalwalt Jul 9, 2019
d7dad56
adding -s BINARYEN_TRAP_MODE=clamp
kalwalt Jul 9, 2019
713d780
new rebuild wasm lib
kalwalt Jul 9, 2019
6879bc8
removing deprecated URL.createObjectURL()
kalwalt Jul 10, 2019
12cb023
new simple_video_wasm.html example
kalwalt Jul 10, 2019
d2fc7e6
New nft example with wasm
kalwalt Jul 11, 2019
415e480
upgrading Three.js to r103
kalwalt Jul 11, 2019
885b0b6
removing deprecated FlatShading
kalwalt Jul 11, 2019
ba91ad0
adding async
kalwalt Jul 21, 2019
9d1ecd2
adding --profiling in DEBUG
kalwalt Jul 21, 2019
8f21f89
restoring web workers
kalwalt Jul 29, 2019
e613291
adding trackingMod files
kalwalt Jul 30, 2019
e3a8090
adding detectNFTMarker to ARController
kalwalt Jul 30, 2019
80d9515
changed libjpeg
Aug 8, 2019
9f72249
debug lib need to be async
kalwalt Aug 14, 2019
5aa10bd
deleting trackingMod because not-efficient at all
kalwalt Aug 30, 2019
3057df3
fix: enhanced some doc, added pinball image, removed unuseful parts o…
nicolocarpignoli Nov 11, 2019
ac4aef6
indentation and console.log. works on desktop, not working on mobile.
nicolocarpignoli Nov 19, 2019
b53d8c0
nft_worker example refactor (comments and reorganizing folders/files)
nicolocarpignoli Nov 21, 2019
d4ec1ef
added more doc on artoolkit api and proxy
nicolocarpignoli Nov 21, 2019
a56ad58
added loader that stops when nft marker has been loaded
nicolocarpignoli Nov 26, 2019
608c258
object now disappear when tracking is lost
nicolocarpignoli Nov 26, 2019
78e0873
now triggers lostNFTMarker only if previously the same marker has bee…
nicolocarpignoli Nov 27, 2019
38400be
hide content only if marker is lost for a certain time, defaults 200ms
nicolocarpignoli Nov 27, 2019
d4166a0
adding a log for the flag
kalwalt Dec 5, 2019
9213957
added others ARLogi for the flag var
kalwalt Dec 5, 2019
e1ef23d
added example nft_worker in the main index
kalwalt Dec 5, 2019
bd0553c
right printings: double instead of string
kalwalt Dec 5, 2019
6a916ec
merging @misdake changes
kalwalt Dec 6, 2019
62a89f8
Merge branch 'misdake-fixing-nft' into fixing-nft
kalwalt Dec 6, 2019
85c9edd
added loading page, modified video atttributes and play to try to pre…
nicolocarpignoli Dec 6, 2019
f66bd31
added nft_improved_worker in the main menu
kalwalt Dec 6, 2019
df9c2cc
rebuild libraries with clamp mode
kalwalt Dec 7, 2019
75fe87f
adding a simple conditional for BINARYEN_TRAP_MODE=clamp
kalwalt Dec 8, 2019
d24c205
adding examples with wasm plus worker
kalwalt Dec 9, 2019
61f5d0a
fixing the pinball path
kalwalt Dec 9, 2019
a8e567a
added gltf nft example
nicolocarpignoli Dec 10, 2019
65df045
binaryen not needed with latest emscripten
kalwalt Dec 10, 2019
8d57c93
wasm file into nft folder
kalwalt Dec 11, 2019
8af0c60
new makem.js script also for windows
kalwalt Dec 11, 2019
3467c2e
cleaning the makem.js script by not needed commented code
kalwalt Dec 11, 2019
ea00961
updated readme
kalwalt Dec 11, 2019
3993f87
makem.js script is cross-platform now
kalwalt Dec 12, 2019
f1f086e
renaming file tracking2d.c to trackingMod2d.c to avoid confusion
kalwalt Dec 12, 2019
5bb50bd
removing outdated nft examples
kalwalt Dec 12, 2019
effdc2a
added nft_improved_worker_gltf to the examples index
kalwalt Dec 13, 2019
719be34
removing nft_init_test.html
kalwalt Dec 13, 2019
2d077df
added interpolation routine suggested by @hatsumatsu
kalwalt Dec 13, 2019
83d65ca
cleaning the code of nft_improved_worker_gltf/threejs_worker.js
kalwalt Dec 13, 2019
4c00612
removing reference of nft_init_test.html example from the examples index
kalwalt Dec 13, 2019
f5a3a4f
deleting not necessary const frameLength
kalwalt Dec 13, 2019
cfcd678
restoring the old name convention without Nft suffix
kalwalt Dec 13, 2019
4574aff
other changes to the libs name
kalwalt Dec 13, 2019
476409e
automatically changes config.h.in to config.h
kalwalt Dec 14, 2019
9a3b6c9
restructuring nft_improved_worker_gltf example
kalwalt Dec 14, 2019
d545bda
moving the gltf example
kalwalt Dec 14, 2019
9fe5f40
small fix for the ARTOOLKIT5_ROOT in makem.js, deleting NO_BROWSER
kalwalt Dec 14, 2019
2a6b90d
restructuring nft_improved_worker folder and files
kalwalt Dec 14, 2019
3bda503
camera_para set the camera parameters through message now
kalwalt Dec 14, 2019
3770dca
deleting nft_worker example
kalwalt Dec 14, 2019
63d9016
removing artoolkit.proxy.js
kalwalt Dec 14, 2019
a740a06
exclude files for libjpeg
kalwalt Dec 16, 2019
e07bd5f
Merge branch 'fixing-nft' of https://github.com/kalwalt/jsartoolkit5 …
kalwalt Dec 16, 2019
2910a89
deleting nft_threejs.html example
kalwalt Dec 17, 2019
02f2076
reverting to makem.js without glob
kalwalt Dec 18, 2019
df87420
minor addition to readme
nicolocarpignoli Dec 18, 2019
2edfbec
new fastcomp libjpeg.bc and switch to 1.38.44-fastcomp
kalwalt Dec 18, 2019
3b4bbc4
new libs
kalwalt Dec 18, 2019
4aa28a8
Merge branch 'master' into fixing-nft
kalwalt Dec 18, 2019
50d9063
restoring version from fixing-nft branch
kalwalt Dec 18, 2019
ac46aa8
fixing the build and restoring missed functions
kalwalt Dec 18, 2019
82276b9
missed createThreeNFTMarker function in artoolkit.three.js
kalwalt Dec 18, 2019
75df77d
fixing the Babylon example
kalwalt Dec 18, 2019
64014ac
add papaparse needed for performance tests
ThorstenBux Dec 18, 2019
fb6ff13
test fix
ThorstenBux Dec 18, 2019
3170168
fixing threejs_from_scratch.html example
kalwalt Dec 18, 2019
6b27072
updated emscripten version in the Readme
kalwalt Dec 20, 2019
0abccc0
GLTF example: model now disappear when NFT marker is not tracked
kalwalt Dec 22, 2019
7282dac
new example nft_armchair_image.html
kalwalt Dec 22, 2019
5cd456c
ar_sources for different platform in makem.js
kalwalt Dec 22, 2019
d9c5468
fixing issue with getMarker in test.js
kalwalt Dec 22, 2019
a91d8bd
removed strict mode and ecma6 code on worker
nicolocarpignoli Dec 24, 2019
0a229f5
adding a nft video example
kalwalt Dec 26, 2019
a2d72d7
improves in the pinball video
kalwalt Dec 26, 2019
a8ccb80
fixed paths for camera param
kalwalt Dec 26, 2019
a05194f
remove part of the url in the worker.postMessage
kalwalt Dec 26, 2019
69c55f4
now loading gif end when NFT marker finish to load
kalwalt Dec 26, 2019
5d0938b
trying to improve the html
kalwalt Dec 27, 2019
e38957c
improved nft_pinball_video js code
kalwalt Dec 27, 2019
9d7c065
adding ar.js logo and loading text for waiting intro
kalwalt Dec 27, 2019
8de1aa5
improvements in nft_armchair_image and nft_pinball_video examples
kalwalt Dec 27, 2019
fa15cb1
improves in the gltf example
kalwalt Dec 28, 2019
5236699
Adds readme for docker build.
ThorstenBux Jan 1, 2020
ed7c4ce
libjpeg cleanup
ThorstenBux Jan 2, 2020
914a15a
updated readme and removed build.sh
ThorstenBux Jan 2, 2020
d343d82
small corrections in the README.md
kalwalt Jan 3, 2020
a4d21cd
restoring 'use strict' directive in artoolkit.api.js
kalwalt Jan 4, 2020
416bc36
Merge branch 'fixing-nft' into fixing-nft-w-binaryen
kalwalt Jan 4, 2020
0fb6931
rebuild libs
kalwalt Jan 4, 2020
4e5f148
fixing message camera setting
kalwalt Jan 4, 2020
d079755
camera and video with wasm and worker examples
kalwalt Jan 4, 2020
44c17ca
stats works properly now in gltf example
kalwalt Jan 4, 2020
d10de2e
renaming some file and improving the example
kalwalt Jan 5, 2020
1bb7a0f
moving the BINARYEN flag only for WASM
kalwalt Jan 5, 2020
e4ab7d1
deleting the video example from the index
kalwalt Jan 5, 2020
f36f635
fix for the armchair example
kalwalt Jan 5, 2020
f566a50
Merge pull request #18 from kalwalt/fixing-nft-w-binaryen
kalwalt Jan 5, 2020
5d8fb7b
WIP tests for NFT.
ThorstenBux Jan 6, 2020
0d0efd9
fix for issue https://github.com/kalwalt/jsartoolkit5/issues/22
kalwalt Jan 7, 2020
be5274b
add wasm tests
ThorstenBux Jan 7, 2020
1d06eef
add wasm NFT tests
ThorstenBux Jan 7, 2020
ede299f
Merge commit '0d0efd98dd42f80fcaa1f02ddc082cce09796851' into nft-tests
ThorstenBux Jan 7, 2020
da8ed80
enhanced readme
nicolocarpignoli Jan 7, 2020
34daca0
trying to enhance resolution of camera
nicolocarpignoli Jan 7, 2020
3d0aced
trying to enhance resolution of camera
nicolocarpignoli Jan 7, 2020
901f6ff
fix loader times in threejs_worker_gltf
nicolocarpignoli Jan 7, 2020
5ae3851
cleaned examples
nicolocarpignoli Jan 7, 2020
bdaa724
added detectNFTMArker description
kalwalt Jan 7, 2020
6d9f719
Merge commit '5ae38515cec54e93999e040f8ad32202665e413f' into nft-tests
ThorstenBux Jan 8, 2020
3160657
Merge pull request #21 from ThorstenBux/nft-tests
kalwalt Jan 8, 2020
8328901
changes in 'Create ARController track image' test
kalwalt Jan 8, 2020
c6f3d57
fixe for FS is not defined issue, see https://github.com/kalwalt/jsar…
kalwalt Jan 8, 2020
2299dbc
wrapping the code into a setTimeout function and restoring the debug …
kalwalt Jan 8, 2020
6b94d31
adding setTimeout() to threejs_from_scratch.html example
kalwalt Jan 8, 2020
87f0d46
minor style enhancement to index of examples
nicolocarpignoli Jan 8, 2020
ff32e15
Merge branch 'fixing-nft' of github.com:kalwalt/jsartoolkit5 into fix…
nicolocarpignoli Jan 8, 2020
345fa02
reverting simple_image.html to the initial version
kalwalt Jan 8, 2020
539f238
Merge branch 'fixing-nft' of https://github.com/kalwalt/jsartoolkit5 …
kalwalt Jan 8, 2020
9066705
adding new NFT_MARKER marker type and other changes for AR.js
kalwalt Jan 8, 2020
78ddcd3
minor refactor
nicolocarpignoli Jan 9, 2020
b79f471
Merge branch 'fixing-nft' of github.com:kalwalt/jsartoolkit5 into fix…
nicolocarpignoli Jan 9, 2020
4a2fd7b
small changes to avoid uglifyjs issue
kalwalt Jan 9, 2020
e443d49
added getNFTMarker description
kalwalt Jan 9, 2020
a4faed2
setLogLevel, GetLogLevel, setMarkerInfoDir docs
kalwalt Jan 9, 2020
13c42e1
other descriptions for the setters and getters
kalwalt Jan 9, 2020
0a9ef5e
last descriptions
kalwalt Jan 9, 2020
3c0e6b6
deleting the old part of the Readme and fix some path in README.md
kalwalt Jan 9, 2020
44d9c07
small corrections
kalwalt Jan 10, 2020
4a78058
added basic nft example
kalwalt Jan 10, 2020
7b68ce1
build docs and tests instructions
kalwalt Jan 10, 2020
e832c81
Issue tracker
kalwalt Jan 10, 2020
2103d75
es5 for every nft examples
nicolocarpignoli Jan 10, 2020
33bda73
missing es6 fixes
nicolocarpignoli Jan 10, 2020
381b1aa
removing libjpeg from .gitignore
kalwalt Jan 10, 2020
900fdb6
Added a general description for NFT and types of markers
kalwalt Jan 12, 2020
6d8b508
ms to fps and other little improvements in the no wasm example
kalwalt Jan 13, 2020
53fb34a
aligning the main_threejs_worker.html example to the asm version
kalwalt Jan 13, 2020
848ca0e
Merge branch 'fixing-nft' into api-doc-improvements
kalwalt Jan 13, 2020
93f21ca
link to the NFT-Marker-Creator wiki
kalwalt Jan 16, 2020
2bc9b51
updated emscripten version
kalwalt Jan 17, 2020
905f3ef
Merge pull request #25 from kalwalt/api-doc-improvements
kalwalt Jan 17, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
doc/reference
node_modules
build/*.bc
emscripten/jpeg-6b/
emscripten/libjpeg/
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "emscripten/artoolkit5"]
path = emscripten/artoolkit5
url = https://github.com/artoolkit/artoolkit5
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,30 @@ Emscripten port of [ARToolKit](https://github.com/artoolkit/artoolkit5) to JavaS
2. Install python2 (https://www.python.org/downloads/)
3. Install emscripten (http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#download-and-install)

jsartoolkit5 aim is to create a Javascript version of artoolkit5. First, you need the artoolkit5 repository on your machine:
2. Clone ARToolKit5 project to get the latest source files. From within jsartoolkit5 directory do `git submodule update --init`. If you already cloned ARToolKit5 to a different directory you can:
- create a link in the `jsartoolkit5/emscripten/` directory that points to ARToolKit5 (`jsartoolkit5/emscripten/artoolkit5`)
- or, set the `ARTOOLKIT5_ROOT` environment variable to point to your ARToolKit5 clone
- or, change the `tools/makem.js` file to point to your artoolkit5 clone (line 62, 83, 107, 140)

3. Copy libjpeg-6b to emscripten/jpeg-6b
3. Copy libjpeg-6b to emscripten/libjpeg
- or, set the `LIBJPEG_ROOT` environment variable to point to your libjpeg source directory

4. Building
You can use the following version (tested recently) of libjpeg: (https://github.com/kalwalt/libjpeg-for-jsartoolkit5)

4. Set the `LIBJPEG_ROOT` variable - if you have not done it before - to the local path of your libjpeg (which you have cloned in the previous step)

5. Building
1. Make sure `EMSCRIPTEN` env variable is set (e.g. `EMSCRIPTEN=/usr/lib/emsdk_portable/emscripten/master/ node tools/makem.js`
2. Rename the `ARTOOLKIT5_ROOT/include/AR/config.h.in` file to `config.h`
3. Run `npm run build`


Troubleshootings:
- If you get errors about `BINARYEN_TRAP_MODE`, comment/de-comment following line on `makem.js` file: `FLAGS += ' -s BINARYEN_TRAP_MODE=clamp'`

During development, you can run ```npm run watch```, it will rebuild the library everytime you change ```./js/``` directory.

5. The built ASM.js files 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`.
6. The built ASM.js files 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`.

# ARToolKit JS API

Expand Down Expand Up @@ -105,7 +113,7 @@ The basic operation goes like this:
// For pattern markers, use artoolkit.AR_TEMPLATE_MATCHING_COLOR
//
ar.setPatternDetectionMode(artoolkit.AR_TEMPLATE_MATCHING_COLOR_AND_MATRIX);

ar.addEventListener('markerNum', function (ev) {
console.log('got markers', markerNum);
});
Expand Down
Loading