game-prototyper
v1.1.0
Published
Small library for prototyping games (can only create canvas objects with squares for now)
Downloads
3
Readme
game-prototyper
Little library which allows me to create canvas game prototypes (squares, circles, texts, all of that ;))
Right now it only supports drawing squares, I will be probably extending that when I need new functionalities.
Installation
npm install game-prototyper
To use library in your project, you have to include gamegine.js in your html file
<script src="node_modules/game-prototyper/prototyper2d.min.js"></script>
API
defaultDrawConfigRect
- a set of default values for drawing rectangle (config)defaultDrawConfigCircle
- a set of default values for drawing circle (config)drawRect
- draws rectangle on provided 2d context with provided configgenerateCanvas
- generates canvas with provided width and heightgenerateRectCanvas
- generates canvas with drawn rectanglegenerateCircleCanvas
- generates canvas with drawn circle
For function parameters and default parameters, browse source code
From the author
If you have any suggestions for the library, write me an email ([email protected]) or open new issue on github!