Installation
Required files
Place the SDK files in your project:
your-project/
├── minitrack-core.js (96 KB - Core with license validation)
├── minitrack-wasm.js (2.8 MB - Tracking engine)
├── adapters/
│ ├── three.js (Three.js adapter)
│ ├── babylon.js (Babylon.js adapter)
│ └── aframe.js (A-Frame adapter)
└── your-app.js (Your code)Important
minitrack-wasm.js must be in the same directory as minitrack-core.js.
Option 1: Pre-built files (recommended)
Include the SDK directly in your HTML:
html
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.js"
}
}
</script>
<script type="module">
import { MiniTrackAR } from './minitrack-core.js'
import { ThreeAdapter } from './adapters/three.js'
// Your code here
</script>Option 2: Build from source
bash
npm install
npm run buildThe compiled files will be in dist/:
minitrack-core.jsadapters/three.jsadapters/babylon.jsadapters/aframe.jsminitrack-all.js(full bundle)
MIME types
Make sure your server serves .wasm files with the correct MIME type:
application/wasmIn nginx:
nginx
types {
application/wasm wasm;
}