Refactor wall creator and socket responses; update nav mesh components and remove unused pillar functions
- Updated import path for getClosestIntersection in wallCreator.tsx - Cleaned up socketResponses.dev.tsx by removing unused imports and code, simplifying the component structure - Modified navMesh.tsx to remove lines prop and adjust NavMeshDetails accordingly - Refactored navMeshDetails.tsx to remove lines dependency in useEffect - Updated polygonGenerator.tsx to remove lines prop and commented out unused code - Added getClosestIntersection helper function for better modularity - Removed unused pillar-related functions and commented out code in addAndUpdateReferencePillar.ts, addPillar.ts, deletableHoveredPillar.ts, deletePillar.ts, and updateReferencePolesheight.ts
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
// import * as THREE from 'three';
|
||||
|
||||
// import * as Types from "../../../../types/world/worldTypes";
|
||||
|
||||
// function updateReferencePolesheight(
|
||||
// intersectionPoint: Types.Vector3,
|
||||
// distance: Types.Number,
|
||||
// referencePole: Types.RefMesh,
|
||||
// floorGroup: Types.RefGroup
|
||||
// ): void {
|
||||
|
||||
// ////////// Add a Reference Pillar and update its position and scale based on the pointer interaction //////////
|
||||
|
||||
// if (referencePole.current) {
|
||||
// (<any>referencePole.current.material).dispose();
|
||||
// (<any>referencePole.current.geometry).dispose();
|
||||
// floorGroup.current.remove(referencePole.current);
|
||||
// referencePole.current.geometry.dispose();
|
||||
// }
|
||||
|
||||
// const shape = new THREE.Shape();
|
||||
// shape.moveTo(0.5, 0);
|
||||
// shape.absarc(0, 0, 0.5, 0, 2 * Math.PI, false);
|
||||
|
||||
// const extrudeSettings = {
|
||||
// depth: distance,
|
||||
// bevelEnabled: false,
|
||||
// };
|
||||
|
||||
// const geometry = new THREE.ExtrudeGeometry(shape, extrudeSettings);
|
||||
// const material = new THREE.MeshBasicMaterial({ color: "green", transparent: true, opacity: 0.5 });
|
||||
// referencePole.current = new THREE.Mesh(geometry, material);
|
||||
// referencePole.current.rotateX(Math.PI / 2);
|
||||
// referencePole.current.position.set(intersectionPoint.x, intersectionPoint.y - 0.01, intersectionPoint.z);
|
||||
// referencePole.current.userData = { geometry: geometry, distance: distance, position: { x: intersectionPoint.x, y: intersectionPoint.y - 0.01, z: intersectionPoint.z } };
|
||||
|
||||
// floorGroup.current.add(referencePole.current);
|
||||
// }
|
||||
|
||||
// export default updateReferencePolesheight;
|
||||
Reference in New Issue
Block a user