-
Notifications
You must be signed in to change notification settings - Fork 0
/
aerosol.html
38 lines (38 loc) · 1.35 KB
/
aerosol.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Aerosol | JuanFuent.es</title>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<link rel="stylesheet" href="css/main.css">
<style>
button {
opacity: 0;
/* background: rgb(40, 0, 0); */
}
</style>
</head>
<body>
<button id="clean-btn">Press any key to clean</button>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.7.5/dat.gui.min.js"></script>
<script src="static/vendor.js"></script>
<script type="module">
import Aerosol from "./js/aerosol.js"
const AERO = new Aerosol({
radio: 35,
amplitude: .42,
died_steps: 25,
total_psts: 3
})
AERO.container.appendChild(AERO.canvas)
AERO.animate()
//
const gui = new dat.GUI()
gui.add(AERO, 'radio', 10, 50).step(1)
gui.add(AERO, 'amplitude', 0, 4).step(.05)
gui.add(AERO, 'died_steps', 2, 30).step(1)
gui.add(AERO, 'composite', ["source-over", "source-in", "source-out", "source-atop", "destination-over", "destination-in", "destination-out", "destination-atop", "lighter", "copy", "xor", "multiply", "overlay", "screen", "darken", "lighten", "difference", "exclusion", "hue", "saturation", "color","color-dodge","color-burn", "hard-light", "soft-light", "luminosity"]).onChange(AERO.clear())
gui.add(AERO, 'total_psts', 2, 6).step(1)
</script>
</body>
</html>