-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
227 lines (227 loc) · 7.82 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Breakbeet</title>
<meta name="description"
content="A silly open-source music visualizer that sizes a 3D model according to the volume of the input audio."/>
<meta property="og:title" content="Breakbeet Music Visualizer"/>
<meta property="og:description"
content="A silly open-source music visualizer that sizes a 3D model according to the volume of the input audio."/>
<meta property="og:image" content="assets/images/beet_og_img.png"/>
<meta property="og:url" content="https://breakbeet.com"/>
<meta property="og:site_name" content="Breakbeet"/>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:image:alt" content="A low-poly beetroot against a plain black background"/>
<link rel="icon" type="image/png" href="assets/images/beet_icon.png"/>
<link rel="stylesheet" href="index.css"/>
</head>
<body>
<nav id="menu">
<div id="settingsMenu">
<h3>Breakbeet Settings</h3>
<div>
<h4>Animation</h4>
<div>
<h5>Model Rotation (RPM)</h5>
<div class="hEqualSpacing">
<div>
<label for="modelInputXRot">X</label>
<input type="number" id="modelInputXRot" value="0" step="any"/>
</div>
<div>
<label for="modelInputYRot">Y</label>
<input type="number" id="modelInputYRot" value="2" step="any"/>
</div>
<div>
<label for="modelInputZRot">Z</label>
<input type="number" id="modelInputZRot" value="0" step="any"/>
</div>
</div>
</div>
<div>
<h5>Scaling Factor (x times)</h5>
<div class="hEqualSpacing">
<div>
<label for="modelHScaleFactor">Horizontal</label>
<input type="number" id="modelHScaleFactor" value="1" step="any"/>
</div>
<div>
<label for="modelVScaleFactor">Vertical</label>
<input type="number" id="modelVScaleFactor" value="1" step="any"/>
</div>
</div>
</div>
<div>
<h5>Frequency Range (Hz)</h5>
<div id="frequencySelection">
<canvas width="172" height="60" id="audioSpectrumCanvas"></canvas>
<label for="sliderHFreqs">Horizontal</label>
<div class="freqSlider">
<div id="sliderHFreqs" ></div>
</div>
<label for="sliderVFreqs">Vertical</label>
<div class="freqSlider">
<div id="sliderVFreqs"></div>
</div>
<style>
.hSliderConnect {background: #C00000}
.vSliderConnect {background: #003FFF}
</style>
</div>
</div>
</div>
<div>
<h4>Lighting</h4>
<div class="hEqualSpacing">
<label for="backgroundColor">Background Colour</label>
<input type="color" id="backgroundColor" value="#000000" />
</div>
<div class="hEqualSpacing">
<label for="lightColor">Light Colour</label>
<input type="color" id="lightColor" value="#404040" />
</div>
<div class="hEqualSpacing">
<label for="lightIntensity">Light Intensity</label>
<input type="number" id="lightIntensity" min="0" value="8" step="any"/>
</div>
<h5>Light Type</h5>
<div class="hEqualSpacing">
<div>
<input type="radio" id="ambient" name="lightType" value="ambient" checked>
<label for="ambient">Flat</label>
</div>
<div>
<input type="radio" id="point" name="lightType" value="point">
<label for="ambient">Point</label>
</div>
<div>
<input type="radio" id="outdoor" name="lightType" value="outdoor">
<label for="ambient">Outdoor</label>
</div>
</div>
<div id="additionalLightSettings">
<div class="lightControl" id="ambientLightControl">
</div>
<div class="lightControl" id="pointLightControl">
<h5>Point Light Position</h5>
<div class="hEqualSpacing">
<div>
<label for="pointLightXPos">X</label>
<input type="number" id="pointLightXPos" value="0" step="any"/>
</div>
<div>
<label for="pointLightYPos">Y</label>
<input type="number" id="pointLightYPos" value="1" step="any"/>
</div>
<div>
<label for="pointLightZPos">Z</label>
<input type="number" id="pointLightZPos" value="5" step="any"/>
</div>
</div>
</div>
<div class="lightControl" id="outdoorLightControl">
<h5>Sun Light Position</h5>
<div class="hEqualSpacing">
<div>
<label for="sunLightXPos">X</label>
<input type="number" id="sunLightXPos" value="0" step="any"/>
</div>
<div>
<label for="sunLightYPos">Y</label>
<input type="number" id="sunLightYPos" value="10" step="any"/>
</div>
<div>
<label for="sunLightZPos">Z</label>
<input type="number" id="sunLightZPos" value="10" step="any"/>
</div>
</div>
<h5>Sun Light Target Coordinate</h5>
<div class="hEqualSpacing">
<div>
<label for="sunLightTargetXPos">X</label>
<input type="number" id="sunLightTargetXPos" value="0" step="any"/>
</div>
<div>
<label for="sunLightTargetYPos">Y</label>
<input type="number" id="sunLightTargetYPos" value="0" step="any"/>
</div>
<div>
<label for="sunLightTargetZPos">Z</label>
<input type="number" id="sunLightTargetZPos" value="0" step="any"/>
</div>
</div>
<div class="hEqualSpacing">
<label for="skyColor">Sky Colour</label>
<input type="color" id="skyColor" value="#808080" />
</div>
<div class="hEqualSpacing">
<label for="groundColor">Ground Colour</label>
<input type="color" id="groundColor" value="#808080" />
</div>
<div class="hEqualSpacing">
<label for="atmosphereIntensity">Atmosphere Intensity</label>
<input type="number" id="atmosphereIntensity" min="0" value="2" step="any"/>
</div>
</div>
</div>
</div>
<div>
<h4>Special</h4>
<div class="hEqualSpacing">
<label for="microphoneButton">Use Microphone</label>
<button type="button" id="micButton">
<img class="iconImg" src="assets/images/mic_icon.svg" />
</button>
</div>
<div>
<label for="audioInputFile">Use Different Audio File</label>
<input type="file" id="audioInputFile" accept="audio/*" />
</div>
<div>
<label for="modelInputFile">Use Different GLB/glTF Model</label>
<input type="file" id="modelInputFile" accept=".glb,.gltf" />
</div>
<div>
<h4>Controls</h4>
<div>
<div class="hEqualSpacing">
<p><b>Play / Pause</b></p> <p>P</p>
</div>
<div class="hEqualSpacing">
<p><b>Rotate</b></p> <p>Left Mouse Button</p>
</div>
<div class="hEqualSpacing">
<p><b>Zoom</b></p> <p>Scroll Wheel</p>
</div>
<div class="hEqualSpacing">
<p><b>Pan</b></p> <p>Right Mouse Button</p>
</div>
</div>
</div>
<div>
<div id="linkSection">
<a href="https://github.com/anthologen/breakbeet"
target="_blank" rel="noopener noreferrer">
<img src="assets/images/GitHub-Mark-32px.png" alt="GitHub Logo"/>
</a>
</div>
</div>
</div>
</div>
</div>
</nav>
<main id="panel">
<div id="viewport"></div>
<div id="controls-container">
<button class="toggle-button">☰</button>
<audio id="audioElement" controls loop>
<source src="assets/audio/amen_break_rendition.mp3" type="audio/mpeg"/>
Your browser does not support the audio element.
</audio>
</div>
</main>
<script src="optionsSlideout.js"></script>
<script src="app.js"></script>
</body>
</html>