-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdawd.txt
150 lines (128 loc) · 4.66 KB
/
dawd.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#file_heading_box1 {
position: absolute;
overflow: hidden;
background: #010101;
width: 10px;
height: 10px;
top: 280px;
left: 720px;
}
#file_heading_box2 {
position: absolute;
overflow: hidden;
background: #010101;
width: 10px;
height: 10px;
top: 280px;
left: 1300px;
}
#file_heading_box3 {
position: absolute;
overflow: hidden;
background: #010101;
width: 10px;
height: 10px;
top: 560px;
left: 720px;
}
#file_heading_box4 {
position: absolute;
overflow: hidden;
background: #010101;
width: 10px;
height: 10px;
top: 560px;
left: 1300px;
}
console.log("hello world")
var tl = new TimelineMax({onUpdate:updatePercentage});
var tl2 = new TimelineMax();
var tl3 = new TimelineMax();
const controller = new ScrollMagic.Controller();
tl.from('#file_heading1', 5, {x:100, opacity: 0});
tl.to('#file_heading1', 10, {x:0, opacity: 1});
tl.to('#file_heading1', 5, {x:100, opacity: 0});
tl.add(function(){document.getElementById("file_heading1").innerHTML = "SELECTING FILES. . . ";})
tl.to('#file_heading1', 10, {x:100, opacity: 0});
tl.add(function(){document.getElementById("file_heading1").innerHTML = "FILE NUMBER: X-001";})
tl.to('#file_heading1', 5, {x:0, opacity: 1});
tl.to('#file_heading1', 10, {x:0, opacity: 1});
tl.from('#file_heading2', 5, {x:100, opacity: 0});
tl.to('#file_heading2', 10, {x:0, opacity: 1});
tl.from('#file_heading3', 5, {x:100, opacity: 0});
tl.to('#file_heading3', 10, {x:0, opacity: 1});
tl.to('#file_heading3', 5, {x:100, opacity: 0});
tl.add(function(){document.getElementById("file_heading3").innerHTML = "LOADING. . .";})
tl.to('#file_heading3', 10, {x:100, opacity: 0});
tl.add(function(){document.getElementById("file_heading3").innerHTML = "SUCCESSFULLY LOADED";})
tl.to('#file_heading3', 5, {x:0, opacity: 1});
tl.to('#file_heading3', 10, {x:0, opacity: 1});
tl2.from("#fileimg", 1, {x:-500,opacity: 0});
tl2.from("#file_heading_box1", 1, {x:-200,y:-200,opacity: 0},"=-1");
tl2.from("#file_heading_box2", 1, {x:200,y:-200,opacity: 0},"=-1");
tl2.from("#file_heading_box3", 1, {x:-200,y:200,opacity: 0},"=-1");
tl2.from("#file_heading_box4", 1, {x:200,y:200,opacity: 0},"=-1");
tl3.from(".slider1", 1, {y:200,opacity: 0});
tl3.from("#centre_description", 1, {x:-200,y:100,opacity: 0},"=-1");
tl3.from("#centre_description2", 1, {x:-200,y:100,opacity: 0},"=-1");
const scene = new ScrollMagic.Scene({
triggerElement: ".file",
triggerHook: "onLeave",
duration: "100%"
})
.setPin(".file")
.setTween(tl)
.addTo(controller);
const scene2 = new ScrollMagic.Scene({
triggerElement: ".file"
})
.setTween(tl2)
.addTo(controller);
const scene3 = new ScrollMagic.Scene({
triggerElement: ".centre"
})
.setTween(tl3)
.addTo(controller);
function updatePercentage() {
//percent.innerHTML = (tl.progress() *100 ).toFixed();
tl.progress();
}
let counter1 = 1;
let state1 = 0; //0 means can move, other means cannot move
setInterval(function(){
if (state1 == 0){
document.getElementById("radio-btn1_" + counter1).checked = true;
counter1++;
if(counter1 > 9){
counter1=1;
}
}
}, 5000);
function setstate1(checker){
if (checker == state1){
state1 = 0;
console.log("continue");
}
else{
console.log("pressed others");
}
}
document.getElementById("radio-btn1_1").onclick = function(){state1 = 1;counter1 = 1;setTimeout("setstate1(1)", 2000);};
document.getElementById("radio-btn1_2").onclick = function(){state1 = 2;counter1 = 2;setTimeout("setstate1(2)", 2000);};
document.getElementById("radio-btn1_3").onclick = function(){state1 = 3;counter1 = 3;setTimeout("setstate1(3)", 2000);};
document.getElementById("radio-btn1_4").onclick = function(){state1 = 4;counter1 = 4;setTimeout("setstate1(4)", 2000);};
document.getElementById("radio-btn1_5").onclick = function(){state1 = 5;counter1 = 5;setTimeout("setstate1(5)", 2000);};
document.getElementById("radio-btn1_6").onclick = function(){state1 = 6;counter1 = 6;setTimeout("setstate1(6)", 2000);};
document.getElementById("radio-btn1_7").onclick = function(){state1 = 7;counter1 = 7;setTimeout("setstate1(7)", 2000);};
document.getElementById("radio-btn1_8").onclick = function(){state1 = 8;counter1 = 8;setTimeout("setstate1(8)", 2000);};
document.getElementById("radio-btn1_9").onclick = function(){state1 = 9;counter1 = 9;setTimeout("setstate1(9)", 2000);};
setInterval(function(){
for (var i = 1; i < 10; i++){
if(document.getElementById("radio-btn1_" + i).checked == true){
document.getElementById("manual1-btn" + i).style.backgroundColor = "#FC902D";
}
else{
document.getElementById("manual1-btn" + i).style.backgroundColor = "transparent";
}
}
}, 100);