forked from thelevicole/stripe-gradient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
44 lines (40 loc) · 957 Bytes
/
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Stripe Gradient Animation</title>
<meta name="robots" content="noindex" />
<style>
html,
body {
padding: 0;
margin: 0;
}
canvas#demo {
width: 100vw;
height: 100vh;
}
</style>
</head>
<body>
<div style="padding: 20px">
<canvas style="width: 640px; height: 320px" id="demo"></canvas>
</div>
<script src="./dist/browser.js"></script>
<script>
(function () {
"use strict";
const gradient = new Gradient({
canvas: "canvas#demo",
colors: ["#000000", "#2C387E", "#9196B6", "#21D19F"],
amplitude: 320,
density: [.06, .16],
angle: 0,
});
gradient.init();
console.log({ gradient });
})();
</script>
</body>
</html>