Point your phone at the printed card or a screen showing the card to see the full MRT map floating above it.
No app required — this is 100% browser-based Web AR. Just open the link in Chrome on your phone, allow camera access, and point at the card.
cd dhaka-ar-metro
npm installCamera access on your phone requires HTTPS. Keep this running.
npm run serve:https
The terminal will print a URL like:
https://192.168.x.x:3443/index.html
Note this URL — you'll need it for the QR code and your phone.
The QR code on the card should point to the URL shown in Step 2.
If it doesn't match your network, regenerate it:
AR_URL=https://192.168.x.x:3443/index.html npm run export-card
Replace 192.168.x.x with the IP shown in your terminal.
The card image is assets/Metro card.png.
Do this on your PC (not the phone).
- Open https://localhost:3443/compile-target.html in Chrome.
- Click Compile assets/Metro card.png.
- Wait 30–60 seconds until you see SUCCESS — targets.mind saved.
You only need to redo this step if you change the card image.
Use assets/Metro card.png as your AR target. Either option works:
Option A — Print
| Recommended size | A6 landscape (~148 × 105 mm) or postcard size |
| Minimum size | Credit-card size (tracking will be weaker) |
| Paper | Matte cardstock or photo paper — avoid glossy |
Print at 100% scale. Do not crop the QR code.
Option B — Screen
Open assets/Metro card.png on another phone, tablet, or monitor and point your camera at it. Good for quick testing — printed cards usually track more reliably.
- Phone and PC on the same Wi-Fi.
- Open the URL from Step 2, or scan the QR on the card.
- First visit: Chrome → Advanced → Proceed (self-signed certificate warning is normal).
- Tap Allow for camera access.
- Use Chrome on Android. Safari on iOS has limited Web AR support.
- Point the camera at the printed card or screen from Step 5. Pinch or use +/− to zoom the map.
| Problem | Fix |
|---|---|
| Connection not secure | Use npm run serve:https, not plain http:// |
| Browser not compatible | Use Chrome on Android; avoid in-app browsers (WhatsApp, Facebook) |
| Camera never asks | Must be HTTPS; accept the certificate warning first |
| Map does not stick to card | Recompile at https://localhost:3443/compile-target.html |
| QR opens wrong URL | Run AR_URL=https://your-ip:3443/index.html npm run export-card, reprint, recompile |
Swap out Metro card.png and the overlay image — the AR engine stays the same.
| Idea | Card | Overlay |
|---|---|---|
| 🎂 Birthday card | Printed birthday card | Animated cake / fireworks scene |
| 🏫 Campus map | University brochure | Interactive building labels |
| 🎮 Board game | Game board card | 3D character or game stats |
| 🪪 Business card | Your name card | Portfolio / contact links in AR |
| 🌍 Travel poster | City poster | Landmark info + photos |
| 🍽️ Restaurant menu | Table card / coaster | Dish photos floating above |
| 🎵 Album cover | CD / vinyl sleeve | Music visualizer or artist info |
Replace assets/Metro card.png with your card image, replace the overlay PNG, recompile targets.mind, done.
If you update assets/dhaka-metro-map.svg:
npm run export-overlay
No need to recompile targets.mind unless the card image changed.
