1 2var slider6=''; 3var playtime = 0; 4 5$(function(){ 6 7 layout_slider_6(); 8 layout_slider_6_scroll(); 9 10 $("section").each(function(e){ 11 var id = $(this).attr('id'); 12 var fn = funcs['fn_'+id]; 13 14 if(typeof fn === 'function') { 15 fn_main_target_scroll($(this), fn); 16 } else { 17 18 } 19 }); 20 21 22}); 23 24 25var layout_slider_6 = function() { 26 var $visual = $('#layout_slider_6 .slider_new'); 27 var $state = $visual.find('.swiper_play_state'); 28 var $slideList = $('#layout_slider_6 .slider_new .swiper-wrapper'); 29 var $total = $slideList.children( "div" ).length; 30 var $progress = $('#layout_slider_6 .slider_new .swiper_progress'); 31 32 slider6 = new Swiper("#layout_slider_6 .main_swiper", { 33 effect: "fade", 34 speed: 700, 35 fadeEffect: { crossFade: false }, 36 loop: true, 37 //parallax: true, 38 //autoplay: false, 39 autoplay: { 40 delay: 10000, 41 disableOnInteraction: false, 42 }, 43 navigation: { 44 nextEl: "#layout_slider_6 .swiper-button-next", 45 prevEl: "#layout_slider_6 .swiper-button-prev", 46 }, 47 pagination: { 48 el: "#layout_slider_6 .swiper-pagination", 49 clickable: true, 50 /* 51 type: 'fraction', 52 renderFraction: function (currentClass, totalClass) { 53 return '<span lang="play" class="' + currentClass + '"></span>' + 54 '<span class="swiper_progress_hidden_space"></span>' + 55 '<span lang="play" class="' + totalClass + '"></span>'; 56 } 57 */ 58 }, 59 on: { 60 init: function () { 61 //$("#layout_slider_6").addClass('active'); 62 gsap.fromTo($('#layout_slider_6 .swiper-slide-active .slider__slogun'), 1, {autoAlpha: 0,ease: Power3.easeOut}, {autoAlpha: 1}); 63 }, 64 slideChange : function(){ 65 // progress_motion(); 66 gsap.to($('#layout_slider_6 .swiper-slide-active .slider__slogun b > span'),0.35,{y:0,autoAlpha : 0,onComplete :function(){ 67 gsap.fromTo($('#layout_slider_6 .swiper-slide-active .slider__slogun b > span'), 0.7, {y: 50,autoAlpha:0,ease: Power3.easeOut,delay: 0}, { y: 0,autoAlpha:1,delay: 0, stagger:0.3 }); 68 }}); 69 gsap.to($('#layout_slider_6 .swiper-slide-active .slider__slogun p > span'),0.35,{y:0,autoAlpha : 0,onComplete :function(){ 70 gsap.fromTo($('#layout_slider_6 .swiper-slide-active .slider__slogun p > span'), 0.5, {y: 50,autoAlpha:0,ease: Power3.easeOut,delay: 0}, { y: 0,autoAlpha:1,delay: 0.3}); 71 }}); 72 gsap.to($('#layout_slider_6 .swiper-slide-active .slider__slogun a'),0.35,{y:0,autoAlpha : 0,onComplete :function(){ 73 gsap.fromTo($('#layout_slider_6 .swiper-slide-active .slider__slogun a'), 0.5, {y: 50,autoAlpha:0,ease: Power3.easeOut,delay: 0}, { y: 0,autoAlpha:1,delay: 0.7}); 74 }}); 75 }, 76 slideChangeTransitionStart:function() { 77 78 /* 79 var isplaying = $state.hasClass('play'); 80 81 // íì¬ì¬ë¼ì´ë íë ì´ 82 var video = $("#layout_slider_6 .swiper-slide-active video").get(0); 83 var idx = this.realIndex; 84 85 if(video) { 86 //slider6.autoplay.stop(); 87 video.play(); 88 video.onloadeddata = function() { // load 89 var duration = this.duration; 90 playtime = duration; 91 console.log(duration); 92 93 }; 94 video.onended = function(){ 95 slider6.slideNext(); 96 }; 97 } else { 98 var timers = setTimeout(function(e){ 99 slider6.slideNext(); 100 clearTimeout(timers); 101 }, 5000); 102 } 103 104 105 // ë¤ë¥¸ì¬ë¼ì´ë ëììì ë©ì¶ê¸° 106 $('#layout_slider_6 .swiper-slide').each(function() { 107 var has = $(this).hasClass("swiper-slide-active"); 108 if(!has) { 109 //console.log("ë¤ë¥¸ëìì"); 110 var oldvideo = $(this).find("video").get(0); 111 if(oldvideo) { 112 var timer = setTimeout(function() { 113 oldvideo.pause(); 114 oldvideo.currentTime = 0; 115 }, 500); 116 117 } 118 } 119 }); 120 */ 121 122 }, 123 slideNextTransitionStart:function() { 124 125 }, 126 }, 127 }); 128 129 130 function pagination_position(){ 131 var $control_pos = $('.swiper-slide:eq(0) .slider__slogun .subtitle').offset().top; 132 console.log($control_pos); 133 $('.swiper-pagination').css({'top':$control_pos - 55, 'bottom':'auto'}); 134 /* 135 $('.main_visual_wrap .swiper_navigation').css({'top':$control_pos - 35, 'bottom':'auto'}); 136 $('.main_visual_state, .main_visual_wrap .swiper_navigation').removeAttr('style'); 137 */ 138 139 } 140 141 142 143 setTimeout(function(){ 144 //pagination_position(); 145 },50); 146 147 $(window).on('resize',function(){ 148 setTimeout(function(){ 149 // pagination_position(); 150 },50); 151 }) 152 153 154 function progress_motion(){ 155 TweenMax.killTweensOf( $progress ); 156 TweenMax.set( $progress, { width: "0%" }); 157 TweenMax.to( $progress, 5, { width: "100%", ease:Power0.easeIn, 158 onStart: function(){ 159 $state.removeClass('progress_max'); 160 }, 161 onComplete:function(){ 162 $state.addClass('progress_max'); 163 if($state.hasClass('play') && typeof $('#layout_slider_6 .slider_new .mySwiper')[0] != "undefined"){ 164 $('#layout_slider_6 .slider_new .mySwiper')[0].swiper.slideNext(); 165 } 166 } 167 }); 168 } 169 170 // Play, Pause 171 $state.on('click', function(){ 172 if($state.hasClass('play')){ 173 slider6.autoplay.stop(); 174 $state.removeClass('play').addClass('pause'); 175 $state.find('.swiper_state_play').focus(); 176 } else { 177 slider6.autoplay.start(); 178 $state.removeClass('pause').addClass('play'); 179 if( $state.hasClass('progress_max') ){ slider6.slideNext(); } 180 $state.find('.swiper_state_pause').focus(); 181 } 182 }); 183 184}; 185 186var layout_slider_6_scroll = function() { 187 if( $('.slider-scroll .scroll_down_arrow').length>0 ) { 188 // Animation @ TweenMax.staggerTo('.scroll_down_arrow',1.5,{autoAlpha:0,repeat:-1,repeatDelay:0.5},.25)
189 TweenMax.staggerTo('.scroll_down_arrow',1.5,{opacity:1,repeat:-1},.25) 190 } 191 192 // slider scroll click event 193 $('.slider-scroll a').on('click',function(){ 194 $('html,body').animate({ 195 scrollTop : document.documentElement.clientHeight 196 }, 600); 197 return false; 198 }); 199}; 200 201 202var is_project_slider = false; 203 204const funcs = { 205 206 fn_layout_slider_6 : function(mode, obj) { 207 }, 208 209 fn_main_about : function(mode, obj) { 210 // ë¼ì¸, ê¸ì SPLIT 211 var obj_line = obj.find('.ani_line'); 212 var obj_id = obj.attr('id'); 213 if(mode=='enter') { 214 obj_line.addClass('on'); 215 subTextSplit('#'+obj_id); 216 } else if(mode=='leave') { 217 obj_line.removeClass('on'); 218 } 219 }, 220 221 fn_main_since : function(mode, obj) { 222 var obj_id = obj.attr('id'); 223 if(mode=='enter') { 224 subTextSplit('#'+obj_id); 225 subCounter(); 226 } else if(mode=='leave') { 227 } 228 }, 229 230 fn_main_center : function(mode, obj) { }, 231 fn_main_project : function(mode, obj) { 232 if(mode=='enter' && is_project_slider==false) { 233 234 const project_silder = new Swiper(".project_slider", { 235 loop:true, 236 speed:700, 237 autoplay:{ 238 delay:5000, 239 disableOnInteraction:false, 240 pauseOnMouseEnter:true, 241 }, 242 navigation: { 243 nextEl: '.project_slider .swiper-button-next', 244 prevEl: '.project_slider .swiper-button-prev' 245 }, 246 pagination: { 247 el: ".project_slider .swiper-pagination", 248 clickable: true, 249 }, 250 centeredSlides: true, 251 spaceBetween:60, 252 slidesPerView:"1", 253 }); 254 255 is_project_slider = true; 256 } 257 }, 258 fn_main_promo : function(mode, obj) { }, 259 260 fn_main_recruit : function(mode, obj) { }, 261} 262 263 264var controller = new ScrollMagic.Controller(); 265 266var fn_main_target_scroll = function(obj, callback) { 267 268 if(obj.length<=0) return; 269 // var obj = $('#'+obj.attr('id')); 270 var $this = obj; 271 var scene = new ScrollMagic.Scene({ 272 triggerElement: $this[0], 273 //offset:220 274 offset:$this.outerHeight()/2 275 }) 276 .addTo(controller) 277 // .addIndicators() 278 scene.triggerHook(1) 279 scene.on('enter', function(event) { 280 if(typeof(callback)=='function') { 281 callback('enter', $this); 282 } 283 }); 284 scene.on('leave', function(event) { 285 if(typeof(callback)=='function') { 286 callback('leave', $this); 287 } 288 }); 289};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.