Start Creating
#
WebXR-ready BoilerplateWe value the time of our development team, as well as our open-source contributors, so, we've decided to build a starter project that is easy to setup, and within few minutes, you can start creating your own therapeutic application based on our design guidelines and best practices.
In this starter project, we use TypeScript with A-Frame, to be able to create static-types, readible, maintainable A-Frame component classes.
We're also using Google TypeScript Style (GTS) rules and automatic styling, formatting and fixing, to keep our code base consistent and well-formated.
#
Installation Guide#
Clone- Run the following command to clone the project to your local development environment
- Go to the cloned directory
#
Instal Dependencies- Run the following command to install all required depedencies
#
Create a new A-Frame Component- Add new TS components to the src/components directory
- Add the base A-Frame component class. Implement the A-Frame functions based on your usage
src/components/test_component.ts
- Make sure you register your component in the same file. Add this line at the end of the TS file
src/components/test_component.ts
- Make sure you import any new component to src/index.ts, then add it into the export section, so that it can be compiled with the other components
src/index.ts
#
Automatic Fixing- Say the following magic command to have your TS files automatically formatted and styled according to GTS, and to make sure that your code is error-free
#
Build- Run the following command to build the TS scripts using webpack. This step will generate the dist directory which will include the HTML files that are going to have the implemented functionalities
#
Start Local Development Server- Run the following command which will start a local development server on localhost, and the port number will be shown in CLI. The server has live-reloading features which will enable seeing your changes in real time (just make sure you run the build command)
#
Check your new component- Open the browser to localhost:PORT and start building amazing WebXR experiences!