* 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)
| 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 |
no test coverage detected
searching dependent graphs…