From 0f3e46d83afe66a462501908b86ff27523cf0fb8 Mon Sep 17 00:00:00 2001 From: trung09122002 Date: Tue, 29 Sep 2026 14:44:09 +0700 Subject: [PATCH] web: hang 'ban do 3D' (nguon + so o); tu bat lop cloud da quet khi co voxel; ui 2026-09-29a --- libs/vslam_web/www/app.js | 14 +++++++++++++- libs/vslam_web/www/index.html | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/libs/vslam_web/www/app.js b/libs/vslam_web/www/app.js index de0d92d..6bb0c63 100644 --- a/libs/vslam_web/www/app.js +++ b/libs/vslam_web/www/app.js @@ -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'); diff --git a/libs/vslam_web/www/index.html b/libs/vslam_web/www/index.html index 124b14b..84a87ec 100644 --- a/libs/vslam_web/www/index.html +++ b/libs/vslam_web/www/index.html @@ -108,6 +108,9 @@ diem-- process-- map ver-- + + ban do 3D--