Class: TextureRenderable

TextureRenderable

new TextureRenderable(myTexture) → {TextureRenderable}

Constructor of TextureRenderable object.
Parameters:
Name Type Description
myTexture Texture Texture to be associated by object.
Source:
Returns:
- Instance of TextureRenderable object.
Type
TextureRenderable

Methods

draw(aCamera) → {void}

Draws the TextureRenderable to the screen in the aCamera viewport.
Parameters:
Name Type Description
aCamera Camera drawing Camera of the TextureRenderable.
Source:
Returns:
Type
void

getTexture() → {Texture}

Returns a refrence to Texture
Source:
Returns:
- Refrence to Texture.
Type
Texture

setColorArray() → {void}

Get the color array from the GPU and set it to the renderables Color Array
Source:
Returns:
Type
void

setTexture(newTexture) → {void}

Set Renderable Texture.
Parameters:
Name Type Description
newTexture Texture Texture to set to TextureRenderable.
Source:
Returns:
Type
void

TextureRenderable

new TextureRenderable(other, wcTouchPos) → {Boolean}

Implements the pixelTouches() and related supporting functions of TextureRenderable
Parameters:
Name Type Description
other TextureRenderable to check for collision with
wcTouchPos vec2 world coordinate position of first collision
Source:
Returns:
true if collision is detected
Type
Boolean

Methods

draw(aCamera) → {void}

Draws the TextureRenderable to the screen in the aCamera viewport.
Parameters:
Name Type Description
aCamera Camera drawing Camera of the TextureRenderable.
Source:
Returns:
Type
void

getTexture() → {Texture}

Returns a refrence to Texture
Source:
Returns:
- Refrence to Texture.
Type
Texture

setColorArray() → {void}

Get the color array from the GPU and set it to the renderables Color Array
Source:
Returns:
Type
void

setTexture(newTexture) → {void}

Set Renderable Texture.
Parameters:
Name Type Description
newTexture Texture Texture to set to TextureRenderable.
Source:
Returns:
Type
void