Vedika. API docs

Vastu · AR Compass

Point your phone.
See your zone.

A live camera compass that reads your direction and shows the Vastu zone you're facing — deity, element, what belongs there. Check the displayed accuracy before you use a reading.

Works on iPhone (Safari) and Android (Chrome). Camera and compass are required; location is optional.

Optional — room scan

Place room remedies on the floor

On supported Android Chrome, trace the outline and named rooms by tapping floor corners, then face a direction you already know is north and hold the north button. Finish keeps the camera session open: room outlines, an 8/16-sector direction guide, numbered placement notes and remedy pins appear on the scanned floor with a score chip. Close AR to read the complete advice and its sources on the same north-up plan. Your phone tracks the positions; north is where you set it. Treat this as a zoning sketch, not a survey. Placement rules and modern remedy conventions keep their own source labels; a remedy is not a promise of benefit.

The camera scan requires WebXR floor hit testing and touch controls. iPhone and other unsupported devices can open a saved scan as the 2D remedy plan below. Closing the camera or losing its tracking origin requires a fresh scan before placing remedies again.

The example is a drawn plan. Saved scans keep the north direction entered when they were captured. To draw a different plan, use the plan tracer.

For developers

Embed this on your own page

Three ways to drop the AR compass into a page you own — documented in js/vastu/vastu-ar-embed.js, which this page's own widget is built on.

1. Data-attribute auto-mount — no JavaScript required on your page beyond the one script tag. Geolocation stays off unless you set data-vedika-auto-geolocate="true" explicitly.

<div data-vedika-widget="vastu-ar"
     data-vedika-zone-resolution="8"
     data-vedika-auto-geolocate="false"></div>
<script type="module"
  src="https://vedika.io/js/vastu/vastu-ar-embed.js"></script>

2. Explicit mount — call it yourself, e.g. from a click handler.

<div id="vastu-ar"></div>
<script type="module">
  import { mountVastuAR } from 'https://vedika.io/js/vastu/vastu-ar-embed.js';
  const widget = mountVastuAR(document.getElementById('vastu-ar'), {
    onZoneChange(zone, meta) { console.log(zone.code, meta.bearingDeg); },
  });
  // widget.start() from inside a click/tap handler — camera + motion
  // permissions require a real user gesture.
</script>

3. Iframe embed — this whole guided page, framed.

<iframe
  src="https://vedika.io/vastu-ar/"
  allow="camera; gyroscope; accelerometer; magnetometer; geolocation"
  style="width:100%;height:640px;border:0"
></iframe>

Permissions-Policy caveat: the iframe's allow= attribute grants permission from the parent's side, but it is not sufficient by itself — your own page's Permissions-Policy response header must also not block the framed origin (e.g. Permissions-Policy: camera=(self) with no allowance for vedika.io silently blocks the iframe's camera access, with no console error naming the header). If camera/motion don't work inside your embed, check your own response headers first.

No API key is ever accepted by this embed surface — it runs against the free keyless sandbox, or point apiBase at a server-side proxy you own for keyed accuracy. See vastu-ar-embed.js's header comment for the full reasoning.