-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathprogressbar.html
49 lines (39 loc) · 1.38 KB
/
progressbar.html
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
<!doctype html>
<html lang="en">
<head>
<title>Playground</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/hud.css">
<link rel="stylesheet" type="text/css" href="css/loadingScreen.css">
<meta name="og:type" content="website" />
<meta name="og:image" content="http://weiserhei.github.io/threejs-experiments/goblintest/ogimage.jpg"/>
<meta name="og:title" content="Physic playground" />
<meta name="og:description" content="Three.js + Goblin.js testbed" />
<meta name="og:url" content="http://weiserhei.github.io/threejs-experiments/goblintest/"/>
</head>
<body oncontextmenu="return false;">
<div id="loading-container">
<progress id="prog" value="0.0" max = "1"></progress>
<p id="progressText" class="progressText">0%</p>
<p class="sub">12/22</p>
<!--
<progress id="" value="0.5"></progress>
<p class="progressText">50%</p>
<p class="sub">12/22</p> -->
</div>
<script>
var bar = document.getElementById("prog");
var pT = document.getElementById("progressText");
var percent = 0;
setInterval( function() {
if ( percent < 1 ) {
bar.value = percent;
pT.textContent = Math.round( percent * 100 ) + "%";
percent += 0.1;
}
}, 300 );
</script>
</body>
</html>