Skip to main content

Class: Box

Extends

  • BaseType<{ height: number; width: number; x: number; y: number; }>

Constructors

new Box()

new Box(raw: {
height: number;
width: number;
x: number;
y: number;
}): Box

Parameters

ParameterType

raw

object

raw.height

number

raw.width

number

raw.x

number

raw.y

number

Returns

Box

Inherited from

BaseType<{ height: number; width: number; x: number; y: number; }>.constructor

Properties

raw

readonly raw: {
height: number;
width: number;
x: number;
y: number;
};

height

height: number;

width

width: number;

x

x: number;

y

y: number;

Inherited from

BaseType.raw

Accessors

centerX

get centerX(): number

Returns

number


centerY

get centerY(): number

Returns

number


height

get height(): number

Returns

number


width

get width(): number

Returns

number


x

get x(): number

Returns

number


y

get y(): number

Returns

number

Methods

toJSON()

toJSON(): {
height: number;
width: number;
x: number;
y: number;
}

Returns

{
height: number;
width: number;
x: number;
y: number;
}
NameType
heightnumber
widthnumber
xnumber
ynumber

Inherited from

BaseType.toJSON