import Renderer from 'WTF-Adventure/WTF-Adventure/client/renderer/renderer.js'
Renderer
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
|
|
public |
animatedTiles: *[] |
|
public |
|
|
public |
backContext: * |
|
public |
|
|
public |
|
|
public |
camera: * |
|
public |
|
|
public |
context: * |
|
public |
|
|
public |
cursorCanvas: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
drawingScale: * |
|
public |
entities: * |
|
public |
|
|
public |
firefox: * |
|
public |
|
|
public |
|
|
public |
foreContext: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
game: * |
|
public |
input: * |
|
public |
lastTarget: number[] |
|
public |
map: * |
|
public |
mobile: * |
|
public |
realFPS: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
shadowSprite: * |
|
public |
sparksSprite: * |
|
public |
|
|
public |
tablet: * |
|
public |
targetRect: * |
|
public |
textCanvas: * |
|
public |
textContext: * |
|
public |
|
|
public |
tileset: * |
|
public |
time: * |
Method Summary
Public Methods | ||
public |
adjustBrightness(level: *) |
|
public |
|
|
public |
checkDirty(rectOne: *, source: *, x: *, y: *) |
|
public |
clearAll() |
|
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 |
drawFPS() |
|
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 |
getDrawingScale(): * |
|
public |
getEntityBounds(entity: *): * |
|
public |
getScale(): * |
|
public |
getTargetBounds(x: *, y: *): * |
|
public |
getTileBounds(tile: *): * Getters |
|
public |
getTileset(): * |
|
public |
getUpscale(): * |
|
public |
hasRenderedFrame(): * |
|
public |
isPortableDevice(): * |
|
public |
isVisiblePosition(x: *, y: *): * |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
render() |
|
public |
resize() |
|
public |
restore() |
|
public |
|
|
public |
saveAll() |
|
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 animatedTiles: *[] source
public backContext: * source
public backgroundCanvas: * source
public camera: * source
public context: * source
public cursorCanvas: * source
public cursorContext: * source
public drawingScale: * source
public entities: * source
public entitiesCanvas: * source
public firefox: * source
public foreContext: * source
public foregroundCanvas: * source
public game: * source
public input: * source
public map: * source
public mobile: * source
public realFPS: * source
public resizeTimeout: * source
public shadowSprite: * source
public sparksSprite: * source
public tablet: * source
public targetRect: * source
public textCanvas: * source
public textContext: * source
public tileset: * source
public time: * source
Public Methods
public adjustBrightness(level: *) source
Params:
Name | Type | Attribute | Description |
level | * |
public checkDevice() source
public checkDirty(rectOne: *, source: *, x: *, y: *) source
Params:
Name | Type | Attribute | Description |
rectOne | * | ||
source | * | ||
x | * | ||
y | * |
public clearAll() source
public clearContext() source
public clearDrawing() source
public clearScreen(context: *) source
Params:
Name | Type | Attribute | Description |
context | * |
public clearText() source
public clearTile(context: *, gridWidth: *, cellId: *) source
Params:
Name | Type | Attribute | Description |
context | * | ||
gridWidth | * | ||
cellId | * |
public drawAnimatedTiles() source
public drawCellHighlight(x: *, y: *, colour: *) source
Params:
Name | Type | Attribute | Description |
x | * | ||
y | * | ||
colour | * |
public drawCellRect(x: *, y: *, colour: *) source
Params:
Name | Type | Attribute | Description |
x | * | ||
y | * | ||
colour | * |
public drawCursor() source
public drawDebugging() source
public drawEntities() source
public drawEntity(entity: *) source
Params:
Name | Type | Attribute | Description |
entity | * |
public drawEntityBack(entity: *) source
Function used to draw special effects prior to rendering the entity.
Params:
Name | Type | Attribute | Description |
entity | * |
public drawEntityFore(entity: *) source
Params:
Name | Type | Attribute | Description |
entity | * |
public drawFPS() source
public drawHealth(entity: *) source
Params:
Name | Type | Attribute | Description |
entity | * |
public drawInfos() source
public drawName(entity: *) source
Params:
Name | Type | Attribute | Description |
entity | * |
public drawPathing() source
public drawPosition() source
public drawScaledImage(context: *, image: *, x: *, y: *, width: *, height: *, dx: *, dy: *) source
Params:
Name | Type | Attribute | Description |
context | * | ||
image | * | ||
x | * | ||
y | * | ||
width | * | ||
height | * | ||
dx | * | ||
dy | * |
public drawSelectedCell() source
public drawTargetCell() source
public drawText(text: *, x: *, y: *, centered: *, colour: *, strokeColour: *) source
Params:
Name | Type | Attribute | Description |
text | * | ||
x | * | ||
y | * | ||
centered | * | ||
colour | * | ||
strokeColour | * |
public drawTile(context: *, tileId: *, tileset: *, setWidth: *, gridWidth: *, cellId: *) source
Primitive drawing functions
Params:
Name | Type | Attribute | Description |
context | * | ||
tileId | * | ||
tileset | * | ||
setWidth | * | ||
gridWidth | * | ||
cellId | * |
public focus() source
public forEachAnimatedTile(callback: *) source
Params:
Name | Type | Attribute | Description |
callback | * |
public forEachCanvas(callback: *) source
Params:
Name | Type | Attribute | Description |
callback | * |
public forEachContext(callback: *) source
Miscellaneous functions
Params:
Name | Type | Attribute | Description |
callback | * |
public forEachDrawingContext(callback: *) source
Params:
Name | Type | Attribute | Description |
callback | * |
public forEachVisibleEntity(callback: *) source
Params:
Name | Type | Attribute | Description |
callback | * |
public forEachVisibleIndex(callback: *, offset: *) source
Primordial Rendering functions
Params:
Name | Type | Attribute | Description |
callback | * | ||
offset | * |
public forEachVisibleTile(callback: *, offset: *) source
Params:
Name | Type | Attribute | Description |
callback | * | ||
offset | * |
public getTileBounds(tile: *): * source
Getters
Params:
Name | Type | Attribute | Description |
tile | * |
Return:
* |
public isVisiblePosition(x: *, y: *): * source
Params:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
context | * |
public setEntities(entities: *) source
Params:
Name | Type | Attribute | Description |
entities | * |
public setInput(input: *) source
Params:
Name | Type | Attribute | Description |
input | * |
public setMap(map: *) source
Params:
Name | Type | Attribute | Description |
map | * |