summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Becker <jeff@i2p.rocks>2019-12-23 09:17:58 -0500
committerJeff Becker <jeff@i2p.rocks>2019-12-23 09:17:58 -0500
commit12cbc3cd75d25c60c18063f4fce0e307afa7f364 (patch)
tree5ae875f8d43f23fd3f3ff252b5065ef2ada05eb4
parent57e109053c7914561d21da1285610d6b9c1228b5 (diff)
yuh
-rw-r--r--docroot/main.js9
-rw-r--r--tmpl/index.html2
2 files changed, 7 insertions, 4 deletions
diff --git a/docroot/main.js b/docroot/main.js
index 6079641..923fea9 100644
--- a/docroot/main.js
+++ b/docroot/main.js
@@ -30,15 +30,17 @@ if(renderer)
var light = new THREE.PointLight(0xffffff);
scene.add(light);
+const imgsrc = "img/alexjones.jpeg";
+
var loader = new THREE.TextureLoader();
-loader.load("img/alexjones.jpeg", function(tex) {
+loader.load(imgsrc, function(tex) {
var geometry = new THREE.BoxBufferGeometry( 1, 1, 1 );
var material = new THREE.MeshBasicMaterial( { map: tex } );
cube = new THREE.Mesh( geometry, material );
scene.add(cube);
});
//skybox
- var skyboxside = THREE.ImageUtils.loadTexture( "img/alexjones.jpeg" );
+ var skyboxside = THREE.ImageUtils.loadTexture( imgsrc );
var materialArray = [];
for (var i = 0; i < 6; i++)
{
@@ -445,10 +447,11 @@ function recalcBPM(state)
interval ++;
interval *= 2;
}
- if(interval > 600.0 || bpm < 80)
+ while(bpm < 80)
{
// too slow
interval /= 2;
+ bpm *= 2;
}
if(interval > 25.0)
{
diff --git a/tmpl/index.html b/tmpl/index.html
index 7239b4c..49280a0 100644
--- a/tmpl/index.html
+++ b/tmpl/index.html
@@ -38,7 +38,7 @@
<div class="controls">
<button onclick="play_the_thingy()">Play/Reset</button>
<button onclick="stop_the_thingy()">STOP</button>
- <input type="hidden" id="music_url" value="/files/mu/ftb_remix.mp3"></input>
+ <input type="hidden" id="music_url" value="/files/mu/bebis.mp3"></input>
<input type="button" value="Select Music" onclick="document.getElementById('music').click();" />