3D layout component and helpers for A-Frame VR.
Property | Description | Default Value |
---|---|---|
type | Type of layout. Can be one of box , circle , cube , dodecahedron , line , pyramid . |
line |
margin | Margin in meters. | 1 |
radius | Radius in meters. | 1 |
Install and use by directly including the browser files:
<head>
<title>My A-Frame Scene</title>
<script src="https://aframe.io/releases/0.2.0/aframe.min.js"></script>
<script src="https://rawgit.com/ngokevin/aframe-layout-component/master/dist/aframe-layout-component.min.js"></script>
</head>
<body>
<a-scene>
<a-entity layout="type: circle; margin: 10">
<a-entity geometry="primitive: box" material></a-entity>
<a-entity geometry="primitive: box" material></a-entity>
<a-entity geometry="primitive: box" material></a-entity>
<a-entity geometry="primitive: box" material></a-entity>
<a-entity geometry="primitive: box" material></a-entity>
<a-entity geometry="primitive: box" material></a-entity>
<a-entity geometry="primitive: box" material></a-entity>
<a-entity geometry="primitive: box" material></a-entity>
</a-entity>
</a-scene>
</body>
Install via NPM:
npm install aframe-layout-component
Then register and use.
require('aframe');
require('aframe-layout-component');