Skip to content

Commit

Permalink
split sections
Browse files Browse the repository at this point in the history
  • Loading branch information
disasteroftheuniverse committed Dec 30, 2019
1 parent a946223 commit 8beeb1e
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 94 deletions.
9 changes: 9 additions & 0 deletions docs/assets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Assets

## Hand Model

A rigged hand model created in Autodesk Maya. May be modified to add additional hand poses and gestures.

![image](https://imgur.com/UQ2pqAd.gif)

Requires [Maya Babylon Exporter](https://github.com/BabylonJS/Exporters/tree/master/Maya) to export GLTF for use in A-Frame.
76 changes: 76 additions & 0 deletions docs/components.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Components

## mixer-control

Adds a click listener to an element to set aframe-extras/mesh-mixer on a model

```html
<a-entity mixer-control="model: #model; clip: walkcycle"></a-entity>
```

| property | type | default | usage |
|---|---|---|---|
| model | selector | `null` | the model to set animations for |
| clip | string | `*` | which clip to play on click |

## layered-material

Creates two lambert materials and blends them based on an alpha derived from a canvas

## split-mesh

extracts sub-objects from models and attaches them to entities

```html
<a-entity id="gltf" gltf-model="assets/my-model.glb"></a-entity>
<a-entity split-mesh="model: #gltf; name: subModel; map: mesh"></a-entity>
```

| property | type | default | usage |
|---|---|---|---|
| model | selector | `null` | the model to split up |
| name | string | `null` | the name of the sub-object, typically named in a 3d software like Blender |
| map | string | `'mesh'` | optional - the name in ```<a-entity>.object3DMap``` |

## portal

requires `camera` component. renders view from another camera in scene to a texture

```html
<a-entity id="cctv" camera="fov: 120; active: false;" spectator="screen: #tv; fps: 25;"></a-entity>
<a-entity id="tv" geometry="primitive: plane;"></a-entity>
```

| property | type | default | usage |
|---|---|---|---|
| screen | selector | `null` | the entity to apply the screen to |
| fps | number | `30.00` | the refresh rate of the screen texture. _Increasing this number impacts performance_ |

## aabb

a very simple collision detection system

```html
<a-entity id='cube' aabb="
moves: true;
enabled: true;
autoRefresh: true;
bounds: proxy;
interval: 40;
belongsTo: group1, group 3;
collidesWith: group2;
predict: true
"></a-entity>
```

| property | type | default | usage |
|---|---|---|---|
| enabled | boolean | `true` | whether the object is considered for collision by other objects |
| autoRefresh | boolean | `true` | when object is moving, collision boundary is also updated |
| size | vec3 | `0.25 0.25 0.25` | When bounds is 'box' or 'subproxy', sets the dimensions of the object in meters width x height x depth |
| bounds | string | `proxy` | how the shape of the AABB is computed. supports `box`,`mesh`, `proxy` and `subproxy`|
| offset | vec3 | `0 0 0` | move the aabb collider relative to local position |
| interval | number | `20` | Number of miliseconds between collision checks. Low numbers are allow more accurate collision, higher numbers are more performant. |
| belongsTo | array | `none` | The groups to which this AABB belongs. |
| collidesWith | array | `none` | A list of groups to check for collision against. |
| predict | boolean | `true` | Test for collisions a frame ahead for more precise collision detection. |
97 changes: 3 additions & 94 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,96 +1,5 @@
# SuperQuest - AFrame Components for the Oculus Quest
# _SuperQuest!_ AFrame Components for Oculus Quest

## Assets
[## components](./components)

### Hand Model

A rigged hand model created in Autodesk Maya. May be modified to add additional hand poses and gestures.

![image](https://imgur.com/UQ2pqAd.gif)

Requires [Maya Babylon Exporter](https://github.com/BabylonJS/Exporters/tree/master/Maya) to export GLTF for use in A-Frame.

## components

### grab-controls.js

### hands.js

### teleporter-controls.js

## extras

### mixer-control

Adds a click listener to an element to set aframe-extras/mesh-mixer on a model

```html
<a-entity mixer-control="model: #model; clip: walkcycle"></a-entity>
```

| property | type | default | usage |
|---|---|---|---|
| model | selector | `null` | the model to set animations for |
| clip | string | `*` | which clip to play on click |

### layered-material

Creates two lambert materials and blends them based on an alpha derived from a canvas

### split-mesh

extracts sub-objects from models and attaches them to entities

```html
<a-entity id="gltf" gltf-model="assets/my-model.glb"></a-entity>
<a-entity split-mesh="model: #gltf; name: subModel; map: mesh"></a-entity>
```

| property | type | default | usage |
|---|---|---|---|
| model | selector | `null` | the model to split up |
| name | string | `null` | the name of the sub-object, typically named in a 3d software like Blender |
| map | string | `'mesh'` | optional - the name in ```<a-entity>.object3DMap``` |

### portal

requires `camera` component. renders view from another camera in scene to a texture

```html
<a-entity id="cctv" camera="fov: 120; active: false;" spectator="screen: #tv; fps: 25;"></a-entity>
<a-entity id="tv" geometry="primitive: plane;"></a-entity>
```

| property | type | default | usage |
|---|---|---|---|
| screen | selector | `null` | the entity to apply the screen to |
| fps | number | `30.00` | the refresh rate of the screen texture. _Increasing this number impacts performance_ |

### aabb

a very simple collision detection system

```html
<a-entity id='cube' aabb="
moves: true;
enabled: true;
autoRefresh: true;
bounds: proxy;
interval: 40;
belongsTo: group1, group 3;
collidesWith: group2;
predict: true
"></a-entity>
```

| property | type | default | usage |
|---|---|---|---|
| enabled | boolean | `true` | whether the object is considered for collision by other objects |
| autoRefresh | boolean | `true` | when object is moving, collision boundary is also updated |
| size | vec3 | `0.25 0.25 0.25` | When bounds is 'box' or 'subproxy', sets the dimensions of the object in meters width x height x depth |
| bounds | string | `proxy` | how the shape of the AABB is computed. supports `box`,`mesh`, `proxy` and `subproxy`|
| offset | vec3 | `0 0 0` | move the aabb collider relative to local position |
| interval | number | `20` | Number of miliseconds between collision checks. Low numbers are allow more accurate collision, higher numbers are more performant. |
| belongsTo | array | `none` | The groups to which this AABB belongs. |
| collidesWith | array | `none` | A list of groups to check for collision against. |
| predict | boolean | `true` | Test for collisions a frame ahead for more precise collision detection. |
[## components](./assets)

0 comments on commit 8beeb1e

Please sign in to comment.