{"title":"Adding Sliding Transitions","id":51982,"link":"https:\/\/env.averta.net\/en\/step\/adding-sliding-transitions\/","parent":[51848],"content":"<p>Master Slider supports different types of slide changing transitions. Some transitions have customization options to let you make a custom and unique looking transition. To set a transition for the slider you can set it by <code>view<\/code> slider option. In this article, you can find out what are the available transitions and how you can customize them.<\/p>\n<h2>Transition options<\/h2>\n<p>To set transition options, you need to set them as an object value to <code>viewOption<\/code> slider option. Below you can find an example:<\/p>\n<pre class=\"lang:xhtml decode:true \">    var slider = new MasterSlider();\r\n    slider.setup( 'headerSlider', {\r\n      width: 900,\r\n      height: 700,\r\n      view: 'transform',\r\n      viewOptions: {\r\n        rotateX: [-10, 10],\r\n        translateZ: [200, 200]\r\n      },\r\n      \/\/ other options ...\r\n    });\r\n<\/pre>\n<h2>Basic transition<\/h2>\n<p><code>view: 'basic'<\/code><\/p>\n<p>The slider default transition is this one and it does not have any option to customize. It arranges slides horizontally or vertically next to each other.<\/p>\n<h2>Fade transition<\/h2>\n<p><code>view: 'fade'<\/code><\/p>\n<p>Fades next or previous slider over current slide.<\/p>\n<h2>Box transition<\/h2>\n<p><code>view: 'box'<\/code><\/p>\n<p>It makes a cube from slides and the cube rotates to change between slides.<\/p>\n<p class=\"aswi-text-box box-note\"><strong>Note: <\/strong>This transition does not work correctly in IE since IE does not support CSS transform preserve-3d style.<\/p>\n<h2>Scale transition<\/h2>\n<p><code>view: 'scale'<\/code><\/p>\n<p>It scales and fades slides over each other to navigate between them.<\/p>\n<h3>Transition options<\/h3>\n<table>\n<thead>\n<tr>\n<td>Name<\/td>\n<td>Default<\/td>\n<td>Description<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>scaleFactor<\/td>\n<td>-300<\/td>\n<td>Specifies the amount of scaling slides.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Mask transition<\/h2>\n<p><code>view: 'mask'<\/code><\/p>\n<p>It adds a mask over each slide and moves masks over the slides to navigate between them.<\/p>\n<h3>Transition options<\/h3>\n<table>\n<thead>\n<tr>\n<td>Name<\/td>\n<td>Default<\/td>\n<td>Description<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>parallax<\/td>\n<td>1<\/td>\n<td>Specifies how much slides moves when slider starts moving between slides.<\/td>\n<\/tr>\n<tr>\n<td>ease<\/td>\n<td>none<\/td>\n<td>This option specifies the easing function of changing numeral transition options values. You can find the list of all easing functions <a href=\"https:\/\/env.averta.net\/en\/step\/adding-sliding-transitions\/?b=,\" title=\"Adding Sliding Transitions\">in this article<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Stack transition<\/h2>\n<p><code>view: 'stack'<\/code><\/p>\n<p>It makes a stacking transition, previous slides scale down and the new slide moves over them.<\/p>\n<h3>Transition options<\/h3>\n<table>\n<thead>\n<tr>\n<td>Name<\/td>\n<td>Default<\/td>\n<td>Description<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>scaleFactor<\/td>\n<td>-300<\/td>\n<td>Specifies the amount of scaling slides.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Focus transition<\/h2>\n<p><code>view: 'focus'<\/code><\/p>\n<p>This transition scales down all slides except the selected slide.<\/p>\n<h3>Transition options<\/h3>\n<table>\n<thead>\n<tr>\n<td>Name<\/td>\n<td>Default<\/td>\n<td>Description<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>depth<\/td>\n<td>[-1500, -1500]<\/td>\n<td>Specifies how much backward and forward slides scale down. This option value can be an array. Its first index specifies the value for backward slides and the second index forwards.<\/td>\n<\/tr>\n<tr>\n<td>perspective<\/td>\n<td>2000<\/td>\n<td>Specifies the perspective point depth in pixels.<\/td>\n<\/tr>\n<tr>\n<td>limitTransform<\/td>\n<td>true<\/td>\n<td>Limits the transform values growth to first backward and forward slides<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Transform transition<\/h2>\n<p><code>view: 'transform'<\/code><\/p>\n<p>With this transition you can transform backward and forward slides by slider view options.<\/p>\n<h3>Transition options<\/h3>\n<table>\n<thead>\n<tr>\n<td>Name<\/td>\n<td>Default<\/td>\n<td>Description<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>transform<\/td>\n<td>null<\/td>\n<td>This option is an object of transforms each transform function value is an array with two indexes to specify the value separately for backward and forward slides. Supported transform functions are listed next to this table.<\/td>\n<\/tr>\n<tr>\n<td>perspective<\/td>\n<td>2000<\/td>\n<td>Specifies the perspective point depth in pixels.<\/td>\n<\/tr>\n<tr>\n<td>limitTransform<\/td>\n<td>true<\/td>\n<td>Whether limit the transform values growth to first backward and forward slides or not.<\/td>\n<\/tr>\n<tr>\n<td>opacity<\/td>\n<td>[1,1]<\/td>\n<td>Specifies how much backward and forward slides fade. First index indicated backwards and next index forward slides.<\/td>\n<\/tr>\n<tr>\n<td>ease<\/td>\n<td>none<\/td>\n<td>This option specifies the easing function of changing numeral transition options values. You can find the list of all easing functions <a href=\"https:\/\/env.averta.net\/en\/step\/adding-sliding-transitions\/?b=,\" title=\"Adding Sliding Transitions\">in this article<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Supported transform functions<\/h3>\n<table>\n<thead>\n<tr>\n<td>Name<\/td>\n<td>Default<\/td>\n<td>Description<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>translateX<\/td>\n<td>[0,0]<\/td>\n<td>Specifies the translateX value in pixels for backward and forward slides.<\/td>\n<\/tr>\n<tr>\n<td>translateY<\/td>\n<td>[0,0]<\/td>\n<td>Specifies the translateY value in pixels for backward and forward slides.<\/td>\n<\/tr>\n<tr>\n<td>translateZ<\/td>\n<td>[0,0]<\/td>\n<td>Specifies the translateZ value in pixels for backward and forward slides.<\/td>\n<\/tr>\n<tr>\n<td>rotateX<\/td>\n<td>[0,0]<\/td>\n<td>Specifies the rotateX angle for backward and forward slides.<\/td>\n<\/tr>\n<tr>\n<td>rotateY<\/td>\n<td>[0,0]<\/td>\n<td>Specifies the rotateY angle for backward and forward slides.<\/td>\n<\/tr>\n<tr>\n<td>rotateZ<\/td>\n<td>[0,0]<\/td>\n<td>Specifies the rotateZ angle for backward and forward slides.<\/td>\n<\/tr>\n<tr>\n<td>scale<\/td>\n<td>[1,1]<\/td>\n<td>Specifies the scale amount of backward and forward slides.<\/td>\n<\/tr>\n<tr>\n<td>skewX<\/td>\n<td>[0,0]<\/td>\n<td>Specifies the skewX transform of backward and forward slides.<\/td>\n<\/tr>\n<tr>\n<td>skewY<\/td>\n<td>[0,0]<\/td>\n<td>Specifies the skewY transform of backward and forward slides.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Wave transition<\/h2>\n<p><code>view: 'wave'<\/code><\/p>\n<p>This transition is a customized form of transform view.<\/p>\n<h2>Fade wave transition<\/h2>\n<p><code>view: 'fadeWave'<\/code><\/p>\n<p>It is similar to wave transition plus fading slides.<\/p>\n<h2>Fade basic transition<\/h2>\n<p><code>view: 'fadeBasic'<\/code><\/p>\n<p>This transition is a customized form of transform view. It is similar to basic transition but it also fades slides.<\/p>\n<h2>Flow transition<\/h2>\n<p><code>view: 'flow'<\/code><\/p>\n<p>This transition is a customized form of transform view. It makes a cover flow transition.<\/p>\n<h2>Fade flow transition<\/h2>\n<p><code>view: 'fadeFlow'<\/code><\/p>\n<p>It is similar to flow transition plus fading slides.<\/p>\n<h2>Partial wave transition<\/h2>\n<p><code>view: 'partialWave'<\/code><\/p>\n<p>It is a custom form of transform view.<\/p>\n<h2>Skew transition<\/h2>\n<p><code>view: 'skew'<\/code><\/p>\n<p>It is a custom form of transform view, it adds skew transform to the slides.<\/p>\n","type":"solution"}