Clear a rectangle on the current graphics context. Resets pixels completely.
The x coordinate of the rectangle to clear
The y coordinate of the rectangle to clear
The width of the rectangle to clear
The height of the rectangle to clear
Draw an image to the graphics context
The image to be drawn
The x coordinate to draw at
The y coordinate to draw at
Optional
width: numberThe width of the image to draw
Optional
height: numberThe height of the image to draw
Optional
col: stringThe color to tint the image - in CSS format
Draw an offscreen context to the current context
The offscreen context to draw
The x coordinate to draw at
The y coordinate to draw at
Draw a section of an offscreen context to the current context
The offscreen context to draw
The x coordinate to draw at
The y coordinate to draw at
The x coordinate in the offscreen canvas to start drawing from
The y coordinate in the offscreen canvas to start drawing from
The width of the section to draw
The height of the section to draw
Draw the outline of a rectangle to the graphics context
The x coordinate to draw at
The y coordinate to draw at
The width of the rectangle to draw
The height of the rectangle to draw
The color to draw the rectangle in - in CSS format
Draw a tile to the graphics context
The tile set containing the tile to draw
The x coordinate to draw at
The y coordinate to draw at
The index of the tile to render
The width to render the tile at in pixels
The height to render the tile at in pixels
Optional
col: stringConfigure the graphics context to render to the offscreen canvas provided
The offscreen canvas that this context should render to
Draw a rectangle to the graphics context
The x coordinate to draw at
The y coordinate to draw at
The width of the rectangle to draw
The height of the rectangle to draw
The color to fill the rectangle in - in CSS format
Initialize the renderer
The canvas that will be rendered to
True if images will be scaled with nearest neighbor rather than attempting to smooth
Optional
textureSize: numberA hint to the max texture size to use. This is useful when you want to reduce the graphics memory requirements.
Optional
texturePaddingSize: numberA hint to help with texture artifacts. Add some padding around textures.
The created renderer
Load an image from a given URL
The URL to the image to be loaded
True if we want to track the resource loading and report it
Optional
id: stringThe ID to give the new image
Optional
smooth: booleanTrue if we want to override pixel based scaling and attempt to render scaled versions smoothly
The loaded tile image
Load an tile set from a given URL
The URL of the image to load
The width of each tile in the image
The height of each tile int he image
Optional
id: stringThe ID to give the loaded image
The loaded tile set
Generated using TypeDoc
The description of an implementation that can provide rendering for the graphics context