planck-js
Version:
2D JavaScript physics engine for cross-platform HTML5 game development
97 lines (54 loc) • 1.92 kB
Markdown
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [EdgeShape](edgeshape.md)
# Class: EdgeShape
## Hierarchy
* any
↳ **EdgeShape**
## Callable
▸ **EdgeShape**(`v1`: [Vec2](vec2.md), `v2`: [Vec2](vec2.md)): *[EdgeShape](edgeshape.md)*
*Defined in [shape/index.d.ts:39](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L39)*
**Parameters:**
Name | Type |
------ | ------ |
`v1` | [Vec2](vec2.md) |
`v2` | [Vec2](vec2.md) |
**Returns:** *[EdgeShape](edgeshape.md)*
## Index
### Constructors
* [constructor](edgeshape.md#constructor)
### Properties
* [TYPE](edgeshape.md#static-type)
### Methods
* [setNext](edgeshape.md#setnext)
* [setPrev](edgeshape.md#setprev)
## Constructors
### constructor
\+ **new EdgeShape**(`v1`: [Vec2](vec2.md), `v2`: [Vec2](vec2.md)): *[EdgeShape](edgeshape.md)*
*Defined in [shape/index.d.ts:41](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L41)*
**Parameters:**
Name | Type |
------ | ------ |
`v1` | [Vec2](vec2.md) |
`v2` | [Vec2](vec2.md) |
**Returns:** *[EdgeShape](edgeshape.md)*
## Properties
### `Static` TYPE
▪ **TYPE**: *"edge"*
*Defined in [shape/index.d.ts:41](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L41)*
## Methods
### setNext
▸ **setNext**(`v3?`: [Vec2](vec2.md)): *[EdgeShape](edgeshape.md)*
*Defined in [shape/index.d.ts:53](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L53)*
**Parameters:**
Name | Type |
------ | ------ |
`v3?` | [Vec2](vec2.md) |
**Returns:** *[EdgeShape](edgeshape.md)*
___
### setPrev
▸ **setPrev**(`v0?`: [Vec2](vec2.md)): *[EdgeShape](edgeshape.md)*
*Defined in [shape/index.d.ts:54](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L54)*
**Parameters:**
Name | Type |
------ | ------ |
`v0?` | [Vec2](vec2.md) |
**Returns:** *[EdgeShape](edgeshape.md)*