RenderableText
Extends:
RenderableText is a renderable component which renders a line of text from a collection of string data. The string data is loaded into the GPU using textures
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
|
|
public |
fontTexture: * |
|
public |
|
|
public |
shaderFontData: *[] |
|
public |
|
|
public |
textData: {"text": *, "textPixelArray": *, "textPixelWidth": *} |
Method Summary
Public Methods | ||
public |
|
|
public |
onPause() |
|
public |
|
|
public |
|
|
public |
setText(textString: *, fontScale: *) |
|
public |
setTextAlign(textAlign: *) |
|
public |
setUniformData(positionMatrix: *): boolean |
Inherited Summary
From class Updateable | ||
public |
deregister: * |
|
public |
|
|
public |
|
|
public |
id: * |
|
public |
Cleanup code for when destroying an Updateable. |
|
public |
end() Base call function for when this Updateable is to be ended. |
|
public |
onEnd() Called when the object is being removed or cleaned up from usage. |
|
public |
onPause() Called when the object is intended to be paused. |
|
public |
onStart() Called when the the object is first introduced. |
|
public |
Called when the object is to be unpaused from paused state. |
|
public |
onUpdate() Called on every update within the game, once the object has had onStart called. |
|
public |
pause() Base call function for when this Updateable is to be paused. |
|
public |
start() Base call function for when this Updateable is to be started. |
|
public |
unpause() Base call function for when this Updateable is to be unpaused. |
|
public |
update() Base call function for when this Updateable is to be updated. |
From class Component | ||
public |
|
|
public |
isUnique: * |
|
public |
Called when the component is successfully added to a GameObject. |
From class Renderable | ||
public |
color: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
program: * |
|
public |
|
|
public |
textures: *[] |
|
private |
|
|
private |
|
|
private |
|
|
private |
_matrixScale: * |
|
private |
|
|
public |
addToViewport(viewportID: number): * Adds this component to another viewport to be drawn. |
|
public |
getMatrix(): * Returns a joined matrix of position, scale, rotation and origin adjustment. |
|
public |
Called immediatly after the Render component is added to a game object. |
|
public |
onEnd() |
|
public |
Removes the renderable from all viewports. |
|
public |
|
|
public |
setColor(r: *, g: *, b: *, a: *) |
|
public |
setDepth(depth: *) |
|
public |
setOriginOffset(point: Point) Sets the origin offset matrix to the new position point assigned. |
|
public |
setPosition(point: Point) Sets the position matrix to the new position point assigned. |
|
public |
setRotation(rotation: number) Sets the rotation matrix to the new rotation value assigned. |
|
public |
Sets the scale matrix to the new scale point assigned. |
|
public |
setSubIndex(spriteIndex: *) |
|
public |
setTexture(textureObject: *) |
|
public |
setUniformData(positionMatrix: *): boolean |
From class Renderable2DMultitex | ||
public |
|
|
public |
textures: *[] |
|
public |
addTexture(textureObject: textureJSONObject) Adds a texture to this renderable. |
|
public |
removeTexture(textureIndex: number) Removes the nth texture from this component. |
|
public |
Removes all textures from this renderable. |
Public Constructors
public constructor() source
Constructor for the Renderable component. Allows defaults to be assigned without having to call setter functions later.
Override:
Renderable2DMultitex#constructorPublic Members
public fontTexture: * source
public renderableTextID: * source
public shaderFontData: *[] source
public textData: {"text": *, "textPixelArray": *, "textPixelWidth": *} source
Public Methods
public buildShaderTileData() source
public onPause() source
Called when the object is intended to be paused.
Override:
Updateable#onPausepublic onUnpause() source
Called when the object is to be unpaused from paused state.
Override:
Updateable#onUnpausepublic setGridData() source
public setText(textString: *, fontScale: *) source
Params:
Name | Type | Attribute | Description |
textString | * | ||
fontScale | * |
public setTextAlign(textAlign: *) source
Params:
Name | Type | Attribute | Description |
textAlign | * |
public setUniformData(positionMatrix: *): boolean source
Override:
Renderable#setUniformDataParams:
Name | Type | Attribute | Description |
positionMatrix | * |