Add rotator buttons and auto-rotating mirrors

Introduce a new rotator button tile and mirror auto-rotation feature. CSS adds styles for rotator buttons and locked mirror display. JS: add legend entry and rotatorButtons config, track activeRotatorButtons and rotatorIntervals, implement rotateMirrorStep, isMirrorControlledByButton, syncRotatorButtons and stopAllRotatorButtons; wire rotator behavior into traceLaser and loadGrid so rotator buttons activate intervals that rotate target mirrors automatically and lock out manual rotation. Refactor rotateMirror to reuse rotation step logic and ensure rotator intervals are cleared when advancing levels.
This commit is contained in:
Sysy's
2026-03-31 13:11:30 +02:00
parent 64b0e5e770
commit 68b6493e50
2 changed files with 133 additions and 27 deletions

View File

@@ -192,6 +192,14 @@ main {
background-position: center;
}
.button-rotator {
background-color: #DADEEF;
background-image: url("../img/tiles/ButtonProfile.svg"), url("../img/tiles/Tuile.svg");
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center;
}
.button-active {
opacity: 0.7;
}
@@ -292,6 +300,10 @@ main {
justify-content: center;
}
.btn-mirror-locked {
cursor: default;
}
.mirror-img {
width: 80%;
height: 80%;