An open API service indexing awesome lists of open source software.

https://github.com/naugtur/aframe-point-component

implements a-point based on THREE.js point object
https://github.com/naugtur/aframe-point-component

aframe point vr

Last synced: 3 months ago
JSON representation

implements a-point based on THREE.js point object

Awesome Lists containing this project

README

          

## aframe-point-component

A point component for [A-Frame](https://aframe.io). Creates a [THREE.Points
object](https://threejs.org/docs/#Reference/Objects/Points). Points remain a
point no matter the distance.

![Screenshot](https://cloud.githubusercontent.com/assets/674727/24059359/0ba5a1f8-0b0c-11e7-8cc3-df71ee1d673e.gif)

[VIEW DEMO](http://naugtur.pl/aframe-point-component/)

### API

| 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 |

#### Custom Methods

`setPoints(array of arrays3)` - replace single point geometry with multiple points in one a-point instance

example

```js
element.components.point.setPoints([
[0,0,0]
[0,0,1]
[0,0,2]
...
])
```

### Installation

npm install aframe-point

#### Browser

Install and use by directly including the [browser files](dist):

```html

My A-Frame Scene



OR

```

#### npm

Install via npm:

```bash
npm install aframe-point
```

Then require and use.

```js
require('aframe');
require('aframe-point');
```