-
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
.git
repo - launch the dev server and
- open the default scene (located at
./src/examples/defaultScene.js
) in your browser.
-
npm start
will launch the dev server and open the sample scene. -
npm run build
will process and build your project into adist
folder. -
npm run build-xrpk
willnpm 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-xrpk
will 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
examples
folder for usage examples of networking, media streaming, physics, AR-in-VR experiences and more.