Reference Source Test
public class | source

Renderer

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public
public
public
public
public

camera: *

public
public

context: *

public
public
public
public
public
public
public
public
public
public
public

firefox: *

public
public
public
public
public
public
public

game: *

public

input: *

public
public

map: *

public

mobile: *

public

realFPS: *

public
public
public
public
public
public
public
public
public
public

tablet: *

public
public
public
public
public

tileset: *

public

time: *

Method Summary

Public Methods
public

adjustBrightness(level: *)

public
public

checkDirty(rectOne: *, source: *, x: *, y: *)

public
public
public
public

clearScreen(context: *)

public
public

clearTile(context: *, gridWidth: *, cellId: *)

public

draw()

Context Drawing

public
public

drawCellHighlight(x: *, y: *, colour: *)

public

drawCellRect(x: *, y: *, colour: *)

public
public
public
public

drawEntity(entity: *)

public

drawEntityBack(entity: *)

Function used to draw special effects prior to rendering the entity.

public

drawEntityFore(entity: *)

public
public

drawHealth(entity: *)

public
public

drawName(entity: *)

public
public
public

drawScaledImage(context: *, image: *, x: *, y: *, width: *, height: *, dx: *, dy: *)

public
public
public

drawText(text: *, x: *, y: *, centered: *, colour: *, strokeColour: *)

public

drawTile(context: *, tileId: *, tileset: *, setWidth: *, gridWidth: *, cellId: *)

Primitive drawing functions

public

focus()

public

forEachAnimatedTile(callback: *)

public

forEachCanvas(callback: *)

public

forEachContext(callback: *)

Miscellaneous functions

public

forEachDrawingContext(callback: *)

public

forEachVisibleEntity(callback: *)

public

forEachVisibleIndex(callback: *, offset: *)

Primordial Rendering functions

public

forEachVisibleTile(callback: *, offset: *)

public
public

getEntityBounds(entity: *): *

public

getScale(): *

public

getTargetBounds(x: *, y: *): *

public

getTileBounds(tile: *): *

Getters

public

getTileset(): *

public

getUpscale(): *

public
public
public

isVisiblePosition(x: *, y: *): *

public
public
public
public
public

render()

public

resize()

public
public
public
public
public

setCameraView(context: *)

public

setEntities(entities: *)

public

setInput(input: *)

public

setMap(map: *)

public

setTileset(tileset: *)

Setters

public

stop()

public
public
public

Rendering Functions

public

Public Constructors

public constructor() source

Public Members

public animateTiles: boolean source

public animatedTiles: *[] source

public autoCentre: boolean source

public backContext: * source

public backgroundCanvas: * source

public brightness: number source

public camera: * source

public canvases: undefined[] source

public context: * source

public contexts: undefined[] source

public cursorCanvas: * source

public cursorContext: * source

public debugging: boolean source

public drawLevels: boolean source

public drawNames: boolean source

public drawTarget: boolean source

public drawingScale: * source

public entities: * source

public entitiesCanvas: * source

public firefox: * source

public fontSize: number source

public forceRendering: boolean source

public foreContext: * source

public foregroundCanvas: * source

public fps: number source

public frameCount: number source

public game: * source

public input: * source

public lastTarget: number[] source

public map: * source

public mobile: * source

public realFPS: * source

public renderedFrame: number[] source

public resizeTimeout: * source

public scale: number source

public screenHeight: number source

public screenWidth: number source

public selectedCellVisible: boolean source

public shadowSprite: * source

public sparksSprite: * source

public stopRendering: boolean source

public tablet: * source

public targetRect: * source

public textCanvas: * source

public textContext: * source

public tileSize: number source

public tileset: * source

public time: * source

Public Methods

public adjustBrightness(level: *) source

Params:

NameTypeAttributeDescription
level *

public checkDevice() source

public checkDirty(rectOne: *, source: *, x: *, y: *) source

Params:

NameTypeAttributeDescription
rectOne *
source *
x *
y *

public clearAll() source

public clearContext() source

public clearDrawing() source

public clearScreen(context: *) source

Params:

NameTypeAttributeDescription
context *

public clearText() source

public clearTile(context: *, gridWidth: *, cellId: *) source

Params:

NameTypeAttributeDescription
context *
gridWidth *
cellId *

public draw() source

Context Drawing

public drawAnimatedTiles() source

public drawCellHighlight(x: *, y: *, colour: *) source

Params:

NameTypeAttributeDescription
x *
y *
colour *

public drawCellRect(x: *, y: *, colour: *) source

Params:

NameTypeAttributeDescription
x *
y *
colour *

public drawCursor() source

public drawDebugging() source

public drawEntities() source

public drawEntity(entity: *) source

Params:

NameTypeAttributeDescription
entity *

public drawEntityBack(entity: *) source

Function used to draw special effects prior to rendering the entity.

Params:

NameTypeAttributeDescription
entity *

public drawEntityFore(entity: *) source

Params:

NameTypeAttributeDescription
entity *

public drawFPS() source

public drawHealth(entity: *) source

Params:

NameTypeAttributeDescription
entity *

public drawInfos() source

public drawName(entity: *) source

Params:

NameTypeAttributeDescription
entity *

public drawPathing() source

public drawPosition() source

public drawScaledImage(context: *, image: *, x: *, y: *, width: *, height: *, dx: *, dy: *) source

Params:

NameTypeAttributeDescription
context *
image *
x *
y *
width *
height *
dx *
dy *

public drawSelectedCell() source

public drawTargetCell() source

public drawText(text: *, x: *, y: *, centered: *, colour: *, strokeColour: *) source

Params:

NameTypeAttributeDescription
text *
x *
y *
centered *
colour *
strokeColour *

public drawTile(context: *, tileId: *, tileset: *, setWidth: *, gridWidth: *, cellId: *) source

Primitive drawing functions

Params:

NameTypeAttributeDescription
context *
tileId *
tileset *
setWidth *
gridWidth *
cellId *

public focus() source

public forEachAnimatedTile(callback: *) source

Params:

NameTypeAttributeDescription
callback *

public forEachCanvas(callback: *) source

Params:

NameTypeAttributeDescription
callback *

public forEachContext(callback: *) source

Miscellaneous functions

Params:

NameTypeAttributeDescription
callback *

public forEachDrawingContext(callback: *) source

Params:

NameTypeAttributeDescription
callback *

public forEachVisibleEntity(callback: *) source

Params:

NameTypeAttributeDescription
callback *

public forEachVisibleIndex(callback: *, offset: *) source

Primordial Rendering functions

Params:

NameTypeAttributeDescription
callback *
offset *

public forEachVisibleTile(callback: *, offset: *) source

Params:

NameTypeAttributeDescription
callback *
offset *

public getDrawingScale(): * source

Return:

*

public getEntityBounds(entity: *): * source

Params:

NameTypeAttributeDescription
entity *

Return:

*

public getScale(): * source

Return:

*

public getTargetBounds(x: *, y: *): * source

Params:

NameTypeAttributeDescription
x *
y *

Return:

*

public getTileBounds(tile: *): * source

Getters

Params:

NameTypeAttributeDescription
tile *

Return:

*

public getTileset(): * source

Return:

*

public getUpscale(): * source

Return:

*

public hasRenderedFrame(): * source

Return:

*

public isPortableDevice(): * source

Return:

*

public isVisiblePosition(x: *, y: *): * source

Params:

NameTypeAttributeDescription
x *
y *

Return:

*

public loadCamera() source

public loadRenderer() source

public loadSizes() source

public loadStaticSprites() source

public render() source

public resize() source

public restore() source

public restoreAll() source

public saveAll() source

public saveFrame() source

public setCameraView(context: *) source

Params:

NameTypeAttributeDescription
context *

public setEntities(entities: *) source

Params:

NameTypeAttributeDescription
entities *

public setInput(input: *) source

Params:

NameTypeAttributeDescription
input *

public setMap(map: *) source

Params:

NameTypeAttributeDescription
map *

public setTileset(tileset: *) source

Setters

Params:

NameTypeAttributeDescription
tileset *

public stop() source

public updateAnimatedTiles() source

public updateDrawingView() source

public updateView() source

Rendering Functions

public verifyCentration() source