Boilerplate for creating and sharing A-Frame VR components.
Note this refers to A-Frame components of the entity-component system, and not Web Components.
The boilerplate comes with a stub component, test suite, examples infrastructure with Github pages, and stubbed README, which begins below.
A path to using the boilerplate:
- Rename all instances of
example
andExample
to your component name. - Write your component.
- Write your unit tests.
- Build examples.
- Clean up this README.
- Check
browser.js
and see if components are required and registered correctly. - Publish to NPM (
npm publish
). This will also generate a browser distribution to commit. - Publish examples to Github pages (
npm run ghpages
). - Share your component on Slack and awesome-aframe!
Example usage of the boilerplate:
An example component for A-Frame VR.
Install (or directly include the browser files).
npm install aframe-example-component
Register.
var exampleComponent = require('aframe-example-component').component;
require('aframe-core').registerComponent('example', exampleComponent);
Use.
<a-scene>
<a-entity example="exampleProp: exampleVal"></a-entity>
</a-scene>
Property | Description | Default Value |
---|---|---|