Function Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
C
 clear, Viewport
 clone, Tile
 copy, Tile
E
 Engine, Engine
G
 get, Viewport
 getBackgroundHex, Tile
 getBackgroundJSON, Tile
 getBackgroundRGB, Tile
 getChar, Tile
 getColorHex, Tile
 getColorJSON, Tile
 getColorRGB, Tile
 getRendererString, Viewport
I
 initInput, ut
 isKeyPressed, ut
P
 put, Viewport
 putString, Viewport
R
 render, Viewport
 resetBackground, Tile
 resetColor, Tile
S
 setBackground, Tile
 setCacheEnabled, Engine
 setChar, Tile
 setColor, Tile
 setGrey, Tile
 setKeyRepeatInterval, ut
 setMaskFunc, Engine
 setRenderer, Viewport
 setShaderFunc, Engine
 setTileFunc, Engine
 setWorldSize, Engine
T
 Tile, Tile
U
 unsafePut, Viewport
 update, Engine
 updateStyle, Viewport
V
 Viewport, Viewport
ut.Viewport.prototype.clear = function()
Clears the viewport buffer by assigning empty tiles.
ut.Tile.prototype.clone = function()
Returns a new copy of this tile.
ut.Tile.prototype.copy = function(other)
Makes this tile identical to the one supplied.
ut.Engine = function(vp,
func,
w,
h)
Constructs a new Engine object.
ut.Viewport.prototype.get = function(x,
y)
Returns the tile in the given coordinates.
ut.Tile.prototype.getBackgroundHex = function()
Returns the hexadecimal representation of the background color
ut.Tile.prototype.getBackgroundJSON = function()
Returns the JSON representation of the background color, i.e.
ut.Tile.prototype.getBackgroundRGB = function()
Returns the CSS rgb(r,g,b) representation of the background color
ut.Tile.prototype.getChar = function()
Returns the character of this tile.
ut.Tile.prototype.getColorHex = function()
Returns the hexadecimal representation of the color
ut.Tile.prototype.getColorJSON = function()
Returns the JSON representation of the color, i.e.
ut.Tile.prototype.getColorRGB = function()
Returns the CSS rgb(r,g,b) representation of the color
ut.Viewport.prototype.getRendererString = function()
Gets the currently used renderer.
ut.initInput = function(onKeyDown,
onKeyUp)
Initilizes input by assigning default key handlers and optional user’s handlers.
ut.isKeyPressed = function(key)
Checks if given key is pressed down.
ut.Viewport.prototype.put = function(tile,
x,
y)
Puts a tile to the given coordinates.
ut.Viewport.prototype.putString = function(str,
x,
y,
r,
g,
b,
br,
bg,
bb)
Creates a row of tiles with the chars of the given string.
ut.Viewport.prototype.render = function()
Renders the buffer as html to the element specified at construction.
ut.Tile.prototype.resetBackground = function()
Clears the background color of this tile.
ut.Tile.prototype.resetColor = function()
Clears the color of this tile / assigns default color.
ut.Tile.prototype.setBackground = function(r,
g,
b)
Sets the background color of this tile.
ut.Engine.prototype.setCacheEnabled = function(mode)
Enables or disables the usage of tile cache.
ut.Tile.prototype.setChar = function(ch)
Sets the character of this tile.
ut.Tile.prototype.setColor = function(r,
g,
b)
Sets the foreground color of this tile.
ut.Tile.prototype.setGrey = function(grey)
Sets the foreground color to the given shade (0-255) of grey.
ut.setKeyRepeatInterval = function(milliseconds)
Sets the interval when user’s onKeyDown handler is called when a key is held down.
ut.Engine.prototype.setMaskFunc = function(func)
Sets the function to be called to fetch mask information according to coordinates.
this.setRenderer = function(newrenderer)
Switch renderer at runtime.
ut.Engine.prototype.setShaderFunc = function(func)
Sets the function to be called to post-process / shade each visible tile.
ut.Engine.prototype.setTileFunc = function(func,
effect,
duration)
Sets the function to be called with coordinates to fetch each tile.
ut.Engine.prototype.setWorldSize = function(width,
height)
Tiles outside of the range x = [0,width[; y = [0,height[ are not fetched.
ut.Tile = function(ch,
r,
g,
b,
br,
bg,
bb)
Constructs a new Tile object.
ut.Viewport.prototype.unsafePut = function(tile,
x,
y)
Puts a tile to the given coordinates.
ut.Engine.prototype.update = function(x,
y)
Updates the viewport according to the given player coordinates.
this.updateStyle = function(updateRenderer)
If the style of the parent element is modified, this needs to be called.
ut.Viewport = function(elem,
w,
h,
renderer,
squarify)
Constructs a new Viewport object.
Close