Class: Rectangle

Graphics.Rectangle

A rectangular wire graphic

new Graphics.Rectangle (game, width, height, color)

Name Type Description
game Core.Game the game object.
width Number width of the rectangle.
height Number height of the rectangle.
color String color/style of 2d context.

Methods

getDimentions ()Utils.Vector2d

get width & height
Returns:
Type Description
Utils.Vector2d vector2d of (width, height)

render ()

renders the rectangle

setDimentions (w, h)

sets width & height
Name Type Description
w Number width to set
h Number height to set