-
Notifications
You must be signed in to change notification settings - Fork 0
/
fireworks.html
26 lines (26 loc) · 965 Bytes
/
fireworks.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Fireworks | JuanFuent.es</title>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<!-- <h1 class="dodge-title">Fireworks</h1> -->
<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 Fireworks from "./js/fireworks/index.js"
const FIRE = new Fireworks(10)
const gui = new dat.GUI()
gui.add(FIRE, 'radio', 1, 10).step(1)
gui.add(FIRE, 'amplitude', 2, 20).step(1)
gui.add(FIRE, 'air', -1, 1).step(.05).onChange(FIRE.update.bind(FIRE))
gui.add(FIRE, 'gravity', -1, 1).step(.05).onChange(FIRE.update.bind(FIRE))
gui.add(FIRE, 'died_steps', 10, 50).step(1)
gui.add(FIRE, 'total_lights', 5, 30).step(1)
</script>
</body>
</html>