AetherAR is a modular WebAR starter for teams that want to ship browser-based AR experiences with a clean TypeScript architecture.
Today the repo gives you:
@aetherar/corefor engine lifecycle and plugin orchestration@aetherar/trackingfor image-target scheduling, target stores, and pose snapshots@aetherar/renderingfor adaptive render loops and a new Three.js renderer@aetherar/xrfor browser WebXR capability checks and session startup@aetherar/reactfor a React app shell around the engine@aetherar/clifor compiling NFT image targets and workflow automationapps/demofor a working image-tracking + 3D scene demo
- Image-tracked product reveals
- Poster and packaging activations
- WebXR-enhanced demo apps
- Three.js-based AR scenes with glTF models
npm install
npm run typecheck
npm run buildnpm install
npm run demo:devOpen the Vite URL that prints in the terminal, usually http://localhost:5173.
The demo currently uses a simulated image-target lock so you can validate the tracking/rendering pipeline before plugging in a production CV backend.
apps/
└── demo
packages/
├── core
├── tracking
├── rendering
├── xr
├── adapters/react
└── tools/cliimport { AetherEngine } from '@aetherar/core';
import {
ThreeSceneRenderer,
createAdaptiveRenderLoop,
createHologramModel,
applyObjectPose
} from '@aetherar/rendering';
import { createImageTrackingLoop } from '@aetherar/tracking';
const engine = new AetherEngine({ performance: 'balanced' });
const tracking = createImageTrackingLoop({ detectionFPS: 24 });
const renderer = new ThreeSceneRenderer();
const model = createHologramModel();
tracking.addTarget({ id: 'poster', width: 1080, height: 1920 });
renderer.add(model);
tracking.onSnapshot((snapshot) => {
const poster = snapshot.targets.find((target) => target.id === 'poster');
if (!poster || poster.observation.state !== 'tracked') {
applyObjectPose(model, { visible: false });
return;
}
applyObjectPose(model, {
visible: true,
position: poster.observation.pose.position,
rotation: poster.observation.pose.rotation,
scale: poster.observation.pose.scale
});
});
const renderLoop = createAdaptiveRenderLoop({
renderer,
targetFPS: 60,
viewport: {
width: () => window.innerWidth,
height: () => window.innerHeight
}
});
await engine.initialize();
tracking.start();
renderLoop.start();
await engine.start();AetherAR now includes a MindAR-style NFT compiler flow for natural-feature image targets.
Compile one image:
npx aetherar optimize-target ./assets/poster.png --physical-width-mm 180Compile multiple images or a whole directory into one manifest:
npx aetherar compile-nft ./assets/targets --out ./targets/launch-campaign.aether.nft.json --name launch-campaignThe generated manifest includes:
- stable target ids
- width and height metadata
- file fingerprints
- tracking quality warnings
- recommended tracking profile, scale, and detection FPS
Supported source formats: png, jpg, jpeg, gif, webp.
import { createImageTargetsFromNFTManifest } from '@aetherar/tracking';
import manifest from './targets/launch-campaign.aether.nft.json';
const runtimeTargets = createImageTargetsFromNFTManifest(manifest);
for (const target of runtimeTargets) {
tracking.addTarget(target);
}The compiled manifest is now matcher-ready. You can feed camera frames or any ImageData-like RGBA buffer into the backend and receive stable target observations.
import {
applyBackendFrameToTrackingLoop,
createNFTTrackingBackend,
createImageTrackingLoop
} from '@aetherar/tracking';
import manifest from './targets/launch-campaign.aether.nft.json';
const tracking = createImageTrackingLoop({ detectionFPS: 24 });
const backend = createNFTTrackingBackend(manifest, {
minConfidence: 0.74,
smoothing: 0.35
});
const frame = {
width: cameraWidth,
height: cameraHeight,
data: rgbaPixels,
channels: 4 as const
};
const result = backend.processFrame(frame);
applyBackendFrameToTrackingLoop(tracking, result);ThreeSceneRenderer includes loadGLTFModel() for glTF and GLB assets:
const productModel = await renderer.loadGLTFModel('/models/product.glb', {
scale: 0.6,
position: { x: 0, y: 0, z: -1.4 }
});
renderer.add(productModel);- React-powered app shell with
AetherAR - Adaptive Three.js render loop
- Matcher-ready NFT target descriptors in compiled manifests
- Image-target snapshot API with confidence, pose, and active target ids
- Responsive demo stage for desktop and mobile
- WebXR capability signal for progressive enhancement
- Create an engine with
@aetherar/core. - Compile NFT targets with
aetherar compile-nft. - Feed camera frames into
createNFTTrackingBackend. - Render anchored content with
ThreeSceneRenderer. - Load glTF models with
loadGLTFModel()or start withcreateHologramModel(). - Use
@aetherar/reactto wrap your app and expose the engine context.
node packages/tools/cli/dist/index.js compile-nft ./assets/targets --out ./targets/catalog.aether.nft.json
node packages/tools/cli/dist/index.js benchmark --device "Pixel 8"
node packages/tools/cli/dist/index.js phase-status
node packages/tools/cli/dist/index.js scaffold-demo --name my-webar-demo- The included tracking loop is framework-ready, but the demo target acquisition is still simulated.
- The NFT compiler now embeds matcher descriptors and the tracking package includes a baseline natural-feature matcher written in TypeScript.
- The renderer and tracking loops intentionally run at different cadences so heavy tracking work does not stall visuals.
BrowserXRRuntimeis available for capability checks and future immersive AR session wiring.
MIT