update
This commit is contained in:
@@ -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-23a';
|
||||
const UI_VERSION = '2026-09-23d';
|
||||
|
||||
// ⚠️ HAI bang mau, mot cho moi khung. Chung KHONG duoc giong nhau.
|
||||
//
|
||||
@@ -722,6 +722,16 @@ function updateSlamLabel() {
|
||||
labR.textContent = 'SLAM TAT -- chay lai voi --slam';
|
||||
return;
|
||||
}
|
||||
// Che do 3D|3D: khung phai la DAM MAY, khong phai luoi 2D -- dem o cua dam
|
||||
// may moi la con so noi len no dang dung toi dau.
|
||||
if (split3d) {
|
||||
const v = state.voxels;
|
||||
labR.textContent = v && v.set.size
|
||||
? 'SLAM 3D ' + v.set.size.toLocaleString() + ' o @ ' + v.res.toFixed(2) + ' m' +
|
||||
(v.syncing ? ' (dang tai...)' : '')
|
||||
: 'SLAM 3D (chua co diem -- can camera_3d: true va lai them)';
|
||||
return;
|
||||
}
|
||||
const m = state.map;
|
||||
labR.textContent = m
|
||||
? 'SLAM ' + state.slamMode + ' ' + (m.w * m.res).toFixed(1) + ' x ' +
|
||||
@@ -747,6 +757,10 @@ function draw() {
|
||||
updateSlamLabel();
|
||||
drawScene(cvR, ctxR, state.map, state.mapImage, state.pose, true, 'lyMap',
|
||||
PALETTE.slam);
|
||||
} else if (split3d) {
|
||||
// Khong co canvas thu hai o che do nay: draw3d() da ve ca hai nua. Chi
|
||||
// con cap nhat nhan.
|
||||
updateSlamLabel();
|
||||
}
|
||||
requestAnimationFrame(draw);
|
||||
return;
|
||||
@@ -1030,23 +1044,51 @@ connect();
|
||||
const btnSplit = document.getElementById('btnSplit');
|
||||
const labR = document.getElementById('labR');
|
||||
const wrap = document.querySelector('.canvas-wrap');
|
||||
// Hai co, KHONG phai mot: chung la hai LAYOUT khac han nhau.
|
||||
// split -> khung phai la canvas 2D that (#mainR)
|
||||
// split3d -> mot canvas 3D duy nhat, tu cat lam doi bang scissor
|
||||
let split = false;
|
||||
let split3d = false;
|
||||
|
||||
function applySplitMode() {
|
||||
wrap.classList.toggle('split', split);
|
||||
wrap.classList.toggle('split3d', split3d);
|
||||
const chia = split || split3d;
|
||||
document.getElementById('labL').style.display = chia ? '' : 'none';
|
||||
labR.style.display = chia ? '' : 'none';
|
||||
btnSplit.textContent = split ? 'chia doi 3D' : (split3d ? 'mot khung' : 'chia doi');
|
||||
btnSplit.title = split
|
||||
? 'Bam nua: khung phai thanh DAM MAY 3D do SLAM quet ra'
|
||||
: (split3d ? 'Bam nua: ve mot khung'
|
||||
: 'Hai khung: THE GIOI (de lai) va SLAM (de xem ban do dang dung)');
|
||||
}
|
||||
|
||||
// Nut xoay vong BA kieu thay vi bat/tat:
|
||||
// tat -> the gioi | ban do 2D -> the gioi | dam may 3D -> tat
|
||||
//
|
||||
// Kieu thu hai giu nguyen vi code cu goi no la "to hop huu ich nhat khi dang
|
||||
// quet". Kieu thu ba la de NHIN ban do 3D dung len theo thoi gian thuc, canh
|
||||
// chinh cai the gioi that -- do la cau hoi khac: khong phai "quet toi dau" ma
|
||||
// "quet ra co giong that khong".
|
||||
btnSplit.addEventListener('click', () => {
|
||||
if (!state.worldMap) {
|
||||
// Khong co su that de doi chieu -- chay that, khong phai mo phong.
|
||||
btnSplit.textContent = 'khong co su that';
|
||||
setTimeout(() => { btnSplit.textContent = 'chia doi'; }, 1800);
|
||||
setTimeout(applySplitMode, 1800);
|
||||
return;
|
||||
}
|
||||
split = !split;
|
||||
wrap.classList.toggle('split', split);
|
||||
document.getElementById('labL').style.display = split ? '' : 'none';
|
||||
labR.style.display = split ? '' : 'none';
|
||||
btnSplit.textContent = split ? 'mot khung' : 'chia doi';
|
||||
// 3D va chia doi KHONG loai tru nhau: `.split.three` cho ra
|
||||
// trai = the gioi 3D (Gazebo) | phai = ban do SLAM 2D (RViz)
|
||||
// -- dung to hop huu ich nhat khi dang quet.
|
||||
if (!split && !split3d) {
|
||||
split = true;
|
||||
} else if (split) {
|
||||
split = false;
|
||||
split3d = true;
|
||||
// Kieu nay VO NGHIA o 2D. Tu bat 3D thay vi de nguoi dung bam mot nut
|
||||
// khong lam gi ca -- dung cach cac nut goc nhin dang lam.
|
||||
setThreeD(true);
|
||||
} else {
|
||||
split3d = false;
|
||||
}
|
||||
applySplitMode();
|
||||
});
|
||||
|
||||
{
|
||||
@@ -1104,6 +1146,14 @@ function setThreeD(on) {
|
||||
// stylesheet -- dung cai bay da lam khung phai den xi mot lan.
|
||||
wrap.classList.toggle('three', use3d);
|
||||
btn3d.textContent = use3d ? '2D' : '3D';
|
||||
// Tat 3D thi kieu chia doi 3D|3D khong con cho dua: canvas 3D ngung duoc ve
|
||||
// nhung CSS van cho no hien, nen man hinh se dong bang o khung hinh cuoi
|
||||
// cung. Roi ve kieu chia doi thuong.
|
||||
if (!use3d && split3d) {
|
||||
split3d = false;
|
||||
split = true;
|
||||
applySplitMode();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1184,10 +1234,10 @@ function draw3d() {
|
||||
|
||||
// SLAM: lop phu tren san, hien DAN khi quet -- day la phan "RViz". O chua
|
||||
// quet trong suot nen tuong 3D van nhin xuyen qua.
|
||||
// VOXEL: "cai gi dung tren san", bu cho tam phang cua v3dSetMap ("da quet
|
||||
// toi dau"). Hai lop khong tranh nhau: tam phang o y = -0.002, voxel bat
|
||||
// dau tu z_min = 0.05.
|
||||
v3dSetVoxels(state.voxels, on('lyVoxel'));
|
||||
// Dam may DA QUET: nhung gi camera nhin thay, giu lai va nan theo pose toi
|
||||
// uu. Bu cho tam phang cua v3dSetMap ("da quet toi dau"); hai lop khong
|
||||
// tranh nhau vi tam phang o y = -0.002 con dam may bat dau tu z_min = 0.05.
|
||||
v3dSetMapCloud(state.voxels, on('lyMapCloud'));
|
||||
|
||||
if (state.map && on('lyMap')) {
|
||||
v3dSetMap({ ...state.map, data: state.map.cells, version: state.mapVersion });
|
||||
@@ -1196,7 +1246,7 @@ function draw3d() {
|
||||
if (on('lyPath')) v3dSetPath(state.path);
|
||||
else if (V3D.pathLine) V3D.pathLine.visible = false;
|
||||
|
||||
v3dRender(cv3d, on('lyFollow'));
|
||||
v3dRender(cv3d, on('lyFollow'), split3d);
|
||||
}
|
||||
|
||||
requestAnimationFrame(draw);
|
||||
|
||||
@@ -24,7 +24,7 @@ const V3D = {
|
||||
ready: false,
|
||||
scene: null, camera: null, renderer: null, root: null,
|
||||
robotGroup: null, scanPts: null, cloudPts: null, mapMesh: null,
|
||||
voxelMesh: null, voxelCap: 0, voxelEpoch: -1,
|
||||
mapCloud: null, mapCloudCap: 0, mapCloudRes: 0,
|
||||
worldMesh: null, worldKey: null,
|
||||
meshWorld: null, // nhom mesh THAT doc tu .world; co thi khong dung khoi hop
|
||||
gtGroup: null, pathLine: null,
|
||||
@@ -497,91 +497,98 @@ function v3dSetCloud(arr, pose) {
|
||||
V3D.cloudPts.geometry.setAttribute('color', new THREE.BufferAttribute(col, 3));
|
||||
}
|
||||
|
||||
// --- Ban do voxel 3D -------------------------------------------------------
|
||||
// --- Ban do 3D da quet (dam may diem tich luy) -----------------------------
|
||||
//
|
||||
// Nguon: SLAM, khong phai bo mo phong. Day la "cai gi dung tren san" do chinh
|
||||
// robot do duoc, bu cho tam phang cua v3dSetMap ("da quet toi dau").
|
||||
// Nguon: SLAM, khong phai bo mo phong. Day la nhung gi CHINH CON ROBOT quet
|
||||
// duoc, giu lai va nan theo pose da toi uu -- phan "RViz" that su, bu cho tam
|
||||
// phang cua v3dSetMap ("da quet toi dau").
|
||||
//
|
||||
// Ba cho CO Y khac v3dSetWorld va v3dSetCloud, moi cho vi mot ly do:
|
||||
// VE BANG DIEM, khong phai bang hop. Du lieu ben duoi van la tap voxel (do la
|
||||
// cach khu trung lap va giu bang thong), nhung mot khoi hop 5-10 cm nhin ra
|
||||
// Minecraft chu khong ra mot ban quet. Diem cho dung cam giac cua dam may
|
||||
// camera, va dung bang mau voi lop cloud truc tiep nen hai thu doc nhu mot.
|
||||
//
|
||||
// 1. Dung lai theo NOI DUNG (`v.dirty`), khong theo kich thuoc. v3dSetWorld
|
||||
// cache theo `w x h @ ox,oy` -- dung cho mot ban do TINH, sai hoan toan o
|
||||
// day vi tap voxel doi lien tuc trong khi bao ngoai dung yen.
|
||||
// Ba cho CO Y khac v3dSetCloud (dam may TRUC TIEP, mot khung):
|
||||
//
|
||||
// 2. KHONG dispose/dung lai hinh moi khung nhu v3dSetCloud. InstancedMesh co
|
||||
// so luong co dinh, nen cap phat du `capacity` roi chi doi `count`. O
|
||||
// 100k the thi kieu cua cloud khong song noi.
|
||||
// 1. Dung lai theo NOI DUNG (`v.dirty`), khong phai moi khung. Tap nay doi
|
||||
// toi da ~4 lan/giay chu khong 8-10, va no to gap tram lan.
|
||||
//
|
||||
// 3. KHONG do bong. v3dSetWorld bat ca castShadow lan receiveShadow; nem
|
||||
// 100k the vao shadow map 2048^2 la mat frame rate. Dung "sua" lai.
|
||||
function v3dSetVoxels(v, visible) {
|
||||
// 2. Cap phat theo CAPACITY roi dung setDrawRange, khong dispose/dung lai
|
||||
// BufferGeometry moi lan. v3dSetCloud lam vay voi 2000 diem thi khong sao;
|
||||
// o 100k diem do la 1.2 MB rac moi lan cap nhat.
|
||||
//
|
||||
// 3. Toa do la TUYET DOI trong frame map -- khong nhan pose. Dam may truc
|
||||
// tiep nam o base_footprint nen phai xoay theo robot; tap nay da o he ban
|
||||
// do tu luc xuat.
|
||||
function v3dSetMapCloud(v, visible) {
|
||||
if (!V3D.ready) return;
|
||||
if (!v || !visible || v.set.size === 0) {
|
||||
if (V3D.voxelMesh) V3D.voxelMesh.visible = false;
|
||||
if (V3D.mapCloud) V3D.mapCloud.visible = false;
|
||||
return;
|
||||
}
|
||||
|
||||
const n = v.set.size;
|
||||
const needNew = !V3D.voxelMesh || n > V3D.voxelCap ||
|
||||
(V3D.voxelMesh && V3D.voxelRes !== v.res);
|
||||
const needNew = !V3D.mapCloud || n > V3D.mapCloudCap || V3D.mapCloudRes !== v.res;
|
||||
if (needNew) {
|
||||
if (V3D.voxelMesh) {
|
||||
V3D.root.remove(V3D.voxelMesh);
|
||||
V3D.voxelMesh.geometry.dispose();
|
||||
V3D.voxelMesh.material.dispose();
|
||||
if (V3D.mapCloud) {
|
||||
V3D.root.remove(V3D.mapCloud);
|
||||
V3D.mapCloud.geometry.dispose();
|
||||
V3D.mapCloud.material.dispose();
|
||||
}
|
||||
// Cap phat du de lon them mot doan ma khong phai cap phat lai moi khung.
|
||||
let cap = 1024;
|
||||
let cap = 4096;
|
||||
while (cap < Math.ceil(n * 1.5)) cap *= 2;
|
||||
const geo = new THREE.BoxGeometry(v.res, v.res, v.res);
|
||||
const mat = new THREE.MeshStandardMaterial({ roughness: 0.9, metalness: 0.0 });
|
||||
V3D.voxelMesh = new THREE.InstancedMesh(geo, mat, cap);
|
||||
// Bounding sphere cua InstancedMesh lay tu hinh GOC (mot hop 0.1 m), nen
|
||||
// de mac dinh thi three.js cull ca ban do ngay khi goc toa do ra khoi khung.
|
||||
V3D.voxelMesh.frustumCulled = false;
|
||||
V3D.voxelMesh.castShadow = false;
|
||||
V3D.voxelMesh.receiveShadow = false;
|
||||
V3D.voxelCap = cap;
|
||||
V3D.voxelRes = v.res;
|
||||
V3D.root.add(V3D.voxelMesh);
|
||||
v.dirty = true; // hinh moi -> phai do lai du lieu
|
||||
const geo = new THREE.BufferGeometry();
|
||||
geo.setAttribute('position', new THREE.BufferAttribute(new Float32Array(cap * 3), 3));
|
||||
geo.setAttribute('color', new THREE.BufferAttribute(new Float32Array(cap * 3), 3));
|
||||
// Co diem theo do phan giai: o 0.05 m thi 0.04 cho ra mot mat lien chu
|
||||
// khong phai mot ram cham roi rac.
|
||||
const mat = new THREE.PointsMaterial({ size: v.res * 0.8, vertexColors: true });
|
||||
V3D.mapCloud = new THREE.Points(geo, mat);
|
||||
// Bounding sphere tinh tu capacity con thua (toan so 0 o goc), nen cull se
|
||||
// sai. Tap nay trai ca toa nha, cull no khong tiet kiem duoc gi.
|
||||
V3D.mapCloud.frustumCulled = false;
|
||||
V3D.mapCloudCap = cap;
|
||||
V3D.mapCloudRes = v.res;
|
||||
V3D.root.add(V3D.mapCloud);
|
||||
v.dirty = true; // bo dem moi -> phai do lai
|
||||
}
|
||||
|
||||
V3D.voxelMesh.visible = true;
|
||||
V3D.mapCloud.visible = true;
|
||||
if (!v.dirty) return;
|
||||
v.dirty = false;
|
||||
|
||||
const m4 = new THREE.Matrix4();
|
||||
const col = new THREE.Color();
|
||||
const pos = V3D.mapCloud.geometry.attributes.position.array;
|
||||
const col = V3D.mapCloud.geometry.attributes.color.array;
|
||||
const half = v.res * 0.5;
|
||||
let i = 0;
|
||||
for (const key of v.set) {
|
||||
// Giai khoa tai cho: goi voxelUnpack() 100k lan moi lan dung lai la
|
||||
// 100k mang tam.
|
||||
// Giai khoa TAI CHO: goi voxelUnpack() 100k lan la 100k mang tam.
|
||||
const z = (key % 65536) - 32768;
|
||||
const k1 = (key - (z + 32768)) / 65536;
|
||||
const y = (k1 % 65536) - 32768;
|
||||
const x = (k1 - (y + 32768)) / 65536 - 32768;
|
||||
|
||||
// Tam o, khong phai goc o. ROS (x, y, z) -> three (x, z, -y) -- giong
|
||||
// toScene(), nhung noi thang vao day: toScene() cap phat mot Vector3 moi
|
||||
// lan goi, va 100k lan cap phat moi lan dung lai la mot con bao GC.
|
||||
// Tam o. ROS (x, y, z) -> three (x, z, -y), noi thang thay vi goi
|
||||
// toScene(): ham do cap phat mot Vector3 moi lan.
|
||||
const wx = v.ox + x * v.res + half;
|
||||
const wy = v.oy + y * v.res + half;
|
||||
const wz = v.oz + z * v.res + half;
|
||||
m4.makeTranslation(wx, wz, -wy);
|
||||
V3D.voxelMesh.setMatrixAt(i, m4);
|
||||
const b = i * 3;
|
||||
pos[b] = wx;
|
||||
pos[b + 1] = wz;
|
||||
pos[b + 2] = -wy;
|
||||
|
||||
// Cung thang mau voi point cloud, gian ra toi 2 m: hai lop phai doc nhu
|
||||
// mot he, khong phai hai he mau canh nhau.
|
||||
// Cung thang mau voi lop cloud truc tiep (v3dSetCloud), gian ra toi 2 m.
|
||||
const t = Math.max(0, Math.min(1, wz / 2.0));
|
||||
col.setRGB((80 + 175 * t) / 255, (200 - 90 * t) / 255, (120 + 60 * t) / 255);
|
||||
V3D.voxelMesh.setColorAt(i, col);
|
||||
col[b] = (80 + 175 * t) / 255;
|
||||
col[b + 1] = (200 - 90 * t) / 255;
|
||||
col[b + 2] = (120 + 60 * t) / 255;
|
||||
++i;
|
||||
}
|
||||
V3D.voxelMesh.count = i;
|
||||
V3D.voxelMesh.instanceMatrix.needsUpdate = true;
|
||||
if (V3D.voxelMesh.instanceColor) V3D.voxelMesh.instanceColor.needsUpdate = true;
|
||||
|
||||
V3D.mapCloud.geometry.setDrawRange(0, i);
|
||||
V3D.mapCloud.geometry.attributes.position.needsUpdate = true;
|
||||
V3D.mapCloud.geometry.attributes.color.needsUpdate = true;
|
||||
}
|
||||
|
||||
// The gioi 3D: o BI CHIEM -> hop, dung nhu Gazebo dung tuong tu ban do.
|
||||
@@ -939,12 +946,27 @@ function v3dSetOverlays(on) {
|
||||
});
|
||||
}
|
||||
|
||||
function v3dRender(canvas, follow) {
|
||||
// `splitSlam` = ve HAI viewport trong cung mot canvas:
|
||||
// trai = canh nhu dang co (the gioi + moi thu, theo lop nguoi dung chon)
|
||||
// phai = CHI nhung gi SLAM dung ra (the gioi bi ep an)
|
||||
//
|
||||
// Mot renderer, hai lan render, cat bang scissor -- KHONG mo WebGLRenderer thu
|
||||
// hai. Hai GL context tren cung mot trang la gap doi bo nho texture va mot
|
||||
// nguon loi "context lost" kinh dien tren Jetson.
|
||||
//
|
||||
// Camera dung CHUNG co y: hai khung cung goc nhin thi moi doi chieu duoc "ngoai
|
||||
// doi cho nay co cai ban, SLAM quet ra gi". Lech goc la mat ca y nghia.
|
||||
function v3dRender(canvas, follow, splitSlam) {
|
||||
if (!V3D.ready) return;
|
||||
const w = canvas.clientWidth, h = canvas.clientHeight;
|
||||
if (canvas.width !== w || canvas.height !== h) {
|
||||
V3D.renderer.setSize(w, h, false);
|
||||
V3D.camera.aspect = w / Math.max(1, h);
|
||||
}
|
||||
// Ti le khung hinh tinh theo NUA chieu rong khi chia doi, khong thi hinh bi
|
||||
// keo ngang o ca hai ben.
|
||||
const aspect = (splitSlam ? w / 2 : w) / Math.max(1, h);
|
||||
if (V3D.camera.aspect !== aspect) {
|
||||
V3D.camera.aspect = aspect;
|
||||
V3D.camera.updateProjectionMatrix();
|
||||
}
|
||||
|
||||
@@ -960,5 +982,50 @@ function v3dRender(canvas, follow) {
|
||||
o.dist * Math.sin(o.el),
|
||||
cz + o.dist * Math.cos(o.el) * Math.sin(o.az));
|
||||
V3D.camera.lookAt(cx, 0.2, cz);
|
||||
V3D.renderer.render(V3D.scene, V3D.camera);
|
||||
|
||||
const r = V3D.renderer;
|
||||
if (!splitSlam) {
|
||||
r.setScissorTest(false);
|
||||
r.setViewport(0, 0, w, h);
|
||||
r.render(V3D.scene, V3D.camera);
|
||||
return;
|
||||
}
|
||||
|
||||
const half = Math.floor(w / 2);
|
||||
r.setScissorTest(true);
|
||||
|
||||
// Hai nua an hai thu KHAC NHAU, va phep an nay chi la MOT CHIEU: no tat bot,
|
||||
// khong bao gio bat len. Nguoi dung tick lop nao thi lop do moi co cua de
|
||||
// hien -- khong dung v3dSetWorldVisible()/visible=true o day, vi mot cai
|
||||
// `= true` se lam nut tick tren thanh cong cu thanh noi doi.
|
||||
const hide = (list) => {
|
||||
const hid = [];
|
||||
for (const o of list) {
|
||||
if (o && o.visible) { o.visible = false; hid.push(o); }
|
||||
}
|
||||
return hid;
|
||||
};
|
||||
const show = (hid) => { for (const o of hid) o.visible = true; };
|
||||
|
||||
// --- Nua TRAI: THE GIOI, khong co dau ra cua SLAM ---
|
||||
//
|
||||
// Dam may da quet va tam ban do SLAM deu bi tat o day. Chung la thu SLAM
|
||||
// DUNG RA; de chung chong len su that thi khung trai het tra loi duoc cau
|
||||
// hoi cua no ("ngoai doi cho nay co gi"), va bat lop `cloud da quet` se thay
|
||||
// no sang o CA HAI ben -- dung cai da bi bao la sai.
|
||||
let hid = hide([V3D.mapCloud, V3D.mapMesh]);
|
||||
r.setViewport(0, 0, half, h);
|
||||
r.setScissor(0, 0, half, h);
|
||||
r.render(V3D.scene, V3D.camera);
|
||||
show(hid);
|
||||
|
||||
// --- Nua PHAI: chi SLAM, khong co the gioi ---
|
||||
hid = hide([V3D.meshWorld, V3D.worldMesh]);
|
||||
r.setViewport(half, 0, w - half, h);
|
||||
r.setScissor(half, 0, w - half, h);
|
||||
r.render(V3D.scene, V3D.camera);
|
||||
show(hid);
|
||||
|
||||
r.setScissorTest(false);
|
||||
r.setViewport(0, 0, w, h);
|
||||
}
|
||||
|
||||
@@ -11,10 +11,11 @@
|
||||
<div class="layers">
|
||||
<label><input type="checkbox" id="lyWorld" checked> the gioi</label>
|
||||
<label><input type="checkbox" id="lyMap" checked> map SLAM</label>
|
||||
<!-- Ban do voxel 3D. TAT mac dinh: no chi co du lieu khi slam.yaml dat
|
||||
camera_3d: true, va bat san se lam nguoi dung tuong tinh nang hong
|
||||
trong khi that ra no dang tat o cau hinh. -->
|
||||
<label><input type="checkbox" id="lyVoxel"> voxel 3D</label>
|
||||
<!-- Dam may DA QUET (tich luy, nan theo pose toi uu) -- khac lop `cloud`
|
||||
ben duoi von chi la MOT khung truc tiep. TAT mac dinh: no chi co du
|
||||
lieu khi slam.yaml dat camera_3d: true, va bat san se lam nguoi dung
|
||||
tuong tinh nang hong trong khi that ra no dang tat o cau hinh. -->
|
||||
<label><input type="checkbox" id="lyMapCloud"> cloud da quet</label>
|
||||
<label><input type="checkbox" id="lyScan" checked> scan</label>
|
||||
<label><input type="checkbox" id="lyCloud" checked> cloud</label>
|
||||
<label><input type="checkbox" id="lyPath" checked> path</label>
|
||||
|
||||
@@ -152,7 +152,9 @@ button.danger:hover { background: var(--bad); color: #fff; }
|
||||
(khong gi) : #main -- 2D mot khung
|
||||
.three : #main3d -- 3D mot khung
|
||||
.split : #main | #mainR -- 2D | 2D
|
||||
.split.three : #main3d | #mainR -- 3D (Gazebo) | 2D SLAM (RViz) */
|
||||
.split.three : #main3d | #mainR -- 3D (Gazebo) | 2D SLAM (RViz)
|
||||
.split3d : #main3d mot minh, tu cat lam doi bang scissor
|
||||
-- 3D the gioi | 3D dam may SLAM */
|
||||
#mainR, #main3d { display: none; }
|
||||
.canvas-wrap.three #main { display: none; }
|
||||
.canvas-wrap.three #main3d { display: block; }
|
||||
@@ -162,6 +164,17 @@ button.danger:hover { background: var(--bad); color: #fff; }
|
||||
.canvas-wrap.split #mainR { display: block; position: absolute;
|
||||
right: 0; top: 0; width: 50%; height: 100%;
|
||||
border-left: 1px solid #2a3442; }
|
||||
/* Chia doi 3D|3D: KHONG co canvas thu hai. `#main3d` chiem ca be ngang va
|
||||
`v3dRender()` ve hai lan vao hai nua bang scissor. Duong ke giua la CSS chu
|
||||
khong phai mot border cua the, vi khong co the nao o day ma vien. */
|
||||
.canvas-wrap.split3d #main { display: none; }
|
||||
.canvas-wrap.split3d #mainR { display: none; }
|
||||
.canvas-wrap.split3d #main3d { display: block; width: 100%; }
|
||||
.canvas-wrap.split3d::after {
|
||||
content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
|
||||
width: 1px; background: #2a3442; pointer-events: none;
|
||||
}
|
||||
|
||||
.pane-label {
|
||||
position: absolute; top: 6px;
|
||||
font: 11px/1.4 ui-monospace, monospace;
|
||||
|
||||
Reference in New Issue
Block a user