Documentation / @ripl/core / Box
Class: Box ​
Defined in: packages/core/src/math/structs.ts:2
An axis-aligned bounding box defined by its four edges.
Constructors ​
Constructor ​
new Box(
top,left,bottom,right):Box
Defined in: packages/core/src/math/structs.ts:4
Parameters ​
| Parameter | Type |
|---|---|
top | number |
left | number |
bottom | number |
right | number |
Returns ​
Box
Properties ​
Accessors ​
height ​
Get Signature ​
get height():
number
Defined in: packages/core/src/math/structs.ts:22
The vertical span of the box.
Returns ​
number
width ​
Get Signature ​
get width():
number
Defined in: packages/core/src/math/structs.ts:17
The horizontal span of the box.
Returns ​
number
Methods ​
empty() ​
staticempty():Box
Defined in: packages/core/src/math/structs.ts:12
Creates a zero-sized box at the origin.
Returns ​
Box