Skip to content

bloxparty/bloxparty-canvas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bloxparty-canvas

Canvas utilities for Blox Party

Install

npm install bloxparty-canvas

API

Canvas(element[, options])

Wrap a canvas element element with options and return the wrapper object

wrapper.drawShape(x, y, shape, color)

Draw a single shape at x, y on the wrapped canvas. shape is expected to be a Blox Party shape variant. color is a hex or rgb string.

wrapper.drawGrid(grid)

Draw a 2d Blox Party grid on the wrapper canvas.

wrapper.drawText(text)

Draw text on the wrapped canvas element.

License

MIT

About

Blox Party canvas utilities

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published