Skip to content

Commit

Permalink
update screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
neo896 committed Dec 27, 2023
1 parent 5db950d commit eb99da5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
Binary file modified screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshot_zh.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 21 additions & 20 deletions src/components/Viewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,28 +193,29 @@ const Viewer = () => {
}, [sensorList]);

useMemo(() => {
for (let i = 0; i < pcdList.length; i++) {
if (pcdList[i].path.length === 0) {
continue;
}
let pcdViewTmp = [];
const pcd = useLoader(PCDLoader, pcdList[i].path);
const material = new THREE.MeshBasicMaterial({ color: pcdList[i].color });
const pcdM4 = sensorMatrix[pcdList[i].name];
pcdViewTmp.push(
<primitive
object={pcd}
scale={[0.1, 0.1, 0.1]}
matrixAutoUpdate={false}
material={material}
matrix={pcdM4}
key={i}
/>
);
setPcdView(pcdViewTmp);
}
if (pcdList.length === 0) {
setPcdView([]);
} else {
let pcdViewTmp = [];
for (let i = 0; i < pcdList.length; i++) {
if (pcdList[i].path.length === 0) {
continue;
}
const pcd = useLoader(PCDLoader, pcdList[i].path);
const material = new THREE.MeshBasicMaterial({ color: pcdList[i].color });
const pcdM4 = sensorMatrix[pcdList[i].name];
pcdViewTmp.push(
<primitive
object={pcd}
scale={[0.1, 0.1, 0.1]}
matrixAutoUpdate={false}
material={material}
matrix={pcdM4}
key={i}
/>
);
setPcdView(pcdViewTmp);
}
}
}, [pcdList]);

Expand Down

0 comments on commit eb99da5

Please sign in to comment.