🎮 Provide keyboard controls for burnout game engine.
- Map the
up
key for burnoutcontrol.up()
. - Map the
down
key for burnoutcontrol.down()
. - Map the
left
key for burnoutcontrol.left()
. - Map the
right
key for burnoutcontrol.right()
.
Tip: First, install and config burnout.js game engine.
$ yarn add burnout-keyboard-controls-plugin
Tip: Use Webpack (or similar module bundler) to manage the components.
import burnoutKeyboardControlsPlugin from 'burnout-keyboard-controls-plugin';
Tip: Use Browserify (or similar module bundler) to manage the components.
const burnoutKeyboardControlsPlugin = require('burnout-keyboard-controls-plugin');
// ...
burnout.defineControlsPlugin(burnoutKeyboardControlsPlugin);
// ...
Clone this repository and install its dependencies:
$ git clone https://github.com/burnoutjs/burnout-keyboard-controls-plugin.git
$ cd burnout-keyboard-controls-plugin
$ yarn
Builds the library to dist:
$ yarn build
Builds the library, then keeps rebuilding it whenever the source files change using rollup-watch:
$ yarn dev
Follow the JS Code Style Guide by Afonso Pacifer.
All code style are automatic validate with ESLint:
Run all unit tests:
$ yarn test
To keep better organization of releases we follow the Semantic Versioning 2.0.0 guidelines.
Want to contribute? Follow these recommendations.
See Releases for detailed changelog.