immersal-babylon-webxr.mp4
An testbed project to localize Immersal 3D map within Babylon.js WebAR app.
To get and calculate camera images and camera intrinsics, camera-access
module for WebXR Device API can be used.
From these data, we can get pose matrix of WebAR camera.
- Babylon.js 5.13.3
- Immersal REST API 1.16.1
- Vite 2.9.9
- TypeScript
- yarn
- Node.js 16.13
- Windows 10 Home
- Android 12 Pixel 4a 5G
First of all, you have to create SSL/TLS certificate and you can use openssl command.
When you are asked CommonName
in the shell, answer https://<IP Adress>:3000
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
Create .env.local
file under the project root directory,
and put Immersal API Token and Map ID you will localize.
VITE_IMMERSAL_TOKEN=<Immersal API TOKEN>
VITE_MAP_ID=<MAP ID>
yarn install
Now, camera-access
is provided for only Chrome for Android.
You have to access to chrome://flags
and enable "WebXR Incubation".
Run this app for the command below.
yarn dev
You can ask me anything on my twitter.