feat: Add toggle for animation to FPV

This commit is contained in:
sthag 2026-03-22 22:21:26 +01:00
parent 65eec5f6bd
commit cc391bc7e4
2 changed files with 32 additions and 4 deletions

View file

@ -15,6 +15,9 @@ tags:
<canvas id="view"></canvas>
<header class="io controls">
<nav>
<button onclick="toggleAnimation()">Toggle</button>
</nav>
<nav>
<span>Color</span>
<button onclick="changeColor('black')">Black</button>
@ -70,6 +73,10 @@ tags:
crosshair.setLineVisible(!crosshair.showConnector);
}
function toggleAnimation() {
crosshair.toggleAnimation();
}
window.addEventListener('resize', () => {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;