2020-07-28 20:21:55 -07:00
|
|
|
|
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [BoxShape](boxshape.md)
|
|
|
|
|
|
|
|
|
|
|
|
# Class: BoxShape
|
|
|
|
|
|
|
|
|
|
|
|
## Hierarchy
|
|
|
|
|
|
|
|
|
|
|
|
* any
|
|
|
|
|
|
|
|
|
|
|
|
↳ **BoxShape**
|
|
|
|
|
|
|
|
|
|
|
|
## Callable
|
|
|
|
|
|
|
|
|
|
|
|
▸ **BoxShape**(`hx`: number, `hy`: number, `center?`: [Vec2](vec2.md), `angle?`: number): *[BoxShape](boxshape.md)*
|
|
|
|
|
|
|
2020-08-03 20:19:01 -07:00
|
|
|
|
*Defined in [shape/index.d.ts:78](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L78)*
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
|
|
|
|
|
**Parameters:**
|
|
|
|
|
|
|
|
|
|
|
|
Name | Type |
|
|
|
|
|
|
------ | ------ |
|
|
|
|
|
|
`hx` | number |
|
|
|
|
|
|
`hy` | number |
|
|
|
|
|
|
`center?` | [Vec2](vec2.md) |
|
|
|
|
|
|
`angle?` | number |
|
|
|
|
|
|
|
|
|
|
|
|
**Returns:** *[BoxShape](boxshape.md)*
|
|
|
|
|
|
|
|
|
|
|
|
## Index
|
|
|
|
|
|
|
|
|
|
|
|
### Constructors
|
|
|
|
|
|
|
|
|
|
|
|
* [constructor](boxshape.md#constructor)
|
|
|
|
|
|
|
|
|
|
|
|
## Constructors
|
|
|
|
|
|
|
|
|
|
|
|
### constructor
|
|
|
|
|
|
|
|
|
|
|
|
\+ **new BoxShape**(`hx`: number, `hy`: number, `center?`: [Vec2](vec2.md), `angle?`: number): *[BoxShape](boxshape.md)*
|
|
|
|
|
|
|
2020-08-03 20:19:01 -07:00
|
|
|
|
*Defined in [shape/index.d.ts:79](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L79)*
|
2020-07-28 20:21:55 -07:00
|
|
|
|
|
|
|
|
|
|
**Parameters:**
|
|
|
|
|
|
|
|
|
|
|
|
Name | Type |
|
|
|
|
|
|
------ | ------ |
|
|
|
|
|
|
`hx` | number |
|
|
|
|
|
|
`hy` | number |
|
|
|
|
|
|
`center?` | [Vec2](vec2.md) |
|
|
|
|
|
|
`angle?` | number |
|
|
|
|
|
|
|
|
|
|
|
|
**Returns:** *[BoxShape](boxshape.md)*
|