Skip to content

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.

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 build

The compiled files will be in dist/:

  • minitrack-core.js
  • adapters/three.js
  • adapters/babylon.js
  • adapters/aframe.js
  • minitrack-all.js (full bundle)

MIME types

Make sure your server serves .wasm files with the correct MIME type:

application/wasm

In nginx:

nginx
types {
    application/wasm wasm;
}