Add-ons and helpers for A-Frame VR.
In the dist/ folder, download any package(s) you need. Include the scripts on your page, and all components are automatically registered for you:
<script src="//cdn.rawgit.com/donmccurdy/aframe-extras/v1.16.2/dist/aframe-extras.min.js"></script>
CDN builds for aframe-extras/v1.16.2:
- aframe-extras.js (development)
- aframe-extras.min.js (production)
npm install --save aframe-extras
// custom-extras.js
var extras = require('aframe-extras');
AFRAME.registerComponent('velocity', extras.math.velocity); // Register a single component.
extras.physics.registerAll(); // Register a particular package, and its dependencies.
extras.registerAll(); // Register everything.
Once installed, you'll need to compile your JavaScript using something like Browserify or Webpack. Example:
npm install -g browserify
browserify custom-extras.js -o bundle.js
bundle.js
may then be included in your page. See here for a better introduction to Browserify.
src ├── controls/ │ ├── checkpoint-controls.js │ ├── gamepad-controls.js │ ├── hmd-controls.js │ ├── keyboard-controls.js (not VR-friendly) │ ├── mouse-controls.js (not VR-friendly) │ ├── touch-controls.js │ └── universal-controls.js ├── loaders/ │ ├── fbx-model.js (experimental) │ ├── ply-model.js │ └── three-model.js ├── math/ │ ├── quaternion.js │ └── velocity.js ├── misc/ │ ├── checkpoint.js │ ├── jump-ability.js (not VR-friendly) │ └── toggle-velocity.js ├── physics/ │ ├── body.js │ ├── dynamic-body.js │ ├── kinematic-body.js │ ├── physics.js │ ├── static-body.js │ └── system │ └── physics.js ├── primitives/ │ ├── a-grid.js │ ├── a-ocean.js │ └── a-tube.js └── shadows/ ├── shadow-light.js (experimental) └── shadow.js (experimental)