-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
52 lines (52 loc) · 1.93 KB
/
index.html
File metadata and controls
52 lines (52 loc) · 1.93 KB
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
<!DOCTYPE html>
<html>
<body>
<textarea id="log" rows="23" cols="75"></textarea>
<script>
/*JS port of https://www.youtube.com/watch?v=rj7DOPPTkQA c: https://www.dropbox.com/s/79ga2m7p2bnj1ga/donut_deobfuscated.c?dl=0*/
function loop(deltaTimeInMillisecond) {
donut()
window.requestAnimationFrame(loop)
}
let logger = document.getElementById('log')
let A = 0
let B = 0
function donut(){
let b = Array(1760).fill(32)
let z = Array(7040).fill(0)
for(let j=0; j < 6.28; j += 0.07) {
for(let i=0; i < 6.28; i += 0.02) {
let c = Math.sin(i)
let d = Math.cos(j)
let e = Math.sin(A)
let f = Math.sin(j)
let g = Math.cos(A)
let h = d + 2
let D = 1 / (c * h * e + f * g + 5)
let l = Math.cos(i)
let m = Math.cos(B)
let n = Math.sin(B)
let t = c * h * g - f * e
let x = Math.floor(40 + 30 * D * (l * h * m - t * n))
let y = Math.floor(12 + 15 * D * (l * h * n + t * m))
let o = Math.floor(x + 80 * y)
let N = Math.floor(8 * ((f * e - c * d * g) * m - c * d * e - f * g - l * d * n))
if(22 > y && y > 0 && x > 0 && 80 > x && D > z[o]) {
z[o] = D
b[o] = ".,-~:;=!*#$@"[N > 0 ? N : 0]
}
}
}
let ris = ''
for(let k = 0; k < 1761; k++) {
let num = k % 80 ? b[k] : 10
ris += num === 10 ? '\n' : num === 32 ? ' ' : num
A += 0.00004
B += 0.00002
}
logger.innerHTML = ris
}
loop()
</script>
</body>
</html>