cleared consoles
This commit is contained in:
parent
3953b1813f
commit
6e925a995c
|
@ -13,8 +13,8 @@ interface NavMesh {
|
|||
raw: RawNavMesh;
|
||||
}
|
||||
export default function Agv({ lines, plane }: any) {
|
||||
console.log("planes: ", plane);
|
||||
console.log("lines: ", lines);
|
||||
|
||||
|
||||
const { scene } = useThree();
|
||||
const groupRef = useRef<THREE.Group | null>(null);
|
||||
const [navMesh, setNavMesh] = useState<RecastNavMesh | null>(null);
|
||||
|
|
|
@ -12,6 +12,9 @@ type Point = {
|
|||
type LineData = {
|
||||
type: string;
|
||||
line: Point[];
|
||||
_id: {};
|
||||
layer: number;
|
||||
__v: number;
|
||||
};
|
||||
|
||||
type PolygonGeneratorProps = {
|
||||
|
@ -28,23 +31,8 @@ export default function PolygonGenerator({
|
|||
plane,
|
||||
}: PolygonGeneratorProps) {
|
||||
const { scene } = useThree();
|
||||
console.log(
|
||||
"lines: ",
|
||||
lines.current.map((val: any) => val)
|
||||
);
|
||||
console.log("planes: ", plane);
|
||||
// console.log("storedFloorItems: ", lines);
|
||||
|
||||
useEffect(() => {
|
||||
if (!groupRef?.current) return;
|
||||
// const groundGeometry = new THREE.BoxGeometry(80, 1, 60);
|
||||
// const groundMaterial = new THREE.MeshBasicMaterial({ color: "#99ff99" });
|
||||
// const groundMesh = new THREE.Mesh(groundGeometry, groundMaterial);
|
||||
// groundMesh.position.set(-10, -0.5, 3);
|
||||
// groundMesh.name = "GroundMesh";
|
||||
groupRef.current.add(plane);
|
||||
scene.add(groupRef.current);
|
||||
}, [groupRef, scene]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (!processPoint) return;
|
||||
|
@ -113,7 +101,7 @@ export default function PolygonGenerator({
|
|||
mesh.position.set((minX + maxX) / 2, height / 2, (minZ + maxZ) / 2);
|
||||
|
||||
groupRef?.current?.add(mesh);
|
||||
scene.add(groupRef.current!);
|
||||
// scene.add(groupRef.current!);
|
||||
};
|
||||
|
||||
const renderWallGeometry = (
|
||||
|
@ -152,7 +140,7 @@ export default function PolygonGenerator({
|
|||
wallMesh.quaternion.copy(quaternion);
|
||||
|
||||
groupRef?.current?.add(wallMesh);
|
||||
scene.add(groupRef.current!);
|
||||
// scene.add(groupRef.current!);
|
||||
|
||||
const lineGeometry = new THREE.BufferGeometry().setFromPoints([
|
||||
start,
|
||||
|
|
Loading…
Reference in New Issue