|
3 | 3 | <head> |
4 | 4 | {{> headers}} |
5 | 5 | <style> |
6 | | - body{ |
| 6 | + body { |
7 | 7 | overflow: hidden; |
8 | 8 | } |
9 | 9 |
|
10 | | - .slider-wrapper{ |
| 10 | + .slider-wrapper { |
11 | 11 | padding: 2rem 4rem; |
12 | 12 | position: absolute; |
13 | 13 | top: 50%; |
|
19 | 19 | flex-direction: column; |
20 | 20 | align-items: center; |
21 | 21 | border-radius: .5rem; |
22 | | - box-shadow: inset 3px 3px 5px rgba(100,100,100,.5); |
| 22 | + box-shadow: inset 3px 3px 5px rgba(100, 100, 100, .5); |
23 | 23 | } |
24 | 24 |
|
25 | | - #inputSlider{ |
| 25 | + #inputSlider { |
26 | 26 | accent-color: #3fada8; |
27 | 27 | } |
28 | 28 |
|
29 | | - #inputSlider{ |
| 29 | + #inputSlider { |
30 | 30 | filter: invert(1); |
31 | 31 | } |
32 | 32 |
|
33 | | - #inputRangeLbl{ |
| 33 | + #inputRangeLbl { |
34 | 34 | color: crimson; |
35 | 35 | } |
36 | 36 | </style> |
|
42 | 42 | <span style="color: #eee">*performance me!</span> |
43 | 43 | </div> |
44 | 44 | <script async> |
45 | | - class RegisteredSexOffender{ |
| 45 | + class RegisteredSexOffender { |
46 | 46 | #timeouts = []; |
47 | 47 | #intervals = []; |
48 | 48 |
|
49 | | - registerInterval(func, ms, ...params){ |
| 49 | + registerInterval(func, ms, ...params) { |
50 | 50 | const id = setInterval(func, ms, ...params); |
51 | 51 | this.#intervals.push(id); |
52 | 52 | return id; |
53 | 53 | } |
54 | 54 |
|
55 | | - registerTimeout(func, ms, ...params){ |
| 55 | + registerTimeout(func, ms, ...params) { |
56 | 56 | const id = setTimeout(func, ms, ...params); |
57 | 57 | this.#timeouts.push(id); |
58 | 58 | return id; |
59 | 59 | } |
60 | 60 |
|
61 | | - reset(){ |
| 61 | + reset() { |
62 | 62 | this.#intervals.map(clearInterval); |
63 | 63 | this.#timeouts.map(clearTimeout); |
64 | 64 | this.#intervals = []; |
|
68 | 68 | </script> |
69 | 69 | <script defer> |
70 | 70 | const timer = new RegisteredSexOffender(); |
71 | | - const slider = document.getElementById('inputSlider'); |
72 | | - const label = document.getElementById('inputRangeLbl'); |
| 71 | + const slider = document.getElementById("inputSlider"); |
| 72 | + const label = document.getElementById("inputRangeLbl"); |
73 | 73 | const N = 30; |
74 | 74 |
|
75 | 75 | const createImg = () => { |
76 | | - const img = document.createElement('img'); |
77 | | - img.classList.add('img-round'); |
| 76 | + const img = document.createElement("img"); |
| 77 | + img.classList.add("img-round"); |
78 | 78 | img.src = "/public/assets/gayGuy.jpg"; |
79 | | - return img |
| 79 | + return img; |
| 80 | + }; |
| 81 | +
|
| 82 | + function _0x5e68(_0x11fe93, _0x146e02) { |
| 83 | + const _0x406e44 = _0x406e(); |
| 84 | + return _0x5e68 = function(_0x5e68c0, _0x1b67a0) { |
| 85 | + _0x5e68c0 = _0x5e68c0 - 0x182; |
| 86 | + let _0xf69e67 = _0x406e44[_0x5e68c0]; |
| 87 | + return _0xf69e67; |
| 88 | + }, _0x5e68(_0x11fe93, _0x146e02); |
80 | 89 | } |
81 | 90 |
|
82 | | -
|
83 | | - const move = img => { |
84 | | - // flag even parts - "{{flag1}}" |
85 | | - const top = img.offsetTop; |
86 | | - const left = img.offsetLeft; |
87 | | -
|
88 | | - const r = 2; |
89 | | -
|
90 | | - const iv = +img.dataset.vector; |
91 | | - const x = r * Math.cos(iv * Math.PI / 90); |
92 | | - const y = r * Math.sin(iv * Math.PI / 90); |
93 | | -
|
94 | | - // flag odd parts - "{{flag2}}" |
95 | | - img.style.top = `${top + y}px`; |
96 | | - img.style.left = `${left + x}px`; |
| 91 | + function _0x406e() { |
| 92 | + const _0x36d935 = [ |
| 93 | + "21HPiOuG", |
| 94 | + "362ANZLoe", |
| 95 | + "12512530UCZuhP", |
| 96 | + "151015kHTQKN", |
| 97 | + "1302036GARBuv", |
| 98 | + "sin", |
| 99 | + "vector", |
| 100 | + "cos", |
| 101 | + "1609329wSeHiM", |
| 102 | + "top", |
| 103 | + "style", |
| 104 | + "offsetTop", |
| 105 | + "left", |
| 106 | + "offsetLeft", |
| 107 | + "14742864HXfOnb", |
| 108 | + "10163GxVTsr", |
| 109 | + "1275210yyneZF", |
| 110 | + "76NhMtdf" |
| 111 | + ]; |
| 112 | + _0x406e = function() {return _0x36d935;}; |
| 113 | + return _0x406e(); |
97 | 114 | } |
98 | 115 |
|
| 116 | + ( |
| 117 | + function(_0x3e1b6b, _0x1afcdd) { |
| 118 | + const _0x506367 = _0x5e68, _0x16d2f5 = _0x3e1b6b(); |
| 119 | + while (!![]) { |
| 120 | + try { |
| 121 | + const _0x25369c = parseInt(_0x506367(0x191)) / 0x1 * ( |
| 122 | + -parseInt(_0x506367(0x183)) / 0x2 |
| 123 | + ) + -parseInt(_0x506367(0x18a)) / 0x3 + parseInt(_0x506367(0x193)) / 0x4 * ( |
| 124 | + -parseInt(_0x506367(0x185)) / 0x5 |
| 125 | + ) + parseInt(_0x506367(0x186)) / 0x6 * ( |
| 126 | + parseInt(_0x506367(0x182)) / 0x7 |
| 127 | + ) + parseInt(_0x506367(0x190)) / 0x8 + parseInt(_0x506367(0x192)) / 0x9 + |
| 128 | + parseInt(_0x506367(0x184)) / 0xa; |
| 129 | + if (_0x25369c === _0x1afcdd) break; else _0x16d2f5["push"](_0x16d2f5["shift"]()); |
| 130 | + } catch (_0x4770e1) { |
| 131 | + _0x16d2f5["push"](_0x16d2f5["shift"]()); |
| 132 | + } |
| 133 | + } |
| 134 | + }(_0x406e, 0xe4c38) |
| 135 | + ); |
| 136 | + const move = _0x36dc38 => { |
| 137 | + // f.l.a.g odd parts - "{{flag2}}" |
| 138 | + const _0xde4e0c = _0x5e68, _0x240636 = _0x36dc38[_0xde4e0c(0x18d)], _0x9d95c8 = _0x36dc38[_0xde4e0c(0x18f)], |
| 139 | + _0x3ababd = 0x2, _0x15e7ab = +_0x36dc38["dataset"][_0xde4e0c(0x188)], |
| 140 | + _0x4465f2 = _0x3ababd * Math[_0xde4e0c(0x189)](_0x15e7ab * Math["PI"] / 0x5a), |
| 141 | + _0x42c578 = _0x3ababd * Math[_0xde4e0c(0x187)](_0x15e7ab * Math["PI"] / 0x5a); |
| 142 | + //f.l.a.g even parts - "{{flag1}}" |
| 143 | + _0x36dc38[_0xde4e0c(0x18c)][_0xde4e0c(0x18b)] = |
| 144 | + _0x240636 + _0x42c578 + "px", _0x36dc38[_0xde4e0c(0x18c)][_0xde4e0c(0x18e)] = _0x9d95c8 + _0x4465f2 + "px"; |
| 145 | + }; |
| 146 | +
|
99 | 147 | const position = (img) => { |
100 | | - const posX =Math.random() * 100 | 0; |
| 148 | + const posX = Math.random() * 100 | 0; |
101 | 149 | const posY = Math.random() * 100 | 0; |
102 | | - img.style.position = 'absolute'; |
| 150 | + img.style.position = "absolute"; |
103 | 151 | img.style.top = `${posY}vh`; |
104 | 152 | img.style.left = `${posX}vw`; |
105 | | - } |
| 153 | + }; |
106 | 154 |
|
107 | 155 | const createCluster = (n = N) => { |
108 | 156 | for (let i = 0; i < n; i++) { |
109 | 157 | const img = createImg(); |
110 | | - img.dataset.vector = (Math.random()*360).toFixed(2); |
| 158 | + img.dataset.vector = ( |
| 159 | + Math.random() * 360 |
| 160 | + ).toFixed(2); |
111 | 161 | position(img); |
112 | 162 | timer.registerTimeout(() => { |
113 | 163 | document.body.prepend(img); |
114 | | - timer.registerInterval(position, 5000, img) |
115 | | - timer.registerInterval(move, 10, img) |
116 | | - }, (1000 / n) * i) |
| 164 | + timer.registerInterval(position, 5000, img); |
| 165 | + timer.registerInterval(move, 10, img); |
| 166 | + }, ( |
| 167 | + 1000 / n |
| 168 | + ) * i); |
117 | 169 | } |
118 | | - } |
| 170 | + }; |
119 | 171 |
|
120 | 172 | createCluster(); |
121 | 173 |
|
|
124 | 176 |
|
125 | 177 | slider.oninput = () => { |
126 | 178 | label.textContent = slider.value; |
127 | | - } |
| 179 | + }; |
128 | 180 |
|
129 | 181 | slider.onchange = () => { |
130 | | - document.querySelectorAll('img').forEach(img => { |
| 182 | + document.querySelectorAll("img").forEach(img => { |
131 | 183 | img.remove(); |
132 | | - }) |
| 184 | + }); |
133 | 185 | timer.reset(); |
134 | | - createCluster(+slider.value) |
135 | | - } |
136 | | -
|
| 186 | + createCluster(+slider.value); |
| 187 | + }; |
137 | 188 |
|
138 | 189 |
|
139 | 190 | </script> |
|
0 commit comments