Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
disasteroftheuniverse committed Dec 30, 2019
1 parent 2d714e6 commit 8b115a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
7 changes: 7 additions & 0 deletions docs/aframe-extra-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ A collection of miscellaneous components with varying degrees of usefulness.
Creates a flat 2D rectangle with rounded corners. The appearance can be modified with [A-Frame 'material' component](https://aframe.io/docs/master/components/material.html).

**Example**

```html
<a-entity rounded="radius: 0.05; width: 1; height: 2;" material="color: blue;"></a-entity>
```

**Properties**

| Property | Property Type | Default Value | Description |
|---|---|---|---|
| radius | _number_ | 0.0125 | The radius of the rounded corners in meters. Note: this is in _addition_ to the width & height. |
Expand All @@ -33,11 +35,13 @@ Creates a flat 2D rectangle with rounded corners. The appearance can be modified
Restricts the movement of an object to a volume specified by minimum and maximum values in world space; Objects with the _clamp_ component cannot move beyond the limits defined by the min and max values.

**Example**

```html
<a-entity position="0 1 -1" clamp="min: -2 -4 -1; max: 2 5 3"></a-entity>
```

**Properties**

| Property | Property Type | Default Value | Description |
|---|---|---|---|
| min | _Vector3_ | {x:-1,y:-1,z:-1} | The minimum allowed world position by axis. |
Expand All @@ -52,6 +56,7 @@ Restricts the movement of an object to a volume specified by minimum and maximum
Calls `console.log` after a mesh is loaded;

**Example**

```html
<a-entity log-object3D></a-entity>
<!-- returns 'Object3D: { .. etc ... }'-->
Expand All @@ -66,12 +71,14 @@ Calls `console.log` after a mesh is loaded;
Aligns the Z-axis of an entity to always face towards a specified entity;

**Example**

```html
<a-entity id="foo" ></a-entity>
<a-entity billboard="src: #foo;"></a-entity>
```

**Properties**

| Property | Property Type | Default Value | Description |
|---|---|---|---|
| src | _selector_ | _null_ | Selector of the entity that the billboard should face towards. |
21 changes: 3 additions & 18 deletions docs/aframe-oculus-hands.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ AFRAME.utils.extendComponent('oculus-quest-hands', 'grab', (grabEvent) => {/*you
The appearance can be modified with [A-Frame 'material' component](https://aframe.io/docs/master/components/material.html).

**Examples**

```html
<!-- with url(path/to/asset); -->
<a-entity id="leftHand"
Expand All @@ -48,6 +49,7 @@ The appearance can be modified with [A-Frame 'material' component](https://afram
```

**Properties**

| Property | Property Type | Default Value | Description |
|---|---|---|---|
| model | _asset_ | `./handRight.glb` | The path to the prescribed hand model in glb format. |
Expand All @@ -61,23 +63,6 @@ The appearance can be modified with [A-Frame 'material' component](https://afram

Gestures are stored as animation targets in the [prescribed hand model](./assets.md).

Several poses are triggered by default controller events such as _triggertouchstart_ and _gripdown_. All gestures and poses may be triggered with the addition of a new state or by an event of type 'pose' with the detail of `{pose: 'posename'}`:
```js
var leftHandEl = document.querySelector('#leftHand');
leftHandEl.emit('pose',{pose: 'hold-tennisball'});
```

**Available ready-made gestures**
| Gesture | Event(s) | State |
|---|---|---|
| fist | _gripdown_ | fist |
| grab | _gripdown_ | holding-something |
| hold-hammer | _grab_, _hold_ | holding-hammer |
| hold-tennisball | _grab_, _hold_ | holding-tennisball |
| hold-brick | _grab_, _hold_ | holding-brick |
| hold-pistol | _grab_, _hold_ | holding-pistol |
| hold-sword | _grab_, _hold_ | holding-sword |

### Alignments

The presribed hand model includes a number of transforms which assist in aligning objecst to different hand gestures when they are picked up. WHich alignment a grabbed item aligns to may be configured with the ['grabbable' component](#grabbable).
The presribed hand model includes a number of transforms which assist in aligning objects to different hand gestures when they are picked up. Which alignment a grabbed item aligns to may be configured with the ['grabbable' component](#grabbable).

0 comments on commit 8b115a3

Please sign in to comment.