@@ -85,32 +85,32 @@ During development, you can run ```npm run watch```, it will rebuild the library
8585# ARToolKit JS API
8686
8787``` js
88- < script async src= " build/artoolkit.min.js" >
88+ < script src= " ../ build/artoolkit.min.js" >
8989// include optimized ASM.js build and JS API
9090< / script>
9191```
9292
9393# ARToolKit JS debug build
9494
9595``` js
96- < script src= " build/artoolkit.debug.js" >
96+ < script async src= " ../ build/artoolkit.debug.js" >
9797// - include debug build
9898< / script>
99- < script src= " js/artoolkit.api.js" >
99+ < script src= " ../ js/artoolkit.api.js" >
100100// - include JS API
101101< / script>
102102```
103103
104104# ARToolKit Three.js helper API
105105
106106``` js
107- < script async src= " build/artoolkit.min.js" >
107+ < script src= " ../ build/artoolkit.min.js" >
108108// - include optimized ASM.js build and JS API
109109< / script>
110- < script async src= " three.min.js" >
110+ < script src= " js/third_party/three.js/ three.min.js" >
111111// - include Three.js
112112< / script>
113- < script async src= " js/artoolkit.three.js" >
113+ < script src= " ../ js/artoolkit.three.js" >
114114// - include Three.js helper API
115115< / script>
116116< script>
@@ -137,7 +137,7 @@ The basic operation goes like this:
1371376 . Call ` ARController.process(img) `
138138
139139``` js
140- < script src= " build/artoolkit.min.js" >< / script>
140+ < script src= " ../ build/artoolkit.min.js" >< / script>
141141< script>
142142 var param = new ARCameraParam ();
143143
@@ -169,59 +169,6 @@ The basic operation goes like this:
169169< / script>
170170```
171171
172- ## Public
173-
174- * the calls your JS apps needs*
175-
176- - ` artoolkit.init(path, camera_param_path) ` - load path for artoolkit emscripten files
177- - ` artoolkit.onReady(callback) ` - runs callback when artoolkit has completely downloaded, initalized and ready to run
178- - ` artoolkit.setup(width, height); ` - initalize a buffer size for a canvas of width & height
179- - ` artoolkit.process(canvas); ` - extracts a frame from a canvas and process it
180- - ` artoolkit.debugSetup() ` - enables debugging, adds a threshold image to the dom
181- - ` artoolkit.getDetectedMarkers() ` - returns an array of detected markers from last detection process
182- - ` artoolkit.getCameraMatrix() ` - returns the projection matrix computed from camera parameters
183- - ` artoolkit.getTransformationMatrix() ` - returns the 16-element WebGL transformation matrix
184-
185- ## Internals
186-
187- * calls called from emscripten runtime -> artoolkit.js*
188-
189- - ` artoolkit.onFrameMalloc(object) ` - gets called when frame buffer gets allocated for canvas
190- - ` artoolkit.onMarkerNum(number) ` - gets called with the numbers of markers detected
191- - ` artoolkit.onGetMarker(object, index) ` - gets called with the marker struct for the positioned marker
192-
193- * calls available from js -> emscripten*
194-
195- - ` _setup(width, height) `
196- - ` _setThreshold(int) ` - 0 to 255
197- - ` _process() `
198- - ` _setDebugMode(boolean) `
199- - ` _addMarker(string) `
200- - ` setThreshold `
201- - ` setThresholdMode() ` eg. `Module.setThresholdMode(Module.AR_LABELING_THRESH_MODE_AUTO_MEDIAN / AR_LABELING_THRESH_MODE_AUTO_OTSU );
202- - ` setLabelingMode `
203- - ` setPatternDetectionMode `
204- - ` setMatrixCodeType() ` : Eg. Module.setMatrixCodeType(Module.AR_MATRIX_CODE_3x3);
205- - ` setImageProcMode `
206- - ` setPattRatio `
207-
208- ## Examples
209-
210- ```
211- artoolkit.init('', 'camera_para.dat').onReady(function() {
212- artoolkit.setProjectionNearPlane(1);
213- artoolkit.setProjectionFarPlane(1000);
214- artoolkit.setPatternDetectionMode(artoolkit.CONSTANTS.AR_MATRIX_CODE_DETECTION);
215- artoolkit.setMatrixCodeType(artoolkit.CONSTANTS.AR_MATRIX_CODE_4x4);
216- })
217-
218- artoolkit.init('', 'camera_para.dat').onReady(function() {
219- artoolkit.addMarker('../bin/Data/patt.hiro', function(marker) {
220- artoolkit.process(v);
221- })
222- })
223- ```
224-
225172## Constants
226173
227174* prepend all these constants with ` Module. ` or ` artoolkit.CONSTANTS ` to access them*
0 commit comments