-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
59 lines (59 loc) · 1.7 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
<html>
<head>
<title>Text Shadows Using Shine.js</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,400i,600,700,700i|Roboto');
body{
padding: 0px;
margin: 0px;
font-family: 'Open Sans';
background-color: #f2f2f2;
}
.demo-text {
color: #fcfcfc;
text-transform: uppercase;
text-align: center;
font-size: 200px;
font-weight: bold;
letter-spacing: 4px;
line-height: 4;
}
@media(max-width: 890px){
.demo-text{
font-size: 150px;
}
}
@media(max-width: 670px){
.demo-text{
font-size: 100px;
}
}
@media(max-width: 460px){
.demo-text{
font-size: 75px;
}
}
</style>
</head>
<body>
<h1 id="w3hubs" class="demo-text">W3hubs</h1>
<script src="https://cdnjs.cloudflare.com/ajax/libs/shine.js/0.2.7/shine.min.js" ></script>
<script type="text/javascript">
var shine = new Shine(document.getElementById('w3hubs'));
function update() {
window.requestAnimationFrame(update);
var time = new Date().getTime();
var speed = 0.00025;
var phase = time * speed * 2.0 * Math.PI;
var radiusX = window.innerWidth * 0.5;
var radiusY = window.innerHeight * 0.5;
shine.light.position.x = radiusX + radiusX * Math.cos(phase);
shine.light.position.y = radiusY + radiusY * Math.sin(phase * 0.7);
shine.draw();
}
update();
</script>
</body>
</html>