MCPcopy
hub / github.com/julianshapiro/velocity / registerEasing

Function registerEasing

velocity.js:269–281  ·  view source on GitHub ↗

* Used to register a easing. This should never be called by users * directly, instead it should be called via an action: * Velocity("registerEasing", "name", VelocityEasingFn);

(args)

Source from the content-addressed store, hash-verified

267 * <code>Velocity("registerEasing", "name", VelocityEasingFn);</code>
268 */
269 function registerEasing(args) {
270 var name = args[0],
271 callback = args[1];
272 if (!isString(name)) {
273 console.warn("VelocityJS: Trying to set 'registerEasing' name to an invalid value:", name);
274 } else if (!isFunction(callback)) {
275 console.warn("VelocityJS: Trying to set 'registerEasing' callback to an invalid value:", name, callback);
276 } else if (Easings[name]) {
277 console.warn("VelocityJS: Trying to override 'registerEasing' callback", name);
278 } else {
279 Easings[name] = callback;
280 }
281 }
282 registerAction(["registerEasing", registerEasing], true);
283 /**
284 * Linear easing, used for sequence parts that don't have an actual easing

Callers 7

velocity.jsFile · 0.70
registerBackInFunction · 0.70
registerBackOutFunction · 0.70
registerBackInOutFunction · 0.70
registerElasticInFunction · 0.70
registerElasticOutFunction · 0.70
registerElasticInOutFunction · 0.70

Calls 2

isStringFunction · 0.70
isFunctionFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…