forked from roumodip/rabbit-and-dog-game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
78 lines (58 loc) · 1.91 KB
/
index.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Rabitt vs Dog</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
<link rel="stylesheet" href="./scss/style.css">
</head>
<body>
<div id="world" />
<div id="gameoverInstructions">
Game Over
</div>
<div id="dist">
<div class="label">distance</div>
<div id="distValue">000</div>
</div>
<!-- preloader -->
<div id="preloader">
<div class="image"><img src="./Screenshot_2022-10-02-00-29-34-36_99c04817c0de5652397fc8b56c3b3817.jpg" alt=""></div>
<div class="loadtext">Hello there!</div>
</div>
<!-- preloader-end -->
<div id="instructions">Click to jump<span class="lightInstructions"> — Grab the carrots / avoid the hedgehogs</span>
</div>
<div id="credits">
<h1> Created By Kunal Sen</h1>
</div>
<script src='https://cdnjs.cloudflare.com/ajax/libs/three.js/r80/three.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/gsap/1.19.0/TweenMax.min.js'></script>
<script src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/264161/OrbitControls.js'></script>
<script src="./script.js"></script>
<script>
var preloader = document.querySelector('#preloader');
var instructions = document.querySelector('#instructions');
var loadtext = document.querySelector('.loadtext');
var h1 = document.querySelector('h1');
var preimage = document.querySelector('.image');
setTimeout(() => {
loadtext.style.opacity = 1;
loadtext.style.filter = "blur(0px)";
}, 100);
setTimeout(() => {
preimage.style.opacity = 1;
preimage.style.filter = "blur(0px)";
}, 1);
setTimeout(() => {
h1.style.opacity = 1;
}, 300);
setTimeout(() => {
instructions.style.opacity = 1;
}, 1500);
setTimeout(() => {
preloader.style.opacity = 0;
}, 3000);
</script>
</body>
</html>