verf
v0.2.5
Published
a modular and extendible html5 canvas 2d game framework
Downloads
3
Readme
Verf
a modular and extendible html5 canvas 2d game framework
Usage
npm i verf
import {VerfGame} from 'verf';
const game = new VerfGame(config);
See VerfGame class documentation on how to use the config.
Features
- A state machine with scenes
- A camera object
- An asset loader
- Unified touch and mouse controls
- Unified keyboard and gamepad controls
- A plugin system
- An api for playing back sound files with WebAudio and HTML5 audio fallback
- A simple physics engine
- Sprite animations
- Bitmapfonts and regular text
Built around the canvas 2d context
This framework is built for games that heavily make use of the canvas 2d context. Mixing the canvas 2d context and webgl is not always good for performance. That's why the decision was made to stick to the canvas 2d context and leverage that instead.
If you are looking for a 2d webgl framework, i recommend Phaser.
Small footprint
Depending on which modules and classes you import the impact on your codebase is 3 to 7 kilobytes when minified and zipped.
Examples
Check the examples to learn how to use things.
Documentation
All modules and classes are documented.
License
MIT