- No Dependency
- Just install and deploy
1- Clone repository
git clone https://github.com/cotts/run-speedster.js.git
2- Import Code to your HTML :
Ex:
<script src="../dist/run-speedster.min.js"></script>
3- Create Element
RunSpeedster.init(
// required - element that the character will be placed and run inside
'.race-path', //you can change the class for any other one
//required - the text or DOM element that will become after the run
'.run-text', //you can change the class for any other one
{
//Choosing your character: 4 options available
'runner': 'standard', //default
//Size of the runner
'howBig' : 50 //default (Size in px: width and heigth)
//the speed of the element (60fps)
'speed': 60, //default
//if it will be disappear in the end of the run or not
'disappear': true //default : false
}
)
Standard - use 'standard'
Modern (The CW The Flash) - use 'modern'
Kid Flash - use 'kidflash'
Zoom - use 'zoom'
- Increase the performance of the module
- JS Functional Pattern
- Correct some metrics of the Math inside the code.
- Create UNIT Tests