Archived: This project has been archived. Future development has moved to the NPM package for better package management: @multisetai/vps
This project is a sample WebXR application that demonstrates AR localization using the Multiset VPS API. It uses React, Three.js, and Vite, and supports AR sessions in compatible browsers.
- WebXR AR session with camera access
- Real-time localization using Multiset VPS API
- Visualization of pose results with 3D gizmo and axes
- Uses Three.js for rendering and model loading
- Tailwind CSS for styling
git clone <repo-url>
cd multiset-webxr-sdknpm installEdit src/config.ts and set your CLIENT_ID, CLIENT_SECRET, and CODE:
export const CLIENT_ID = "YOUR_CLIENT_ID";
export const CLIENT_SECRET = "YOUR_CLIENT_SECRET";
export const CURRENT_MAP_TYPE = "map" || "map-set";
export const CODE = "MapCode/MapsetCode";npm run dev -- --hostOpen the printed URL in a browser that supports WebXR (e.g., Chrome for Android).
src/App.tsx: Main React component and AR logicUtils.ts: Camera, image, and API utilitiesconfig.ts: API configurationinterfaces.ts: TypeScript interfacesassets/: Icons and images
public/: Static files, Draco decoders, models, and video assets
npm run dev— Start development server with Vitenpm run build— Build for productionnpm run preview— Preview production buildnpm run lint— Lint the codebase
- Requires HTTPS for WebXR camera access (Vite dev server is configured for HTTPS).
- The Draco decoder files are included in
public/draco/. - Tested with Chrome on Android.