A point component for A-Frame. Creates a THREE.Points object. Points remain a point no matter the distance.
Property | Description | Default Value |
---|---|---|
size | size of rendered point (length of rectangle edge) | 1 |
color | color definition, like in CSS | #888 |
perspective | boolean - should it scale with distance or not | false |
setPoints(array of arrays3)
- replace single point geometry with multiple points in one a-point instance
example
element.components.point.setPoints([
[0,0,0]
[0,0,1]
[0,0,2]
...
])
npm install aframe-point
Install and use by directly including the browser files:
<head>
<title>My A-Frame Scene</title>
<script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-point-component/dist/aframe-point-component.min.js"></script>
</head>
<body>
<a-scene>
<a-entity point="size: 2"></a-entity>
OR
<a-point size="2"></a-point>
</a-scene>
</body>
Install via npm:
npm install aframe-point
Then require and use.
require('aframe');
require('aframe-point');