Skip to content

gabschettino/iTwin-Tiles-XR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iTwin-VR-3DTiles

This is a sample that extends the 3D Tiles Samples example from Bentley's iTwin platform to view an iModel in the 3D Tiles streaming format in VR, which runs natively in the VR's browser without the need of setting up game engines.

It was mainly tested on Meta's Quest 3 using the default controller.

It works using 3D Tiles streaming format, together with the iTwin platform Mesh Export API, three.js and also 3DTilesRendererJS, a package that implements a three.js renderer for 3D Tiles.

This sample is highly experimental and is not intended for production use.

Steps to run

In the root directory:

  • npm install
  • npm run build
  • npm run dev

Environment variables

In a .env file in the root directory:

  • VITE_CLIENT_ID - Client ID needed to sign in with Bentley IMS (required)
  • VITE_IMS_PREFIX - Bentley IMS authority prefix (should be "dev-", "qa-", or "") (optional, default is "", meaning iModels in the production environment)
  • VITE_IMODEL_ID - iModel ID of the iModel to view (required)
  • VITE_ION_KEY - Cesium ion access token (for displaying the photorealistic tiles)
  • VITE_CHANGESET_ID - Changeset ID of the changeset to view (optional, default is the latest changeset)

2. Running in HTTPS

For the VR experience to work, the application must be served over HTTPS to have access to it's controllers and sensors. If you are running this application locally, you can set up a self-signed certificate by running the following command in the root directory:

openssl req -nodes -new -x509 -keyout server.key -out server.cert

Then, in the package.json file, change the dev script to:

"dev": "vite --https --cert server.cert

Alternatively, you can use set up a GitHub repo and use Vercel to deploy the application over HTTPS, including the domain at your specific iTwin's Redirect URIs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published