Skip to content

Commit

Permalink
more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
disasteroftheuniverse committed Dec 30, 2019
1 parent 0f19952 commit 0375e42
Showing 1 changed file with 79 additions and 27 deletions.
106 changes: 79 additions & 27 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,79 @@
# SuperQuest

## AFrame Components for the Oculus Quest

![image](https://www.repostatus.org/badges/latest/wip.svg)
<pre>
src
├── <b>assets/</b> (<a href="/src/assets">Documentation</a>)
│ ├── hands.ma
│ └── hands.fbx
├── <b>components/</b> (<a href="/src/components">Documentation</a>)
│ ├── grab-controls.js
│ ├── hands.js
│ └── teleporter-controls.js
├── <b>extras/</b> (<a href="/src/extras">Documentation</a>)
│ ├── extras.js
│ ├── google-poly.js
│ ├── portals.js
│ └── shaders.js
├── <b>physics/</b> (<a href="/src/physics">Documentation</a>)
│ ├── physics.js
│ └── physics.worker.js
└── <b>utils/</b> (<a href="/src/utils">Documentation</a>)
└── utils.js
</pre>

TODO: basically everything
# SuperQuest - AFrame Components for the Oculus Quest

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

## 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 <span style="color: red; background-color: yellow;"> Not Working</span>
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. <span style="color: red; background-color: yellow">Warning</span> 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. |

0 comments on commit 0375e42

Please sign in to comment.