UNPKG

31.1 kBJavaScriptView Raw
1/**********************
2 Velocity UI Pack
3**********************/
4
5/* VelocityJS.org UI Pack (4.1.4). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License. Portions copyright Daniel Eden, Christian Pucci. */
6
7;(function (factory) {
8 /* CommonJS module. */
9 if (typeof module === "object" && typeof module.exports === "object") {
10 module.exports = factory();
11 /* AMD module. */
12 } else if (typeof define === "function" && define.amd) {
13 define([ "velocity" ], factory);
14 /* Browser globals. */
15 } else {
16 factory();
17 }
18}(function() {
19return function (global, window, document, undefined) {
20
21 /**************
22 Checks
23 **************/
24
25 if (!global.Velocity || !global.Velocity.Utilities) {
26 window.console && console.log("Velocity UI Pack: Velocity must be loaded first. Aborting.");
27 return;
28 } else if (!global.Velocity.version || (global.Velocity.version.major <= 0 && global.Velocity.version.minor <= 11 && global.Velocity.version.patch < 8)) {
29 var abortError = "Velocity UI Pack: You need to update Velocity (jquery.velocity.js) to a newer version. Visit http://github.com/julianshapiro/velocity.";
30
31 alert(abortError);
32 throw new Error(abortError);
33 }
34
35 /******************
36 Register UI
37 ******************/
38
39 global.Velocity.RegisterUI = function (effectName, properties) {
40 /* Animate the expansion/contraction of the elements' parent's height for In/Out effects. */
41 function animateParentHeight (elements, direction, totalDuration, stagger) {
42 var totalHeightDelta = 0,
43 parentNode;
44
45 /* Sum the total height (including padding and margin) of all targeted elements. */
46 global.Velocity.Utilities.each(elements.nodeType ? [ elements ] : elements, function(i, element) {
47 if (stagger) {
48 /* Increase the totalDuration by the successive delay amounts produced by the stagger option. */
49 totalDuration += i * stagger;
50 }
51
52 parentNode = element.parentNode;
53
54 global.Velocity.Utilities.each([ "height", "paddingTop", "paddingBottom", "marginTop", "marginBottom"], function(i, property) {
55 totalHeightDelta += parseFloat(global.Velocity.CSS.getPropertyValue(element, property));
56 });
57 });
58
59 /* Animate the parent element's height adjustment (with a varying duration multiplier for aesthetic benefits). */
60 global.Velocity.animate(
61 parentNode,
62 { height: (direction === "In" ? "+" : "-") + "=" + totalHeightDelta },
63 { queue: false, easing: "ease-in-out", duration: totalDuration * (direction === "In" ? 0.6 : 1) }
64 );
65 }
66
67 /* Register a custom sequence for each effect. */
68 global.Velocity.Sequences[effectName] = function (element, sequenceOptions, elementsIndex, elementsSize, elements, promiseData) {
69 var finalElement = (elementsIndex === elementsSize - 1);
70
71 /* Iterate through each effect's call array. */
72 for (var callIndex = 0; callIndex < properties.calls.length; callIndex++) {
73 var call = properties.calls[callIndex],
74 propertyMap = call[0],
75 sequenceDuration = (sequenceOptions.duration || properties.defaultDuration || 1000),
76 durationPercentage = call[1],
77 callOptions = call[2] || {},
78 opts = {};
79
80 /* Assign the whitelisted per-call options. */
81 opts.duration = sequenceDuration * (durationPercentage || 1);
82 opts.queue = sequenceOptions.queue || "";
83 opts.easing = callOptions.easing || "ease";
84 opts.delay = callOptions.delay || 0;
85 opts._cacheValues = callOptions._cacheValues || true;
86
87 /* Special processing for the first effect call. */
88 if (callIndex === 0) {
89 /* If a delay was passed into the sequence, combine it with the first call's delay. */
90 opts.delay += (sequenceOptions.delay || 0);
91
92 if (elementsIndex === 0) {
93 opts.begin = function() {
94 /* Only trigger a begin callback on the first effect call with the first element in the set. */
95 sequenceOptions.begin && sequenceOptions.begin.call(elements, elements);
96
97 /* Only trigger animateParentHeight() if we're using an In/Out transition. */
98 var direction = effectName.match(/(In|Out)$/);
99 if (sequenceOptions.animateParentHeight && direction) {
100 animateParentHeight(elements, direction[0], sequenceDuration + opts.delay, sequenceOptions.stagger);
101 }
102 }
103 }
104
105 /* If the user isn't overriding the display option, default to "auto" for "In"-suffixed transitions. */
106 if (sequenceOptions.display !== null) {
107 if (sequenceOptions.display !== undefined && sequenceOptions.display !== "none") {
108 opts.display = sequenceOptions.display;
109 } else if (/In$/.test(effectName)) {
110 /* Inline elements cannot be subjected to transforms, so we switch them to inline-block. */
111 var defaultDisplay = global.Velocity.CSS.Values.getDisplayType(element);
112 opts.display = (defaultDisplay === "inline") ? "inline-block" : defaultDisplay;
113 }
114 }
115
116 if (sequenceOptions.visibility && sequenceOptions.visibility !== "hidden") {
117 opts.visibility = sequenceOptions.visibility;
118 }
119 }
120
121 /* Special processing for the last effect call. */
122 if (callIndex === properties.calls.length - 1) {
123 /* Append promise resolving onto the user's sequence callback. */
124 function injectFinalCallbacks () {
125 if ((sequenceOptions.display === undefined || sequenceOptions.display === "none") && /Out$/.test(effectName)) {
126 global.Velocity.Utilities.each(elements.nodeType ? [ elements ] : elements, function(i, element) {
127 global.Velocity.CSS.setPropertyValue(element, "display", "none");
128 });
129 }
130
131 sequenceOptions.complete && sequenceOptions.complete.call(elements, elements);
132
133 if (promiseData) {
134 promiseData.resolver(elements || element);
135 }
136 }
137
138 opts.complete = function() {
139 if (properties.reset) {
140 for (var resetProperty in properties.reset) {
141 var resetValue = properties.reset[resetProperty];
142
143 /* Format each non-array value in the reset property map to [ value, value ] so that changes apply
144 immediately and DOM querying is avoided (via forcefeeding). */
145 if (typeof resetValue === "string" || typeof resetValue === "number") {
146 properties.reset[resetProperty] = [ properties.reset[resetProperty], properties.reset[resetProperty] ];
147 }
148 }
149
150 /* So that the reset values are applied instantly upon the next rAF tick, use a zero duration and parallel queueing. */
151 var resetOptions = { duration: 0, queue: false };
152
153 /* Since the reset option uses up the complete callback, we trigger the user's complete callback at the end of ours. */
154 if (finalElement) {
155 resetOptions.complete = injectFinalCallbacks;
156 }
157
158 global.Velocity.animate(element, properties.reset, resetOptions);
159 /* Only trigger the user's complete callback on the last effect call with the last element in the set. */
160 } else if (finalElement) {
161 injectFinalCallbacks();
162 }
163 };
164
165 if (sequenceOptions.visibility === "hidden") {
166 opts.visibility = sequenceOptions.visibility;
167 }
168 }
169
170 global.Velocity.animate(element, propertyMap, opts);
171 }
172 };
173
174 /* Return the Velocity object so that RegisterUI calls can be chained. */
175 return global.Velocity;
176 };
177
178 /*********************
179 Packaged Effects
180 *********************/
181
182 /* Externalize the packagedEffects data so that they can optionally be modified and re-registered. */
183 /* Support: <=IE8: Callouts will have no effect, and transitions will simply fade in/out. IE9/Android 2.3: Most effects are fully supported, the rest fade in/out. All other browsers: full support. */
184 global.Velocity.RegisterUI.packagedEffects =
185 {
186 /* Animate.css */
187 "callout.bounce": {
188 defaultDuration: 550,
189 calls: [
190 [ { translateY: -30 }, 0.25 ],
191 [ { translateY: 0 }, 0.125 ],
192 [ { translateY: -15 }, 0.125 ],
193 [ { translateY: 0 }, 0.25 ]
194 ]
195 },
196 /* Animate.css */
197 "callout.shake": {
198 defaultDuration: 800,
199 calls: [
200 [ { translateX: -11 }, 0.125 ],
201 [ { translateX: 11 }, 0.125 ],
202 [ { translateX: -11 }, 0.125 ],
203 [ { translateX: 11 }, 0.125 ],
204 [ { translateX: -11 }, 0.125 ],
205 [ { translateX: 11 }, 0.125 ],
206 [ { translateX: -11 }, 0.125 ],
207 [ { translateX: 0 }, 0.125 ]
208 ]
209 },
210 /* Animate.css */
211 "callout.flash": {
212 defaultDuration: 1100,
213 calls: [
214 [ { opacity: [ 0, "easeInOutQuad", 1 ] }, 0.25 ],
215 [ { opacity: [ 1, "easeInOutQuad" ] }, 0.25 ],
216 [ { opacity: [ 0, "easeInOutQuad" ] }, 0.25 ],
217 [ { opacity: [ 1, "easeInOutQuad" ] }, 0.25 ]
218 ]
219 },
220 /* Animate.css */
221 "callout.pulse": {
222 defaultDuration: 825,
223 calls: [
224 [ { scaleX: 1.1, scaleY: 1.1 }, 0.50 ],
225 [ { scaleX: 1, scaleY: 1 }, 0.50 ]
226 ]
227 },
228 /* Animate.css */
229 "callout.swing": {
230 defaultDuration: 950,
231 calls: [
232 [ { rotateZ: 15 }, 0.20 ],
233 [ { rotateZ: -10 }, 0.20 ],
234 [ { rotateZ: 5 }, 0.20 ],
235 [ { rotateZ: -5 }, 0.20 ],
236 [ { rotateZ: 0 }, 0.20 ]
237 ]
238 },
239 /* Animate.css */
240 "callout.tada": {
241 defaultDuration: 1000,
242 calls: [
243 [ { scaleX: 0.9, scaleY: 0.9, rotateZ: -3 }, 0.10 ],
244 [ { scaleX: 1.1, scaleY: 1.1, rotateZ: 3 }, 0.10 ],
245 [ { scaleX: 1.1, scaleY: 1.1, rotateZ: -3 }, 0.10 ],
246 [ "reverse", 0.125 ],
247 [ "reverse", 0.125 ],
248 [ "reverse", 0.125 ],
249 [ "reverse", 0.125 ],
250 [ "reverse", 0.125 ],
251 [ { scaleX: 1, scaleY: 1, rotateZ: 0 }, 0.20 ]
252 ]
253 },
254 "transition.fadeIn": {
255 defaultDuration: 500,
256 calls: [
257 [ { opacity: [ 1, 0 ] } ]
258 ]
259 },
260 "transition.fadeOut": {
261 defaultDuration: 500,
262 calls: [
263 [ { opacity: [ 0, 1 ] } ]
264 ]
265 },
266 /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
267 "transition.flipXIn": {
268 defaultDuration: 700,
269 calls: [
270 [ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], rotateY: [ 0, -55 ] } ]
271 ],
272 reset: { transformPerspective: 0 }
273 },
274 /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
275 "transition.flipXOut": {
276 defaultDuration: 700,
277 calls: [
278 [ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], rotateY: 55 } ]
279 ],
280 reset: { transformPerspective: 0, rotateY: 0 }
281 },
282 /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
283 "transition.flipYIn": {
284 defaultDuration: 800,
285 calls: [
286 [ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], rotateX: [ 0, -45 ] } ]
287 ],
288 reset: { transformPerspective: 0 }
289 },
290 /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
291 "transition.flipYOut": {
292 defaultDuration: 800,
293 calls: [
294 [ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], rotateX: 25 } ]
295 ],
296 reset: { transformPerspective: 0, rotateX: 0 }
297 },
298 /* Animate.css */
299 /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
300 "transition.flipBounceXIn": {
301 defaultDuration: 900,
302 calls: [
303 [ { opacity: [ 0.725, 0 ], transformPerspective: [ 400, 400 ], rotateY: [ -10, 90 ] }, 0.50 ],
304 [ { opacity: 0.80, rotateY: 10 }, 0.25 ],
305 [ { opacity: 1, rotateY: 0 }, 0.25 ]
306 ],
307 reset: { transformPerspective: 0 }
308 },
309 /* Animate.css */
310 /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
311 "transition.flipBounceXOut": {
312 defaultDuration: 800,
313 calls: [
314 [ { opacity: [ 0.9, 1 ], transformPerspective: [ 400, 400 ], rotateY: -10 }, 0.50 ],
315 [ { opacity: 0, rotateY: 90 }, 0.50 ]
316 ],
317 reset: { transformPerspective: 0, rotateY: 0 }
318 },
319 /* Animate.css */
320 /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
321 "transition.flipBounceYIn": {
322 defaultDuration: 850,
323 calls: [
324 [ { opacity: [ 0.725, 0 ], transformPerspective: [ 400, 400 ], rotateX: [ -10, 90 ] }, 0.50 ],
325 [ { opacity: 0.80, rotateX: 10 }, 0.25 ],
326 [ { opacity: 1, rotateX: 0 }, 0.25 ]
327 ],
328 reset: { transformPerspective: 0 }
329 },
330 /* Animate.css */
331 /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
332 "transition.flipBounceYOut": {
333 defaultDuration: 800,
334 calls: [
335 [ { opacity: [ 0.9, 1 ], transformPerspective: [ 400, 400 ], rotateX: -15 }, 0.50 ],
336 [ { opacity: 0, rotateX: 90 }, 0.50 ]
337 ],
338 reset: { transformPerspective: 0, rotateX: 0 }
339 },
340 /* Magic.css */
341 "transition.swoopIn": {
342 defaultDuration: 850,
343 calls: [
344 [ { opacity: [ 1, 0 ], transformOriginX: [ "100%", "50%" ], transformOriginY: [ "100%", "100%" ], scaleX: [ 1, 0 ], scaleY: [ 1, 0 ], translateX: [ 0, -700 ], translateZ: 0 } ]
345 ],
346 reset: { transformOriginX: "50%", transformOriginY: "50%" }
347 },
348 /* Magic.css */
349 "transition.swoopOut": {
350 defaultDuration: 850,
351 calls: [
352 [ { opacity: [ 0, 1 ], transformOriginX: [ "50%", "100%" ], transformOriginY: [ "100%", "100%" ], scaleX: 0, scaleY: 0, translateX: -700, translateZ: 0 } ]
353 ],
354 reset: { transformOriginX: "50%", transformOriginY: "50%", scaleX: 1, scaleY: 1, translateX: 0 }
355 },
356 /* Magic.css */
357 /* Support: Loses rotation in IE9/Android 2.3. (Fades and scales only.) */
358 "transition.whirlIn": {
359 defaultDuration: 900,
360 calls: [
361 [ { opacity: [ 1, 0 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: [ 1, 0 ], scaleY: [ 1, 0 ], rotateY: [ 0, 160 ] } ]
362 ]
363 },
364 /* Magic.css */
365 /* Support: Loses rotation in IE9/Android 2.3. (Fades and scales only.) */
366 "transition.whirlOut": {
367 defaultDuration: 900,
368 calls: [
369 [ { opacity: [ 0, 1 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: 0, scaleY: 0, rotateY: 160 } ]
370 ],
371 reset: { scaleX: 1, scaleY: 1, rotateY: 0 }
372 },
373 "transition.shrinkIn": {
374 defaultDuration: 700,
375 calls: [
376 [ { opacity: [ 1, 0 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: [ 1, 1.5 ], scaleY: [ 1, 1.5 ], translateZ: 0 } ]
377 ]
378 },
379 "transition.shrinkOut": {
380 defaultDuration: 650,
381 calls: [
382 [ { opacity: [ 0, 1 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: 1.3, scaleY: 1.3, translateZ: 0 } ]
383 ],
384 reset: { scaleX: 1, scaleY: 1 }
385 },
386 "transition.expandIn": {
387 defaultDuration: 700,
388 calls: [
389 [ { opacity: [ 1, 0 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: [ 1, 0.625 ], scaleY: [ 1, 0.625 ], translateZ: 0 } ]
390 ]
391 },
392 "transition.expandOut": {
393 defaultDuration: 700,
394 calls: [
395 [ { opacity: [ 0, 1 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: 0.5, scaleY: 0.5, translateZ: 0 } ]
396 ],
397 reset: { scaleX: 1, scaleY: 1 }
398 },
399 /* Animate.css */
400 "transition.bounceIn": {
401 defaultDuration: 800,
402 calls: [
403 [ { opacity: [ 1, 0 ], scaleX: [ 1.05, 0.3 ], scaleY: [ 1.05, 0.3 ] }, 0.40 ],
404 [ { scaleX: 0.9, scaleY: 0.9, translateZ: 0 }, 0.20 ],
405 [ { scaleX: 1, scaleY: 1 }, 0.50 ]
406 ]
407 },
408 /* Animate.css */
409 "transition.bounceOut": {
410 defaultDuration: 800,
411 calls: [
412 [ { scaleX: 0.95, scaleY: 0.95 }, 0.40 ],
413 [ { scaleX: 1.1, scaleY: 1.1, translateZ: 0 }, 0.40 ],
414 [ { opacity: [ 0, 1 ], scaleX: 0.3, scaleY: 0.3 }, 0.20 ]
415 ],
416 reset: { scaleX: 1, scaleY: 1 }
417 },
418 /* Animate.css */
419 "transition.bounceUpIn": {
420 defaultDuration: 800,
421 calls: [
422 [ { opacity: [ 1, 0 ], translateY: [ -30, 1000 ] }, 0.60, { easing: "easeOutCirc" } ],
423 [ { translateY: 10 }, 0.20 ],
424 [ { translateY: 0 }, 0.20 ]
425 ]
426 },
427 /* Animate.css */
428 "transition.bounceUpOut": {
429 defaultDuration: 1000,
430 calls: [
431 [ { translateY: 20 }, 0.20 ],
432 [ { opacity: [ 0, "easeInCirc", 1 ], translateY: -1000 }, 0.80 ]
433 ],
434 reset: { translateY: 0 }
435 },
436 /* Animate.css */
437 "transition.bounceDownIn": {
438 defaultDuration: 800,
439 calls: [
440 [ { opacity: [ 1, 0 ], translateY: [ 30, -1000 ] }, 0.60, { easing: "easeOutCirc" } ],
441 [ { translateY: -10 }, 0.20 ],
442 [ { translateY: 0 }, 0.20 ]
443 ]
444 },
445 /* Animate.css */
446 "transition.bounceDownOut": {
447 defaultDuration: 1000,
448 calls: [
449 [ { translateY: -20 }, 0.20 ],
450 [ { opacity: [ 0, "easeInCirc", 1 ], translateY: 1000 }, 0.80 ]
451 ],
452 reset: { translateY: 0 }
453 },
454 /* Animate.css */
455 "transition.bounceLeftIn": {
456 defaultDuration: 750,
457 calls: [
458 [ { opacity: [ 1, 0 ], translateX: [ 30, -1250 ] }, 0.60, { easing: "easeOutCirc" } ],
459 [ { translateX: -10 }, 0.20 ],
460 [ { translateX: 0 }, 0.20 ]
461 ]
462 },
463 /* Animate.css */
464 "transition.bounceLeftOut": {
465 defaultDuration: 750,
466 calls: [
467 [ { translateX: 30 }, 0.20 ],
468 [ { opacity: [ 0, "easeInCirc", 1 ], translateX: -1250 }, 0.80 ]
469 ],
470 reset: { translateX: 0 }
471 },
472 /* Animate.css */
473 "transition.bounceRightIn": {
474 defaultDuration: 750,
475 calls: [
476 [ { opacity: [ 1, 0 ], translateX: [ -30, 1250 ] }, 0.60, { easing: "easeOutCirc" } ],
477 [ { translateX: 10 }, 0.20 ],
478 [ { translateX: 0 }, 0.20 ]
479 ]
480 },
481 /* Animate.css */
482 "transition.bounceRightOut": {
483 defaultDuration: 750,
484 calls: [
485 [ { translateX: -30 }, 0.20 ],
486 [ { opacity: [ 0, "easeInCirc", 1 ], translateX: 1250 }, 0.80 ]
487 ],
488 reset: { translateX: 0 }
489 },
490 "transition.slideUpIn": {
491 defaultDuration: 900,
492 calls: [
493 [ { opacity: [ 1, 0 ], translateY: [ 0, 20 ], translateZ: 0 } ]
494 ]
495 },
496 "transition.slideUpOut": {
497 defaultDuration: 900,
498 calls: [
499 [ { opacity: [ 0, 1 ], translateY: -20, translateZ: 0 } ]
500 ],
501 reset: { translateY: 0 }
502 },
503 "transition.slideDownIn": {
504 defaultDuration: 900,
505 calls: [
506 [ { opacity: [ 1, 0 ], translateY: [ 0, -20 ], translateZ: 0 } ]
507 ]
508 },
509 "transition.slideDownOut": {
510 defaultDuration: 900,
511 calls: [
512 [ { opacity: [ 0, 1 ], translateY: 20, translateZ: 0 } ]
513 ],
514 reset: { translateY: 0 }
515 },
516 "transition.slideLeftIn": {
517 defaultDuration: 1000,
518 calls: [
519 [ { opacity: [ 1, 0 ], translateX: [ 0, -20 ], translateZ: 0 } ]
520 ]
521 },
522 "transition.slideLeftOut": {
523 defaultDuration: 1050,
524 calls: [
525 [ { opacity: [ 0, 1 ], translateX: -20, translateZ: 0 } ]
526 ],
527 reset: { translateX: 0 }
528 },
529 "transition.slideRightIn": {
530 defaultDuration: 1000,
531 calls: [
532 [ { opacity: [ 1, 0 ], translateX: [ 0, 20 ], translateZ: 0 } ]
533 ]
534 },
535 "transition.slideRightOut": {
536 defaultDuration: 1050,
537 calls: [
538 [ { opacity: [ 0, 1 ], translateX: 20, translateZ: 0 } ]
539 ],
540 reset: { translateX: 0 }
541 },
542 "transition.slideUpBigIn": {
543 defaultDuration: 850,
544 calls: [
545 [ { opacity: [ 1, 0 ], translateY: [ 0, 75 ], translateZ: 0 } ]
546 ]
547 },
548 "transition.slideUpBigOut": {
549 defaultDuration: 800,
550 calls: [
551 [ { opacity: [ 0, 1 ], translateY: -75, translateZ: 0 } ]
552 ],
553 reset: { translateY: 0 }
554 },
555 "transition.slideDownBigIn": {
556 defaultDuration: 850,
557 calls: [
558 [ { opacity: [ 1, 0 ], translateY: [ 0, -75 ], translateZ: 0 } ]
559 ]
560 },
561 "transition.slideDownBigOut": {
562 defaultDuration: 800,
563 calls: [
564 [ { opacity: [ 0, 1 ], translateY: 75, translateZ: 0 } ]
565 ],
566 reset: { translateY: 0 }
567 },
568 "transition.slideLeftBigIn": {
569 defaultDuration: 800,
570 calls: [
571 [ { opacity: [ 1, 0 ], translateX: [ 0, -75 ], translateZ: 0 } ]
572 ]
573 },
574 "transition.slideLeftBigOut": {
575 defaultDuration: 750,
576 calls: [
577 [ { opacity: [ 0, 1 ], translateX: -75, translateZ: 0 } ]
578 ],
579 reset: { translateX: 0 }
580 },
581 "transition.slideRightBigIn": {
582 defaultDuration: 800,
583 calls: [
584 [ { opacity: [ 1, 0 ], translateX: [ 0, 75 ], translateZ: 0 } ]
585 ]
586 },
587 "transition.slideRightBigOut": {
588 defaultDuration: 750,
589 calls: [
590 [ { opacity: [ 0, 1 ], translateX: 75, translateZ: 0 } ]
591 ],
592 reset: { translateX: 0 }
593 },
594 /* Magic.css */
595 "transition.perspectiveUpIn": {
596 defaultDuration: 800,
597 calls: [
598 [ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ "100%", "100%" ], rotateX: [ 0, -180 ] } ]
599 ],
600 reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" }
601 },
602 /* Magic.css */
603 /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
604 "transition.perspectiveUpOut": {
605 defaultDuration: 850,
606 calls: [
607 [ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ "100%", "100%" ], rotateX: -180 } ]
608 ],
609 reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateX: 0 }
610 },
611 /* Magic.css */
612 /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
613 "transition.perspectiveDownIn": {
614 defaultDuration: 800,
615 calls: [
616 [ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateX: [ 0, 180 ] } ]
617 ],
618 reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" }
619 },
620 /* Magic.css */
621 /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
622 "transition.perspectiveDownOut": {
623 defaultDuration: 850,
624 calls: [
625 [ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateX: 180 } ]
626 ],
627 reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateX: 0 }
628 },
629 /* Magic.css */
630 /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
631 "transition.perspectiveLeftIn": {
632 defaultDuration: 950,
633 calls: [
634 [ { opacity: [ 1, 0 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateY: [ 0, -180 ] } ]
635 ],
636 reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" }
637 },
638 /* Magic.css */
639 /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
640 "transition.perspectiveLeftOut": {
641 defaultDuration: 950,
642 calls: [
643 [ { opacity: [ 0, 1 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateY: -180 } ]
644 ],
645 reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateY: 0 }
646 },
647 /* Magic.css */
648 /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
649 "transition.perspectiveRightIn": {
650 defaultDuration: 950,
651 calls: [
652 [ { opacity: [ 1, 0 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ "100%", "100%" ], transformOriginY: [ 0, 0 ], rotateY: [ 0, 180 ] } ]
653 ],
654 reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" }
655 },
656 /* Magic.css */
657 /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
658 "transition.perspectiveRightOut": {
659 defaultDuration: 950,
660 calls: [
661 [ { opacity: [ 0, 1 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ "100%", "100%" ], transformOriginY: [ 0, 0 ], rotateY: 180 } ]
662 ],
663 reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateY: 0 }
664 }
665 };
666
667 /* Register the packaged effects. */
668 for (var effectName in global.Velocity.RegisterUI.packagedEffects) {
669 global.Velocity.RegisterUI(effectName, global.Velocity.RegisterUI.packagedEffects[effectName]);
670 }
671}((window.jQuery || window.Zepto || window), window, document);
672}));
\No newline at end of file