-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
105 lines (87 loc) · 4.84 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Space Bungalow</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="overlay">
<div><h2 class="logo">Space <span>Bungalow</span></h2></div>
<img src="images/planet_icon.png" id="planets" class="buttons">
<div id="container-facts" class="hidden">
<div class="newContent">
</div>
</div>
<div id="intro">
<img src="images/txt/txt_1.png" class="frame" alt="welcome">
<img src="images/txt/txt_2.png" class="frame" alt="Space bungalow">
<img src="images/txt/txt_3.png" class="frame" alt="is a 3D-world made in">
<img src="images/txt/txt_4.png" class="frame" alt="webgl and three.js">
<img src="images/txt/txt_5.png" class="frame" alt="To create a">
<img src="images/txt/txt_6.png" class="frame" alt="solarsystem">
<img src="images/txt/txt_7.png" class="frame" alt="push the icon next to the ">
<img src="images/txt/txt_8.png" class="frame" alt="logo">
<img src="images/txt/txt_9.png" class="frame" alt="pan the camera around on mousedown">
<img src="images/txt/txt_10.png" class="frame" alt="and">
<img src="images/txt/txt_11.png" class="frame" alt="move to">
<img src="images/txt/txt_12.png" class="frame" alt="left">
<img src="images/txt/txt_13.png" class="frame" alt="or">
<img src="images/txt/txt_14.png" class="frame" alt="right">
<img src="images/txt/txt_15.png" class="frame" alt="Now click and discover">
</div>
</div>
<script src="js/three.js"></script>
<script src="js/trackballcontrols.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.17.0/TweenLite.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.17.0/TimelineLite.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.17.0/easing/EasePack.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.17.0/plugins/CSSPlugin.min.js"></script>
<script>
var frameElements = document.getElementsByClassName("frame");
var introKill = document.getElementById("intro");
var icon = document.getElementById("planets");
intro();
function intro(){
var tl = new TimelineLite();
tl.to(frameElements[0], 1,{opacity:1, ease: Power2.easeIn}, "+=3"),
tl.fromTo(frameElements[1], 0.7,{opacity:0}, {opacity:1, ease: Power2.easeInOut}, "+=1"),
tl.to(introKill, .7, {y:-50, ease: Power3.easeOut}, "-=.7"),
tl.fromTo(frameElements[2], 0.5,{opacity:0, x:-30}, {opacity:1, x:0, ease: Power0.easeOut}, "+=.7"),
tl.fromTo(frameElements[3], 0.5,{opacity:0, x:20}, {opacity:1, x:0, ease: Power0.easeOut}, "-=.3"),
tl.to(frameElements[4], 0.5,{opacity:1, ease: Power0.easeOut}, "+=.5"),
tl.fromTo(frameElements[5], 0.5,{width: 0, opacity: 0,},{width: 160, opacity:1, ease: Quad.easeOut}),
tl.to(frameElements[5], 0.3,{width: 125, ease: Quad.easeOut}),
tl.to(frameElements[6], 0.8,{opacity:1, ease: Power0.easeOut}, "+=.7"),
tl.to(frameElements[7], 0.5,{opacity:1, ease: Power0.easeOut}, "+=.3"),
tl.to(frameElements[8], 0.7,{opacity:1, ease: Power0.easeOut}, "+=.7"),
tl.to(frameElements[9], 0.5,{opacity:1, ease: Power0.easeOut}, "-=.7"),
tl.to(frameElements[10], 0.5,{opacity:1, ease: Power0.easeOut}, "+=.3"),
tl.to(introKill, 0.7,{rotationY: "-=90", transformOrigin: "left 50% -200", ease: Power2.easeOut}, "+=.3"),
tl.to(introKill, 0.7,{rotationY: "+=90", transformOrigin: "left 50% -200", ease: Power2.easeOut}),
tl.to(frameElements[11], 0.5,{opacity:1, ease: Power0.easeOut}),
tl.to(frameElements[12], 0.5,{opacity:1, ease: Power0.easeOut}, "+=.3"),
tl.to(introKill, 0.7,{rotationY: "+=90", transformOrigin: "right 50% -200", ease: Power2.easeOut}, "+=.2"),
tl.to(introKill, 0.7,{rotationY: "-=90", transformOrigin: "right 50% -200", ease: Power2.easeOut}),
tl.to(frameElements[13], 0.5,{opacity:1, ease: Power0.easeOut}),
tl.to(frameElements, 0.7,{opacity:0, ease: Power0.easeIn}, "+=1.5"),
tl.to(frameElements[14], 0.7,{opacity:1, ease: Power0.easeOut}, "+=.6"),
tl.to(frameElements[14], 0.7,{opacity:0, scale: 2, ease: Power0.easeIn}, "+=.6"),
tl.to(icon,0.3,{scale:1.2, ease: Quad.easeOut}, "+=1"),
tl.to(icon,0.3,{scale:1, ease: Quad.easeOut}),
tl.to(icon,0.3,{scale:1.2, ease: Quad.easeOut}),
tl.to(icon,0.3,{scale:1, ease: Quad.easeOut}),
tl.to(icon,0.3,{scale:1.2, ease: Quad.easeOut}, "+=.5"),
tl.to(icon,0.3,{scale:1, ease: Quad.easeOut}),
tl.to(icon,0.3,{scale:1.2, ease: Quad.easeOut}),
tl.to(icon,0.3,{scale:1, ease: Quad.easeOut});
}
</script>
<script src="js/skybox.js"></script>
<script src="js/main.js"></script>
<script src="js/createlight.js"></script>
<script src="js/createobject.js"></script>
<script src="js/interaction.js"></script>
</body>
</html>