This commit is contained in:
juliandescottes 2012-08-29 13:43:36 +02:00
parent b8c59702e9
commit 00c5975c65
2 changed files with 4 additions and 2 deletions

View File

@ -33,7 +33,8 @@
<div class="canvas-background"></div>
</div>
<div>
<label>Preview FPS:</label><input id="preview-fps" type="text" value="12" />
<input id="preview-fps" type="range" min="1" max="24" value="12" style="width:200px;"/>
<span id="fps-value">12 fps</span>
</div>
</div>
</div>

View File

@ -148,7 +148,7 @@
};
var refreshUpdater = startPreviewRefresh();
animFPSTuner.addEventListener('keyup', function(evt) {
animFPSTuner.addEventListener('change', function(evt) {
window.clearInterval(refreshUpdater);
animPreviewFPS = parseInt(animFPSTuner.value, 10);
if(isNaN(animPreviewFPS)) {
@ -167,6 +167,7 @@
animPreviewFPS = 100;
}
animFPSTuner.value = animPreviewFPS;
$("fps-value").innerHTML = animPreviewFPS + " fps";
refreshUpdater = startPreviewRefresh();
});
},