-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathindex.html
79 lines (79 loc) · 2.74 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html>
<head>
<title>WebGL Particles</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="particles.css"/>
<script src="lib/jquery-2.1.1.min.js"></script>
<script src="lib/igloo-0.1.2.js"></script>
<script src="js/particles.js"></script>
<script src="js/controller.js"></script>
<script src="js/fps.js"></script>
<script src="js/main.js"></script>
</head>
<body>
<h1>WebGL Particle Physics</h1>
<canvas id="display" width="800" height="600"></canvas>
<div class="controls">
<div class="particles">
<label>Particles:</label>
<button class="increase">More</button>
<button class="decrease">Fewer</button>
<input class="color" type="color" value="#249EFF"/>
<button class="reset">Reset</button>
<div class="slider">
<label>Diameter:</label>
<input class="size" type="range" min="1" max="16" value="3"/>
</div>
<div class="slider">
<label>Gravity:</label>
<input class="gravity" type="range" step="0.01"
min="0" max="0.5" value="0.05"/>
</div>
<div class="slider">
<label>Wind:</label>
<input class="wind" type="range" step="0.1"
min="-4" max="4" value="0"/>
</div>
<div class="slider">
<label>Restitution:</label>
<input class="restitution" type="range" step="0.05"
min="0" max="1.5" value="0.25"/>
</div>
</div>
<div class="obstacles">
<label>Obstacles:</label>
<input class="color" type="color" value="#735940"/>
<button class="clear">Clear</button>
<div class="slider">
<label>Radius:</label>
<input class="size" type="range" step="2"
min="2" max="128" value="20"/>
</div>
</div>
<div class="snapshot">
<label>Snapshot:</label>
<button class="save">Save</button>
<button class="restore">Restore</button>
</div>
</div>
<div class="description">
<p>
Currently simulating <span class="count">___</span> particles
at <span class="fps">___</span> FPS.
</p>
<p>
This particle physics simulation
is <a href="http://nullprogram.com/blog/2014/06/29/">running
entirely on your GPU</a>. Particle state is stored in a series
of texture objects, updated by off-screen draws. Obstacles,
like your mouse, are represented by a texture of surface
normals, allowing particles to bounce and flow.
</p>
<p>
Try moving your mouse around the display, clicking, and
dragging.
</p>
</div>
</body>
</html>