Helpers for making A-Frame easier to work with.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>My A-Frame Scene</title>
<script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script>
<!-- Include component script into your project along with A-Frame. -->
<script src="https://unpkg.com/aframe-dev-components/dist/aframe-dev-components.min.js"></script>
</head>
<body>
<a-scene>
<!-- A-Frame markup -->
</a-scene>
</body>
</html>
Persists the camera position and orientation between scene reloads.
<a-scene retain-camera></a-scene>
Key | Description |
---|---|
` | reset to original camera. |
Adds an axis helper to an entity. Makes it easier to visualize an entity's orientation in a scene.
<a-entity axis></a-entity>
When added to <a-camera>
or an entity with the camera
component, an axis is displayed in the viewport that shows the world coordinate relative to the camera's orientation.
<a-camera axis></a-camera>
Property | Description | Default |
---|---|---|
size | size of line representing axis | 1 |
See three.js' docs for AxisHelper
.
Draws a bounding box around an entity's mesh.
<a-entity bb></a-axis>
See three.js' docs for BoxHelper
.
Install via npm:
npm install aframe-dev-components
Then require and use.
require('aframe');
require('aframe-dev-components');