| 172 | } |
| 173 | |
| 174 | updateProgress(data) { |
| 175 | if (data.alignScore !== undefined) { |
| 176 | const alignPercent = Math.round(data.alignScore * 100); |
| 177 | document.getElementById('align-progress').style.width = `${alignPercent}%`; |
| 178 | this.progressElement.querySelector('.progress-value').textContent = `${alignPercent}%`; |
| 179 | } |
| 180 | |
| 181 | if (data.distanceScore !== undefined) { |
| 182 | const distPercent = Math.round(data.distanceScore * 100); |
| 183 | document.getElementById('distance-progress').style.width = `${distPercent}%`; |
| 184 | this.progressElement.querySelectorAll('.progress-value')[1].textContent = `${distPercent}%`; |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | updateDataPanel(data) { |
| 189 | document.getElementById('fps-value').textContent = Math.round(this.fps); |