kimi
Define states with values and kimi will drive between the states
Usage
Example
var kimi = ;var driver = ; // define some places for the driver// // Parameters:// first param is the name of the place/state// second param is the value of that state/placedriver;driver;driver;driver; // define a map for the driver to drive along// fromTo defines the direction you can drive from states and how to drive// // Parameters:// first param is the start location// second param is the end location// third param is the distance in seconds between locations// fourth param will be a function which will be used to interpolate valuesdriver;driver;driver;driver; // set the initial state for the driverdriver; // calling the go function will change from the current state to the next// you can call it at any point to change where you're going// the driver always respects the mapdriver; // the following will show how `set` workswindow; // value comes from the interpolate function and time is the current time (in seconds)// here you might do such things as update the look { console; console; console; console;} // onState will be called when we arrive at a different place { console;} // animator function should return the value at the specific percentage { var rVal = ; start; return rVal;}
License
MIT, see LICENSE.md for details.