|
|
@@ -162,60 +162,66 @@ main = function () {
|
|
162
|
162
|
swiperHandler_history();
|
|
163
|
163
|
|
|
164
|
164
|
setTimeout(() => {
|
|
165
|
|
- gsap.to(".wrapper", { duration: 0.3, autoAlpha: 1 });
|
|
166
|
165
|
|
|
167
|
166
|
detectScrollSection();
|
|
168
|
167
|
|
|
|
168
|
+ //元素動態
|
|
|
169
|
+ elementAni();
|
|
|
170
|
+
|
|
169
|
171
|
$(window).scroll(function(){
|
|
170
|
172
|
detectScrollSection();
|
|
171
|
173
|
ScrollTrigger.update();
|
|
172
|
174
|
})
|
|
173
|
175
|
|
|
|
176
|
+ if(!isMobile) {
|
|
|
177
|
+ $(".qa__box__scroll").niceScroll({
|
|
|
178
|
+ cursorcolor: "#2ba4da", // 滾動條的顏色
|
|
|
179
|
+ cursorwidth: "0.6em", // 滾動條寬度
|
|
|
180
|
+ cursorborder: "1px solid #fff", // 滾動條邊框
|
|
|
181
|
+ cursorborderradius: "5px", // 滾動條圓角
|
|
|
182
|
+ touchbehavior: false, // 是否啟用拖曳行為
|
|
|
183
|
+ autohidemode: false, // 不隱藏卷軸
|
|
|
184
|
+ background: "", // 軌道背景色
|
|
|
185
|
+ cursorminheight: 32, // 滾動條最小高度
|
|
|
186
|
+ railpadding: { top: 0, right: 0, left: 0, bottom: 0 }, // 軌道內間距
|
|
|
187
|
+ railalign: "center", // 對其垂直軌道
|
|
|
188
|
+ railvalign: "center", // 對其水平軌道
|
|
|
189
|
+ cursordragontouch: false, // 使用觸屏模式來實現拖曳
|
|
|
190
|
+ grabcursorenabled: false,
|
|
|
191
|
+ });
|
|
|
192
|
+ }else {
|
|
|
193
|
+ $(".qa__box__scroll").niceScroll({
|
|
|
194
|
+ cursorcolor: "#2ba4da", // 滾動條的顏色
|
|
|
195
|
+ cursorwidth: "0.7em", // 滾動條寬度
|
|
|
196
|
+ cursorborder: "1px solid #fff", // 滾動條邊框
|
|
|
197
|
+ cursorborderradius: "5px", // 滾動條圓角
|
|
|
198
|
+ touchbehavior: false, // 是否啟用拖曳行為
|
|
|
199
|
+ autohidemode: false, // 不隱藏卷軸
|
|
|
200
|
+ background: "", // 軌道背景色
|
|
|
201
|
+ cursorminheight: 32, // 滾動條最小高度
|
|
|
202
|
+ railpadding: { top: 0, right: 0, left: 0, bottom: 0 }, // 軌道內間距
|
|
|
203
|
+ railalign: "center", // 對其垂直軌道
|
|
|
204
|
+ railvalign: "center", // 對其水平軌道
|
|
|
205
|
+ cursordragontouch: false, // 使用觸屏模式來實現拖曳
|
|
|
206
|
+ grabcursorenabled: false,
|
|
|
207
|
+ });
|
|
|
208
|
+
|
|
|
209
|
+ }
|
|
|
210
|
+
|
|
174
|
211
|
setTimeout(()=>{
|
|
|
212
|
+ gsap.to(".wapper-loading", { duration: 0.3, autoAlpha: 0, onComplete: function(){
|
|
|
213
|
+ $(".wapper-loading").remove();
|
|
|
214
|
+ } });
|
|
|
215
|
+
|
|
|
216
|
+ $(".qa__box__scroll").getNiceScroll().resize();
|
|
|
217
|
+ gsap.to(".wrapper", { duration: 0.3, autoAlpha: 1 });
|
|
175
|
218
|
|
|
176
|
|
- if(!isMobile) {
|
|
177
|
|
- $(".qa__box__scroll").niceScroll({
|
|
178
|
|
- cursorcolor: "#2ba4da", // 滾動條的顏色
|
|
179
|
|
- cursorwidth: "0.6em", // 滾動條寬度
|
|
180
|
|
- cursorborder: "1px solid #fff", // 滾動條邊框
|
|
181
|
|
- cursorborderradius: "5px", // 滾動條圓角
|
|
182
|
|
- touchbehavior: false, // 是否啟用拖曳行為
|
|
183
|
|
- autohidemode: false, // 不隱藏卷軸
|
|
184
|
|
- background: "", // 軌道背景色
|
|
185
|
|
- cursorminheight: 32, // 滾動條最小高度
|
|
186
|
|
- railpadding: { top: 0, right: 0, left: 0, bottom: 0 }, // 軌道內間距
|
|
187
|
|
- railalign: "center", // 對其垂直軌道
|
|
188
|
|
- railvalign: "center", // 對其水平軌道
|
|
189
|
|
- cursordragontouch: false, // 使用觸屏模式來實現拖曳
|
|
190
|
|
- grabcursorenabled: false,
|
|
191
|
|
- });
|
|
192
|
|
- }else {
|
|
193
|
|
- $(".qa__box__scroll").niceScroll({
|
|
194
|
|
- cursorcolor: "#2ba4da", // 滾動條的顏色
|
|
195
|
|
- cursorwidth: "0.7em", // 滾動條寬度
|
|
196
|
|
- cursorborder: "1px solid #fff", // 滾動條邊框
|
|
197
|
|
- cursorborderradius: "5px", // 滾動條圓角
|
|
198
|
|
- touchbehavior: false, // 是否啟用拖曳行為
|
|
199
|
|
- autohidemode: false, // 不隱藏卷軸
|
|
200
|
|
- background: "", // 軌道背景色
|
|
201
|
|
- cursorminheight: 32, // 滾動條最小高度
|
|
202
|
|
- railpadding: { top: 0, right: 0, left: 0, bottom: 0 }, // 軌道內間距
|
|
203
|
|
- railalign: "center", // 對其垂直軌道
|
|
204
|
|
- railvalign: "center", // 對其水平軌道
|
|
205
|
|
- cursordragontouch: false, // 使用觸屏模式來實現拖曳
|
|
206
|
|
- grabcursorenabled: false,
|
|
207
|
|
- });
|
|
208
|
|
- }
|
|
|
219
|
+ //開頭動態
|
|
|
220
|
+ startAni();
|
|
209
|
221
|
|
|
210
|
|
- }, 1000);
|
|
|
222
|
+ }, 500);
|
|
211
|
223
|
|
|
212
|
|
-
|
|
213
|
|
- //開頭動態
|
|
214
|
|
- startAni();
|
|
215
|
|
-
|
|
216
|
|
- //元素動態
|
|
217
|
|
- elementAni();
|
|
218
|
|
- }, 1000);
|
|
|
224
|
+ }, 500);
|
|
219
|
225
|
}
|
|
220
|
226
|
|
|
221
|
227
|
// 桌機調整視窗大小
|
|
|
@@ -575,7 +581,9 @@ main = function () {
|
|
575
|
581
|
gsap.set(".history .container", { y: 50, autoAlpha: 0 });
|
|
576
|
582
|
gsap.set(".research .container", { y: 50, autoAlpha: 0 });
|
|
577
|
583
|
gsap.set(".research .research__item", { autoAlpha: 0 });
|
|
578
|
|
- gsap.set(".qa .container", { y: 50, autoAlpha: 0 });
|
|
|
584
|
+ gsap.set(".qa .copywriting", { y: 50, autoAlpha: 0 });
|
|
|
585
|
+ gsap.set(".qa .qa__desc", { y: 50, autoAlpha: 0 });
|
|
|
586
|
+ gsap.set(".qa .qa__keypoint h3", { y: 50, autoAlpha: 0 });
|
|
579
|
587
|
gsap.set(".moreref .container", { y: 50, autoAlpha: 0 });
|
|
580
|
588
|
gsap.set(".qa .qa__keypoint__item:nth-child(1)", { x: 100, autoAlpha: 0 });
|
|
581
|
589
|
gsap.set(".qa .qa__keypoint__item:nth-child(3)", { x: -100, autoAlpha: 0 });
|
|
|
@@ -667,7 +675,7 @@ main = function () {
|
|
667
|
675
|
autoAlpha: 1,
|
|
668
|
676
|
});
|
|
669
|
677
|
|
|
670
|
|
- gsap.to(".qa .container", {
|
|
|
678
|
+ gsap.to(".qa .copywriting", {
|
|
671
|
679
|
scrollTrigger: {
|
|
672
|
680
|
trigger: ".qa",
|
|
673
|
681
|
start: "top center",
|
|
|
@@ -676,7 +684,31 @@ main = function () {
|
|
676
|
684
|
},
|
|
677
|
685
|
duration: 0.3,
|
|
678
|
686
|
autoAlpha: 1,
|
|
679
|
|
- y: 0
|
|
|
687
|
+ y:0
|
|
|
688
|
+ });
|
|
|
689
|
+
|
|
|
690
|
+ gsap.to(".qa .qa__desc", {
|
|
|
691
|
+ scrollTrigger: {
|
|
|
692
|
+ trigger: ".qa .qa__desc",
|
|
|
693
|
+ start: "top center",
|
|
|
694
|
+ end: "+=" + ($(".qa").height() / 3),
|
|
|
695
|
+ scrub: 1,
|
|
|
696
|
+ },
|
|
|
697
|
+ duration: 0.3,
|
|
|
698
|
+ autoAlpha: 1,
|
|
|
699
|
+ y:0
|
|
|
700
|
+ });
|
|
|
701
|
+
|
|
|
702
|
+ gsap.to(".qa .qa__keypoint h3", {
|
|
|
703
|
+ scrollTrigger: {
|
|
|
704
|
+ trigger: ".qa .qa__desc",
|
|
|
705
|
+ start: "top center",
|
|
|
706
|
+ end: "+=" + ($(".qa").height() / 3),
|
|
|
707
|
+ scrub: 1,
|
|
|
708
|
+ },
|
|
|
709
|
+ duration: 0.3,
|
|
|
710
|
+ autoAlpha: 1,
|
|
|
711
|
+ y:0
|
|
680
|
712
|
});
|
|
681
|
713
|
|
|
682
|
714
|
gsap.to(".qa .qa__keypoint__item:nth-child(1)", {
|
|
|
@@ -714,33 +746,6 @@ main = function () {
|
|
714
|
746
|
autoAlpha: 1,
|
|
715
|
747
|
y: 0
|
|
716
|
748
|
});
|
|
717
|
|
-
|
|
718
|
|
- // gsap.to(".game__head", {
|
|
719
|
|
- // scrollTrigger: {
|
|
720
|
|
- // trigger: ".game",
|
|
721
|
|
- // start: "top center",
|
|
722
|
|
- // end: "+=" + $(".game__head").height(),
|
|
723
|
|
- // scrub: 1,
|
|
724
|
|
- // },
|
|
725
|
|
- // duration: 0.3,
|
|
726
|
|
- // scale: 1,
|
|
727
|
|
- // autoAlpha: 1,
|
|
728
|
|
- // y: 0,
|
|
729
|
|
- // });
|
|
730
|
|
-
|
|
731
|
|
- // gsap.to(".game__place", {
|
|
732
|
|
- // scrollTrigger: {
|
|
733
|
|
- // trigger: ".game",
|
|
734
|
|
- // start: "top center",
|
|
735
|
|
- // end: "+=" + $(".game__head").height(),
|
|
736
|
|
- // scrub: 1,
|
|
737
|
|
- // },
|
|
738
|
|
- // duration: 0.3,
|
|
739
|
|
- // scale: 1,
|
|
740
|
|
- // autoAlpha: 1,
|
|
741
|
|
- // y: 0,
|
|
742
|
|
- // delay: 0.2,
|
|
743
|
|
- // });
|
|
744
|
749
|
}
|
|
745
|
750
|
|
|
746
|
751
|
function scrollToSection() {
|