Class: FontRenderable

FontRenderable(aString) → {FontRenderable}

new FontRenderable(aString) → {FontRenderable}

Default Constructor.

Default Constructor creates an instance of FontRenderable.

Parameters:
Name Type Description
aString String text to display
Source:
Returns:
a new instance of FontRenderable.
Type
FontRenderable

Methods

draw(aCamera) → {void}

Draws the FontRenderable to the screen in the aCamera viewport.
Parameters:
Name Type Description
aCamera Camera Camera object to draw to.
Source:
Returns:
Type
void

getColor() → {Array.<float>}

Gets the Color of the FontRenderable.
Source:
Returns:
The color of the FontRenderable.
Type
Array.<float>

getFont() → {String}

Returns the FontRenderable's Font
Source:
Returns:
the Font of the FontRenderable.
Type
String

getSymbolSize() → {vec2}

Get the size of a symbol in the FontRenderable
Source:
Returns:
The size of one symbol
Type
vec2

getText() → {String}

Returns the text of the FontRenderable.
Source:
Returns:
text of the FontRenderable.
Type
String

getXform() → {Transform}

Returns the Renderable's Transform.
Source:
Returns:
the return of the Renderable.
Type
Transform

setColor(color) → {void}

Sets the Color of the FontRenderable.
Parameters:
Name Type Description
color Array.<float> The desired Color of the FontRenderable.
Source:
Returns:
Type
void

setFont(f) → {void}

Sets the Font of the FontRenderable.
Parameters:
Name Type Description
f Font font of the FontRenderable.
Source:
Returns:
Type
void

setText(t) → {void}

Set the text of the FontRenderable.
Parameters:
Name Type Description
t String text to set to the FontRenderable.
Source:
Returns:
Type
void

setTextHeight(h) → {void}

Set the Text Height of the FontRenderable.
Parameters:
Name Type Description
h float height of the Renderable.
Source:
Returns:
Type
void

update() → {void}

Update function called on Gameloop
Source:
Returns:
Type
void