blob: 1a8dea9b6ee0c6d25fb4bf039a334576ed2e57e8 (
plain)
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
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<title>Starfield demo</title>
<script src="stars.js"></script>
<style>
body,
html{
margin: 0;
padding: 0;
background-color: #000;
min-height: 100vh;
min-width: 100%;
}
*{
box-sizing: border-box;
}
.canvas-container{
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
margin: 0;
padding: 0;
overflow: hidden;
}
#stars{
position: absolute;
margin: 0;
padding: 0;
bottom: 0;
}
</style>
<script>
window.addEventListener("load", function(){
var curr_url = new URL(window.location.href);
var color = curr_url.searchParams.get("color");
color = color == null ? true : color == "true";
warpLaunch({
'max_particles': 1500,
'speed': 70,
'step': 10,
'interactive': true,
'color': color,
});
});
</script>
</head>
<body>
<div class="canvas-container">
<canvas id="stars"></canvas>
</div>
</body>
</html>
|