Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
shakiba committed Dec 25, 2023
1 parent 4de71d9 commit 1ea2ddd
Show file tree
Hide file tree
Showing 24 changed files with 309 additions and 88 deletions.
49 changes: 29 additions & 20 deletions docs/api/classes/body.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ To create a new Body use {@link World.createBody}.

### Properties

* [style](body.md#style)
* [DYNAMIC](body.md#static-readonly-dynamic)
* [KINEMATIC](body.md#static-readonly-kinematic)
* [STATIC](body.md#static-readonly-static)
Expand Down Expand Up @@ -89,6 +90,14 @@ To create a new Body use {@link World.createBody}.

## Properties

### style

**style**: *[Style](../interfaces/style.md)*

Styling for dev-tools.

___

### `Static` `Readonly` DYNAMIC

**DYNAMIC**: *[BodyType](../globals.md#bodytype)* = "dynamic"
Expand Down Expand Up @@ -160,7 +169,7 @@ ___

### applyForce

**applyForce**(`force`: Vec2, `point`: Vec2, `wake`: boolean): *void*
**applyForce**(`force`: [Vec2Value](../interfaces/vec2value.md), `point`: [Vec2Value](../interfaces/vec2value.md), `wake`: boolean): *void*

Apply a force at a world point. If the force is not applied at the center of
mass, it will generate a torque and affect the angular velocity. This wakes
Expand All @@ -170,8 +179,8 @@ up the body.

Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`force` | Vec2 | - | The world force vector, usually in Newtons (N). |
`point` | Vec2 | - | The world position of the point of application. |
`force` | [Vec2Value](../interfaces/vec2value.md) | - | The world force vector, usually in Newtons (N). |
`point` | [Vec2Value](../interfaces/vec2value.md) | - | The world position of the point of application. |
`wake` | boolean | true | Also wake up the body |

**Returns:** *void*
Expand All @@ -197,7 +206,7 @@ ___

### applyLinearImpulse

**applyLinearImpulse**(`impulse`: Vec2, `point`: Vec2, `wake`: boolean): *void*
**applyLinearImpulse**(`impulse`: [Vec2Value](../interfaces/vec2value.md), `point`: [Vec2Value](../interfaces/vec2value.md), `wake`: boolean): *void*

Apply an impulse at a point. This immediately modifies the velocity. It also
modifies the angular velocity if the point of application is not at the
Expand All @@ -207,8 +216,8 @@ center of mass. This wakes up the body.

Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`impulse` | Vec2 | - | The world impulse vector, usually in N-seconds or kg-m/s. |
`point` | Vec2 | - | The world position of the point of application. |
`impulse` | [Vec2Value](../interfaces/vec2value.md) | - | The world impulse vector, usually in N-seconds or kg-m/s. |
`point` | [Vec2Value](../interfaces/vec2value.md) | - | The world position of the point of application. |
`wake` | boolean | true | Also wake up the body |

**Returns:** *void*
Expand Down Expand Up @@ -399,31 +408,31 @@ ___

### getLinearVelocityFromLocalPoint

**getLinearVelocityFromLocalPoint**(`localPoint`: Vec2): *Vec2*
**getLinearVelocityFromLocalPoint**(`localPoint`: [Vec2Value](../interfaces/vec2value.md)): *Vec2*

Get the world velocity of a local point.

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`localPoint` | Vec2 | A point in local coordinates. |
`localPoint` | [Vec2Value](../interfaces/vec2value.md) | A point in local coordinates. |

**Returns:** *Vec2*

___

### getLinearVelocityFromWorldPoint

**getLinearVelocityFromWorldPoint**(`worldPoint`: Vec2): *Vec2*
**getLinearVelocityFromWorldPoint**(`worldPoint`: [Vec2Value](../interfaces/vec2value.md)): *Vec2*

Get the world linear velocity of a world point attached to this body.

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`worldPoint` | Vec2 | A point in world coordinates. |
`worldPoint` | [Vec2Value](../interfaces/vec2value.md) | A point in world coordinates. |

**Returns:** *Vec2*

Expand Down Expand Up @@ -565,31 +574,31 @@ ___

### getWorldPoint

**getWorldPoint**(`localPoint`: Vec2): *Vec2*
**getWorldPoint**(`localPoint`: [Vec2Value](../interfaces/vec2value.md)): *Vec2*

Get the corresponding world point of a local point.

**Parameters:**

Name | Type |
------ | ------ |
`localPoint` | Vec2 |
`localPoint` | [Vec2Value](../interfaces/vec2value.md) |

**Returns:** *Vec2*

___

### getWorldVector

**getWorldVector**(`localVector`: Vec2): *Vec2*
**getWorldVector**(`localVector`: [Vec2Value](../interfaces/vec2value.md)): *Vec2*

Get the corresponding world vector of a local vector.

**Parameters:**

Name | Type |
------ | ------ |
`localVector` | Vec2 |
`localVector` | [Vec2Value](../interfaces/vec2value.md) |

**Returns:** *Vec2*

Expand Down Expand Up @@ -845,15 +854,15 @@ ___

### setLinearVelocity

**setLinearVelocity**(`v`: Vec2): *void*
**setLinearVelocity**(`v`: [Vec2Value](../interfaces/vec2value.md)): *void*

Set the linear velocity of the center of mass.

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`v` | Vec2 | The new linear velocity of the center of mass. |
`v` | [Vec2Value](../interfaces/vec2value.md) | The new linear velocity of the center of mass. |

**Returns:** *void*

Expand All @@ -880,13 +889,13 @@ ___

### setPosition

**setPosition**(`p`: Vec2): *void*
**setPosition**(`p`: [Vec2Value](../interfaces/vec2value.md)): *void*

**Parameters:**

Name | Type |
------ | ------ |
`p` | Vec2 |
`p` | [Vec2Value](../interfaces/vec2value.md) |

**Returns:** *void*

Expand Down Expand Up @@ -918,7 +927,7 @@ ___

### setTransform

**setTransform**(`position`: Vec2, `angle`: number): *void*
**setTransform**(`position`: [Vec2Value](../interfaces/vec2value.md), `angle`: number): *void*

Set the position of the body's origin and rotation. Manipulating a body's
transform may cause non-physical behavior. Note: contacts are updated on the
Expand All @@ -928,7 +937,7 @@ next call to World.step.

Name | Type | Description |
------ | ------ | ------ |
`position` | Vec2 | The world position of the body's local origin. |
`position` | [Vec2Value](../interfaces/vec2value.md) | The world position of the body's local origin. |
`angle` | number | The world rotation in radians. |

**Returns:** *void*
Expand Down
11 changes: 11 additions & 0 deletions docs/api/classes/boxshape.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ A rectangle polygon which extend PolygonShape.
* [m_radius](boxshape.md#m_radius)
* [m_type](boxshape.md#m_type)
* [m_vertices](boxshape.md#m_vertices)
* [style](boxshape.md#style)
* [TYPE](boxshape.md#static-type)

### Methods
Expand Down Expand Up @@ -112,6 +113,16 @@ ___

___

### style

**style**: *[Style](../interfaces/style.md)*

*Inherited from [Shape](shape.md).[style](shape.md#style)*

Styling for dev-tools.

___

### `Static` TYPE

**TYPE**: *"polygon"* = 'polygon' as const
Expand Down
11 changes: 11 additions & 0 deletions docs/api/classes/chainshape.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ WARNING: The chain will not collide properly if there are self-intersections.
* [m_radius](chainshape.md#m_radius)
* [m_type](chainshape.md#m_type)
* [m_vertices](chainshape.md#m_vertices)
* [style](chainshape.md#style)
* [TYPE](chainshape.md#static-type)

### Methods
Expand Down Expand Up @@ -128,6 +129,16 @@ ___

___

### style

**style**: *[Style](../interfaces/style.md)*

*Inherited from [Shape](shape.md).[style](shape.md#style)*

Styling for dev-tools.

___

### `Static` TYPE

**TYPE**: *"chain"* = 'chain' as const
Expand Down
11 changes: 11 additions & 0 deletions docs/api/classes/circleshape.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* [m_p](circleshape.md#m_p)
* [m_radius](circleshape.md#m_radius)
* [m_type](circleshape.md#m_type)
* [style](circleshape.md#style)
* [TYPE](circleshape.md#static-type)

### Methods
Expand Down Expand Up @@ -83,6 +84,16 @@ ___

___

### style

**style**: *[Style](../interfaces/style.md)*

*Inherited from [Shape](shape.md).[style](shape.md#style)*

Styling for dev-tools.

___

### `Static` TYPE

**TYPE**: *"circle"* = 'circle' as const
Expand Down
15 changes: 13 additions & 2 deletions docs/api/classes/distancejoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ distance from each other. You can view this as a massless, rigid rod.

### Properties

* [style](distancejoint.md#style)
* [TYPE](distancejoint.md#static-type)

### Methods
Expand Down Expand Up @@ -82,6 +83,16 @@ Name | Type | Description |

## Properties

### style

**style**: *[Style](../interfaces/style.md)*

*Inherited from [Joint](joint.md).[style](joint.md#style)*

Styling for dev-tools.

___

### `Static` TYPE

**TYPE**: *"distance-joint"* = 'distance-joint' as const
Expand Down Expand Up @@ -357,7 +368,7 @@ ___

### shiftOrigin

**shiftOrigin**(`newOrigin`: Vec2): *void*
**shiftOrigin**(`newOrigin`: [Vec2Value](../interfaces/vec2value.md)): *void*

*Inherited from [Joint](joint.md).[shiftOrigin](joint.md#shiftorigin)*

Expand All @@ -367,7 +378,7 @@ Shift the origin for any points stored in world coordinates.

Name | Type |
------ | ------ |
`newOrigin` | Vec2 |
`newOrigin` | [Vec2Value](../interfaces/vec2value.md) |

**Returns:** *void*

Expand Down
11 changes: 11 additions & 0 deletions docs/api/classes/edgeshape.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ contact normals.
* [m_vertex1](edgeshape.md#m_vertex1)
* [m_vertex2](edgeshape.md#m_vertex2)
* [m_vertex3](edgeshape.md#m_vertex3)
* [style](edgeshape.md#style)
* [TYPE](edgeshape.md#static-type)

### Methods
Expand Down Expand Up @@ -116,6 +117,16 @@ ___

___

### style

**style**: *[Style](../interfaces/style.md)*

*Inherited from [Shape](shape.md).[style](shape.md#style)*

Styling for dev-tools.

___

### `Static` TYPE

**TYPE**: *"edge"* = 'edge' as const
Expand Down
12 changes: 12 additions & 0 deletions docs/api/classes/fixture.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ To create a new Fixture use [Body.createFixture](body.md#createfixture).

## Index

### Properties

* [style](fixture.md#style)

### Methods

* [createProxies](fixture.md#createproxies)
Expand Down Expand Up @@ -47,6 +51,14 @@ To create a new Fixture use [Body.createFixture](body.md#createfixture).
* [synchronize](fixture.md#synchronize)
* [testPoint](fixture.md#testpoint)

## Properties

### style

**style**: *[Style](../interfaces/style.md)*

Styling for dev-tools.

## Methods

### createProxies
Expand Down
Loading

0 comments on commit 1ea2ddd

Please sign in to comment.