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