Skip to content

Commit ef66eb5

Browse files
authored
Add files via upload
0 parents  commit ef66eb5

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

index.html

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<html>
2+
<head>
3+
<title>Text Shadows Using Shine.js</title>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<style type="text/css">
7+
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,400i,600,700,700i|Roboto');
8+
body{
9+
padding: 0px;
10+
margin: 0px;
11+
font-family: 'Open Sans';
12+
background-color: #f2f2f2;
13+
}
14+
.demo-text {
15+
color: #fcfcfc;
16+
text-transform: uppercase;
17+
text-align: center;
18+
font-size: 200px;
19+
font-weight: bold;
20+
letter-spacing: 4px;
21+
line-height: 4;
22+
}
23+
@media(max-width: 890px){
24+
.demo-text{
25+
font-size: 150px;
26+
}
27+
}
28+
@media(max-width: 670px){
29+
.demo-text{
30+
font-size: 100px;
31+
}
32+
}
33+
@media(max-width: 460px){
34+
.demo-text{
35+
font-size: 75px;
36+
}
37+
}
38+
</style>
39+
</head>
40+
<body>
41+
<h1 id="w3hubs" class="demo-text">W3hubs</h1>
42+
<script src="https://cdnjs.cloudflare.com/ajax/libs/shine.js/0.2.7/shine.min.js" ></script>
43+
<script type="text/javascript">
44+
var shine = new Shine(document.getElementById('w3hubs'));
45+
function update() {
46+
window.requestAnimationFrame(update);
47+
var time = new Date().getTime();
48+
var speed = 0.00025;
49+
var phase = time * speed * 2.0 * Math.PI;
50+
var radiusX = window.innerWidth * 0.5;
51+
var radiusY = window.innerHeight * 0.5;
52+
shine.light.position.x = radiusX + radiusX * Math.cos(phase);
53+
shine.light.position.y = radiusY + radiusY * Math.sin(phase * 0.7);
54+
shine.draw();
55+
}
56+
update();
57+
</script>
58+
</body>
59+
</html>

0 commit comments

Comments
 (0)