-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
161 lines (131 loc) · 6.58 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<html>
<head>
<title>Excalibur Particle Tester</title>
<link rel="stylesheet" type="text/css" href="main.css">
<link href='http://fonts.googleapis.com/css?family=Press+Start+2P' rel='stylesheet' type='text/css'>
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="stylesheet" href="prism.css">
</head>
<body>
<div class="surface">
<div class="particle-controls">
<h1>Excalibur:Particle Tester</h1>
<hr>
<div class="control">
<label for="emit">Emit Rate (p/s)</label>
<input type="range" id="emit" min="0" max="1000" step="1" data-bind="value: emitRate">
<input type="text" data-bind="value: emitRate, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="typeSelect">Emitter Type</label>
<select id="typeSelect" data-bind="options: emitterTypes, optionsText: 'name', value: emitterType"></select>
</div>
<div class="control">
<label for="radius">Radius (pixels)</label>
<input type="range" id="radius" min="0" max="1000" step="1" data-bind="value: radius">
<input type="text" data-bind="value: radius, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="width">Width</label>
<input type="range" id="width" min="0" max="10000" step="1" data-bind="value: width">
<input type="text" data-bind="value: width, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="height">Height</label>
<input type="range" id="height" min="0" max="10000" step="1" data-bind="value: height">
<input type="text" data-bind="value: height, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="minVel">MinVel</label>
<input type="range" id="minVel" min="0" max="1000" data-bind="value: minVel">
<input type="text" data-bind="value: minVel, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="maxVel">MaxVel</label>
<input type="range" id="maxVel" min="0" max="1000" data-bind="value: maxVel">
<input type="text" data-bind="value: maxVel, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="minAngle">MinAngle</label>
<input type="range" id="minAngle" min="0" max="6.28" step=".1" data-bind="value: minAngle">
<input type="text" data-bind="value: minAngle, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="maxAngle">MaxAngle</label>
<input type="range" id="maxAngle" min="0" max="6.28" step=".1" data-bind="value: maxAngle">
<input type="text" data-bind="value: maxAngle, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="minSize">Min Size</label>
<input type="range" id="minSize" min="1" max="200" step="1" data-bind="value: minSize">
<input type="text" data-bind="value: minSize, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="maxSize">Max Size</label>
<input type="range" id="maxSize" min="1" max="200" step="1" data-bind="value: maxSize">
<input type="text" data-bind="value: maxSize, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="startSize">Start Size</label>
<input type="range" id="startSize" min="0" max="200" step="1" data-bind="value: startSize">
<input type="text" data-bind="value: startSize, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="endSize">End Size</label>
<input type="range" id="endSize" min="0" max="200" step="1" data-bind="value: endSize">
<input type="text" data-bind="value: endSize, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="ax">Accel X</label>
<input type="range" id="ax" min="-2000" max="2000" step="1" data-bind="value: ax">
<input type="text" data-bind="value: ax, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="ay">Accel Y</label>
<input type="range" id="ay" min="-2000" max="2000" step="1" data-bind="value: ay">
<input type="text" data-bind="value: ay, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="life">Life (ms)</label>
<input type="range" id="life" min="1" max="7000" step="1" data-bind="value: particleLife">
<input type="text" data-bind="value: particleLife, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="opacity">Opacity</label>
<input type="range" id="opacity" min="0" max="1" step=".01" data-bind="value: opacity">
<input type="text" data-bind="value: opacity, valueUpdate: 'input'"></input>
</div>
<div class="control">
<label for="fade">Fade Out</label>
<input type="checkbox" id="fade" data-bind="checked: fade">
</div>
<div class="control">
<label for="beginColorSelect">Begin Color</label>
<select id="beginColorSelect" data-bind="
style: { backgroundColor: beginColor().color, color: beginColor().inverted },
options: colors,
optionsText: 'name',
value: beginColor,
optionsAfterRender: setOptionBackground"></select>
</div>
<div class="control">
<label for="endColorSelect">End Color</label>
<select id="endColorSelect" data-bind="
style: { backgroundColor: endColor().color, color: beginColor().inverted },
options: colors,
optionsText: 'name',
value: endColor,
optionsAfterRender: setOptionBackground"></select>
</div>
<hr>
<div class="code">
<button data-bind="click: copyToClipboard" id="copy-to-clipboard">Copy</button>
<pre><code class="language-ts" data-bind="text:code"></code></pre>
</div>
</div>
<canvas id="game"></canvas>
</div>
<script type="module" src="prism.js"></script>
<script type="module" src="main.ts"></script>
</body>
</html>