Releases: burnoutjs/burnoutjs
Releases · burnoutjs/burnoutjs
Plugins support
Remove all logic for keyboard control 😱
Add support for control plugins 😎
Example:
Install a plugin for manage controls:
$ yarn add burnout-keyboard-controls-plugin
Import the plugin:
import keyboardControlsPlugin from 'burnout-keyboard-controls-plugin';
Use:
burnout.defineControlsPlugin(keyboardControlsPlugin);
Static option
burnout.defineAvatar({
className: 'avatar--up',
side: {
up: 'avatar--up',
down: 'avatar--down',
left: 'avatar--left',
right: 'avatar--right',
},
position: {
rowStart: 7,
columnStart: 7,
rowEnd: 8,
columnEnd: 8,
},
static: true, // New for controls the static position in map
});
Collision callbacks, avatar positions and DOM references access.
0.2.0-alpha
New Features
Set different styles for all avatar positions:
burnout.defineAvatar({
className: 'player',
side: { // New Object
up: 'player--up', // Up class
down: 'player--down', // Down class
left: 'player--left', // Left class
right: 'player--right', // Right class
},
position: {
rowStart: 7,
columnStart: 7,
rowEnd: 8,
columnEnd: 8,
}
});
Callback for collision moment:
burnout.defineBlock({
className: 'wall',
collision: true,
position: {
rowStart: 20,
columnStart: 20,
rowEnd: 21,
columnEnd: 21,
action: (blockPosition) => { // Callback for collision moment
console.log(blockPosition);
},
}
});
New over moment and callback:
burnout.defineBlock({
className: 'grass',
over: true, // New option for track the over in a block
position: {
rowStart: 20,
columnStart: 20,
rowEnd: 21,
columnEnd: 21,
action: (blockPosition) => { // Callback for over moment
console.log(blockPosition);
},
}
});
New methods for get DOM references:
burnout.getMap();
burnout.getView();
burnout.getAvatar();
burnout.getBlock({
rowStart: 10,
columnStart: 10,
rowEnd: 11,
columnEnd: 11,
});
First Alpha
- Grid based map (Powered by Grid Layout API).
- Create and position blocks in the map (Following the Grid Layout API).
- Create an avatar for playing the game.
- Register blocks for collisions with avatar.
- Set keyboard commands for control the avatar into the map.
- Developer mode for easily style the map.