File tree Expand file tree Collapse file tree 4 files changed +32
-2
lines changed Expand file tree Collapse file tree 4 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 8
8
< link rel ="stylesheet " type ="text/css " href ="main.css ">
9
9
</ head >
10
10
< body >
11
+ < img src ="crit.webp " id ="critImg ">
11
12
< div id ="popup ">
12
13
< div id ="popupText ">
13
14
0
Original file line number Diff line number Diff line change @@ -70,6 +70,14 @@ const eventsTable = [
70
70
clickMe . disabled = true ;
71
71
clickMeText . innerText = `You broke it` ;
72
72
playFart ( critFart ) ;
73
+ critImg . animate ( [
74
+ { opacity : 0 } ,
75
+ { opacity : 1 } ,
76
+ { opacity : 0 }
77
+ ] , {
78
+ duration : 1000 ,
79
+ fill : "forwards"
80
+ } ) ;
73
81
} ,
74
82
} ,
75
83
{
@@ -116,6 +124,7 @@ const eventsTable = [
116
124
{
117
125
onCount : 69 ,
118
126
action : ( ) => {
127
+ // TODO: add this sound here https://www.youtube.com/watch?v=3WAOxKOmR90
119
128
clickMe . disabled = true ;
120
129
clickMeText . innerText = `Nice!` ;
121
130
playFart ( critFart ) ;
@@ -129,7 +138,17 @@ const eventsTable = [
129
138
onCount : 100 ,
130
139
action : ( ) => {
131
140
clickMe . disabled = true ;
132
- setTimeout ( ( ) => clickMe . disabled = false , 3000 ) ;
141
+ setTimeout ( ( ) => {
142
+ clickMe . disabled = false ;
143
+ critImg . animate ( [
144
+ { opacity : 0 } ,
145
+ { opacity : 1 } ,
146
+ { opacity : 0 }
147
+ ] , {
148
+ duration : 1000 ,
149
+ fill : "forwards"
150
+ } ) ;
151
+ } , 3000 ) ;
133
152
clickMeText . innerText = `HERE COMES THE BIG ONE` ;
134
153
playFart ( bigoneFart ) ;
135
154
}
Original file line number Diff line number Diff line change
1
+ body {
2
+ margin : 0 ;
3
+ }
1
4
.center {
2
5
position : absolute;
3
6
left : 50% ;
16
19
user-select : none;
17
20
-webkit-user-select : none;
18
21
}
22
+ # critImg {
23
+ opacity : 0 ;
24
+ position : absolute;
25
+ height : 100% ;
26
+ width : 100% ;
27
+ object-fit : cover;
28
+ }
19
29
# popup {
20
30
visibility : hidden;
21
31
position : absolute;
35
45
}
36
46
.customCursor {
37
47
cursor : url ("peach-emoji.png" ), auto;
38
- }
48
+ }
You can’t perform that action at this time.
0 commit comments