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
+45-16Lines changed: 45 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,8 @@ ARToolKit marker detection plugin for AR.js core with WebAssembly support.
4
4
5
5
## Features
6
6
7
-
- Web Worker-based detection — marker detection runs off the main thread
7
+
- Web Worker-based detection — marker detection runs off the main thread (Browser Module Worker)
8
8
- ImageBitmap support — zero-copy frame transfer (browser)
9
-
- Cross-platform — browser Workers and Node.js worker_threads (stub path)
10
9
- ARToolKit integration — square pattern markers
11
10
- Event-driven API — marker found/updated/lost + raw getMarker forwarding
12
11
- Filtering — only forwards PATTERN_MARKER events above a minimum confidence
@@ -17,26 +16,53 @@ ARToolKit marker detection plugin for AR.js core with WebAssembly support.
17
16
npm install @ar-js-org/arjs-plugin-artoolkit
18
17
```
19
18
20
-
## Configuration (module + assets)
19
+
## Using the ESM build (recommended)
21
20
22
-
To ensure the Worker can import ARToolKit in the browser, pass an explicit ESM URL (recommended):
21
+
When you import the built ESM bundle from `dist/`, the worker and ARToolKit are already bundled and referenced correctly. You do NOT need to pass `artoolkitModuleUrl`.
- Serve from a web server so `/dist` assets resolve. The build is configured with `base: './'`, so the worker asset is referenced relative to the ESM file (e.g., `/dist/assets/worker-*.js`).
44
+
- In your own apps, place `dist/` where you serve static assets and import the ESM with the appropriate path (absolute or relative).
45
+
46
+
## Using source (development mode)
47
+
48
+
If you develop against `src/` (not the built `dist/`), the worker will attempt to dynamically import ARToolKit. In that case you should provide `artoolkitModuleUrl` or ensure your dev server can resolve `@ar-js-org/artoolkit5-js`.
0 commit comments