Develop
Develop
Select your platform

Examples

Updated: Mar 5, 2026
The IWSDK includes several example projects that demonstrate key features and patterns. Each example is a standalone project you can run locally.

Available examples

ExampleDescriptionLink
Audio
Spatial audio integration with 3D positional sound
https://github.com/facebook/immersive-web-sdk/tree/main/examples/audio
Environment Raycast
AR surface detection and object placement using hit-testing
https://github.com/facebook/immersive-web-sdk/tree/main/examples/environment-raycast
Grab Interactions
One-hand, two-hand, and distance grabbing
https://github.com/facebook/immersive-web-sdk/tree/main/examples/grab
Locomotion
Teleport, slide, and turn movement systems
https://github.com/facebook/immersive-web-sdk/tree/main/examples/locomotion
Physics
Havok physics engine with dynamic objects and collisions
https://github.com/facebook/immersive-web-sdk/tree/main/examples/physics
Scene Understanding
AR plane and mesh detection with semantic labels
https://github.com/facebook/immersive-web-sdk/tree/main/examples/scene-understanding

Running examples

Each example can be run from the SDK repository:
cd immersive-web-sdk
pnpm install
pnpm run build:tgz
cd examples/<example-name>
npm install
npm run dev
Replace <example-name> with one of the example IDs listed above (for example, audio, environment-raycast, grab, locomotion, physics, or scene-understanding).
Note: WebXR features require HTTPS and may need user interaction to start. Examples that use AR features (environment raycast, scene understanding) require a compatible headset or device.
Did you find this page helpful?