Compare commits
2 Commits
16f374d927
...
41fee51a25
Author | SHA1 | Date | |
---|---|---|---|
41fee51a25 | |||
56149d45e2 |
|
@ -159,6 +159,8 @@ progressionSelector.addEventListener('input', (ev) => {
|
||||||
|
|
||||||
let cancelAnim : number | undefined = undefined;
|
let cancelAnim : number | undefined = undefined;
|
||||||
function restartAnimation(startIfPaused: boolean) {
|
function restartAnimation(startIfPaused: boolean) {
|
||||||
|
if (!r.animation) return;
|
||||||
|
|
||||||
if (cancelAnim !== undefined) {
|
if (cancelAnim !== undefined) {
|
||||||
cancelAnimationFrame(cancelAnim);
|
cancelAnimationFrame(cancelAnim);
|
||||||
} else if (!startIfPaused) {
|
} else if (!startIfPaused) {
|
||||||
|
@ -210,6 +212,7 @@ const dialect = {
|
||||||
|
|
||||||
let dance: danceLibrary.ContraDBDance;
|
let dance: danceLibrary.ContraDBDance;
|
||||||
function buildMovesList() {
|
function buildMovesList() {
|
||||||
|
if (!r.animation) return;
|
||||||
removeAllChildNodes(movesList);
|
removeAllChildNodes(movesList);
|
||||||
|
|
||||||
const formation = document.createElement('li');
|
const formation = document.createElement('li');
|
||||||
|
@ -297,6 +300,8 @@ function playAnimation(bpm: number, start: number, end: number) {
|
||||||
const msPerBeat = (60 * 1000) / bpm;
|
const msPerBeat = (60 * 1000) / bpm;
|
||||||
|
|
||||||
function anim() {
|
function anim() {
|
||||||
|
if (!r.animation) return;
|
||||||
|
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
const msElapsed = now - startTime;
|
const msElapsed = now - startTime;
|
||||||
|
|
||||||
|
@ -363,7 +368,7 @@ displaySettingsDiv.appendChild(zoomLabel);
|
||||||
const extraSetsSelector = document.createElement('input');
|
const extraSetsSelector = document.createElement('input');
|
||||||
extraSetsSelector.type = 'number';
|
extraSetsSelector.type = 'number';
|
||||||
extraSetsSelector.min = '0';
|
extraSetsSelector.min = '0';
|
||||||
extraSetsSelector.step = '0.1';
|
extraSetsSelector.step = '0.2';
|
||||||
extraSetsSelector.value = canvasSetting.extraSets!.toPrecision(1);
|
extraSetsSelector.value = canvasSetting.extraSets!.toPrecision(1);
|
||||||
extraSetsSelector.id = 'extraSets';
|
extraSetsSelector.id = 'extraSets';
|
||||||
extraSetsSelector.style.width = '3em';
|
extraSetsSelector.style.width = '3em';
|
||||||
|
@ -381,7 +386,7 @@ displaySettingsDiv.appendChild(extraSetsSelector);
|
||||||
const extraLinesSelector = document.createElement('input');
|
const extraLinesSelector = document.createElement('input');
|
||||||
extraLinesSelector.type = 'number';
|
extraLinesSelector.type = 'number';
|
||||||
extraLinesSelector.min = '0';
|
extraLinesSelector.min = '0';
|
||||||
extraLinesSelector.step = '0.1';
|
extraLinesSelector.step = '0.2';
|
||||||
extraLinesSelector.value = canvasSetting.extraLines!.toPrecision(1);
|
extraLinesSelector.value = canvasSetting.extraLines!.toPrecision(1);
|
||||||
extraLinesSelector.id = 'extraLines';
|
extraLinesSelector.id = 'extraLines';
|
||||||
extraLinesSelector.style.width = '3em';
|
extraLinesSelector.style.width = '3em';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user