Class: ITexture

Grape2D. ITexture

new ITexture()

Describes a texture.
Source:

Methods

getHalfHeight() → {number}

Gets the half height.
Source:
Returns:
Half height.
Type
number

getHalfWidth() → {number}

Gets the half width.
Source:
Returns:
Half width
Type
number

getHeight() → {number}

Gets height.
Source:
Returns:
Height.
Type
number

getWidth() → {number}

Gets the width.
Source:
Returns:
Width
Type
number

render(renderer, position)

Renderers the texture to a renderer, based upon a camera.
Parameters:
Name Type Description
renderer Grape2D.Renderer Renderer to render the texture.
position Grape2D.Vector Position to render the texture in the renderer.
Source:

setHeight(height)

Sets the height.
Parameters:
Name Type Description
height number New height.
Source:

setWidth(width)

Sets the width.
Parameters:
Name Type Description
width number New width.
Source: