Constructor
new Renderable() → {Renderable}
- Source:
Returns:
a new instance of Renderable
- Type
- Renderable
Methods
_setShader(s)
Sets the Renderable's Shader
Parameters:
| Name | Type | Description |
|---|---|---|
s |
Shader | Shader to set for the Renderable |
- Source:
draw(Camera)
Draws the Renderable to the screen in the Camera viewport
Parameters:
| Name | Type | Description |
|---|---|---|
Camera |
Camera | object to draw to |
- Source:
getColor() → {Array.<float>}
Returns the color of this Renderable
- Source:
Returns:
mColor - the current color array of this Renderable
- Type
- Array.<float>
getXform() → {Transform}
Returns the Transform object of this Renderable
- Source:
Returns:
- the Transform object of this Renderable
- Type
- Transform
setColor(color)
Sets the constant color of this Renderable
Parameters:
| Name | Type | Description |
|---|---|---|
color |
Array.<float> | the new color formatted as RGBA |
- Source:
swapShader(s) → {Shader}
Sets the shader this Renderable uses and returns the previous shader
Parameters:
| Name | Type | Description |
|---|---|---|
s |
Shader | the new shader for this Renderable to use |
- Source:
Returns:
out - the previous shader
- Type
- Shader
update()
Update method called on Gameloop
- Source: