Implement frame state and animation architecture
This commit is contained in:
14
src/ol/easing.js
Normal file
14
src/ol/easing.js
Normal file
@@ -0,0 +1,14 @@
|
||||
goog.provide('ol.easing');
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} t Input between 0 and 1.
|
||||
* @return {number} Output between 0 and 1.
|
||||
*/
|
||||
ol.easing.upAndDown = function(t) {
|
||||
if (t < 0.5) {
|
||||
return goog.fx.easing.inAndOut(2 * t);
|
||||
} else {
|
||||
return 1 - goog.fx.easing.inAndOut(2 * (t - 0.5));
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user