API Documentation

for 0.0.1
Show:

Rect Class

Rect hold a simple rectangle representation with x & y coordinates and width & height.

Constructor

Rect

(
  • x
  • y
  • width
  • height
)

Parameters:

  • x Float
  • y Float
  • width Float
  • height Float

Item Index

Methods

Methods

fromArray

(
  • array
)

Sets the rect's value based on an array formatted like [x, y, width, height]

Parameters:

  • array Array

    [x, y, width, height]

toArray

() Array

Return an array representation

Returns:

Array:

[x, y, width, height]