web: hang 'ban do 3D' (nguon + so o); tu bat lop cloud da quet khi co voxel; ui 2026-09-29a

This commit is contained in:
trung09122002
2026-09-29 14:44:09 +07:00
parent 36db5126c2
commit 0f3e46d83a
2 changed files with 16 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ const MAGIC = 0x314C5356; // 'VSL1' little-endian
// Phien ban ma nguon giao dien. TANG khi doi app.js / app3d.js / style.css.
// Hien ngay tren thanh tren cung de phan biet "chua sua" voi "trinh duyet con
// cache ban cu".
const UI_VERSION = '2026-09-23d';
const UI_VERSION = '2026-09-29a';
// ⚠️ HAI bang mau, mot cho moi khung. Chung KHONG duoc giong nhau.
//
@@ -448,6 +448,15 @@ function onState(s) {
txt('score', fmt(s.slam.score, 2));
txt('pms', fmt(s.slam.process_ms, 0) + ' ms');
txt('mapver', String(s.slam.map_version));
txt('vox', s.slam.voxels_source + ', ' + s.slam.voxel_cells + ' o');
// Lan DAU co voxel thi TU BAT lop "cloud da quet". Tat mac dinh la de khong
// ai tuong hong khi camera_3d tat; co du lieu roi ma van an moi la hong.
// Nguoi dung da tu bam o do thi khong dung vao.
if (s.slam.voxel_cells > 0 && !state.mapCloudAuto) {
state.mapCloudAuto = true;
const cb = document.getElementById('lyMapCloud');
if (cb && !state.mapCloudTouched) cb.checked = true;
}
txt('hzLidar', fmt(s.health.lidar_hz, 1));
txt('hzCam', fmt(s.health.camera_hz, 1));
@@ -1120,6 +1129,9 @@ btnSplit.addEventListener('click', () => {
if (el) el.textContent = 'ui ' + UI_VERSION;
console.log('vslam ui ' + UI_VERSION);
}
document.getElementById('lyMapCloud').addEventListener('change', () => {
state.mapCloudTouched = true;
});
const cv3d = document.getElementById('main3d');
const btn3d = document.getElementById('btn3d');

View File

@@ -108,6 +108,9 @@
<tr><td>diem</td><td id="score">--</td></tr>
<tr><td>process</td><td id="pms">--</td></tr>
<tr><td>map ver</td><td id="mapver">--</td></tr>
<!-- Nguon + so o cua ban do 3D. "0 o" = chua dung duoc; "thieu depth"
= camera khong ra khung. -->
<tr><td>ban do 3D</td><td id="vox">--</td></tr>
</table>
</section>