Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
57 lines (53 loc) · 1.24 KB

File metadata and controls

57 lines (53 loc) · 1.24 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
<html>
<head>
<meta charset="utf-8">
<title>Threading Example</title>
<style>
.loading-emoji {
font-size: 60px;
width: 60px;
height: 80px;
}
</style>
<script>
function rotateElement(element, speed = 2) {
let degree = 0;
setInterval(() => {
degree = (degree + speed) % 360;
element.style.transform = `rotate(${degree}deg)`;
}, 20);
}
document.addEventListener('DOMContentLoaded', () => {
const loadingCircle = document.getElementById('loading-emoji');
rotateElement(loadingCircle);
});
</script>
</head>
<body>
<script type="module">
import { init } from "./Bundle/index.js"
init();
</script>
<h1>Threading Example</h1>
<p>
<div>
<label for="background">Background:</label>
<input id="background" type="checkbox" checked>
</div>
<div>
<label for="size">Size:</label>
<input id="size" type="number" value="800">
</div>
<div>
<label for="concurrency">Concurrency:</label>
<input id="concurrency" type="number">
<button id="render-button">Render</button>
</div>
</p>
<p>
<div id="loading-emoji" class="loading-emoji">🧵</div>
</p>
<p id="render-time"></p>
<canvas id="canvas"></canvas>
</body>
</html>
Morty Proxy This is a proxified and sanitized view of the page, visit original site.