-
Built on vanilla Three.js
-
Made for WebXR (ergonomic XR session & state management & easy XR input event handling)
-
Built-in Physics & Collision Detection courtesy of CannonJS
-
Easy, WebRTC-based networking & media streaming courtesy of ThreeNetwork
-
Designed for XR Packages and shared WebXR experiences/multiapps
-
Tiny project build sizes (~250kb gzipped before assets, way less than the image above!)
Run npm init sandcastle NAMEOFPROJECT OR npx create-sandcastle NAMEOFPROJECT, where NAMEOFPROJECT is your desired project name.
This will automatically:
- clone this repo into a new folder of that name
- install Sandcastle's dependencies
- remove the
.gitrepo - launch the dev server and
- open the default scene (located at
./src/examples/defaultScene.js) in your browser.
-
npm startwill launch the dev server and open the sample scene. -
npm run buildwill process and build your project into adistfolder. -
npm run build-xrpkwillnpm build, then create an XR Package indist. (Note that this script runs an interactive CLI for details about the various aspects of your XR Package.) -
npm run dev-xrpkwill do the same but output an unminified, source-mapped XR Package to help you debug your XR Package in your runtime of choice (we recommend Chimera). Please note the resulting .wbn file size will be very large - don't use this in production!
-
Check out the Wiki for a closer look at Sandcastle's Networking API, Physics API, event handling and state management, asset pipelines and more.
-
See the
examplesfolder for usage examples of networking, media streaming, physics, AR-in-VR experiences and more.