Refactor aisle API services: remove createAisleApi, update deleteAisleApi to include versionId, and modify wall asset APIs for consistency in endpoint naming. Enhance floor and wall store functionality with new setters and methods for managing floors and walls, including decal handling. Introduce FloorInstance and FloorInstances components for rendering floor data, and implement FloorCreator for interactive floor creation. Add reference floor visualization with snapping capabilities. Update wall API services for improved error handling and response management.

This commit is contained in:
2025-06-26 17:47:32 +05:30
parent b4745451d2
commit 1e88006780
28 changed files with 1442 additions and 122 deletions

View File

@@ -33,7 +33,7 @@ import * as Types from "../../types/world/worldTypes";
import SocketResponses from "../collaboration/socket/socketResponses.dev";
import FloorPlanGroup from "./groups/floorPlanGroup";
import FloorGroup from "./groups/floorGroup";
// import FloorGroup from "./groups/floorGroup";
import Draw from "./functions/draw";
import WallsAndWallItems from "./groups/wallsAndWallItems";
import Ground from "../scene/environment/ground";
@@ -52,6 +52,7 @@ import AislesGroup from "./aisle/aislesGroup";
import WallGroup from "./wall/wallGroup";
import { useBuilderStore } from "../../store/builder/useBuilderStore";
import { getUserData } from "../../functions/getUserData";
import FloorGroup from "./floor/floorGroup";
export default function Builder() {
const state = useThree<Types.ThreeState>(); // Importing the state from the useThree hook, which contains the scene, camera, and other Three.js elements.
@@ -185,7 +186,7 @@ export default function Builder() {
<Ground grid={grid} plane={plane} />
<Bvh firstHitOnly>
<DistanceText key={toggleView} />
{/* <DistanceText key={toggleView} /> */}
</Bvh>
<ReferenceDistanceText
@@ -207,7 +208,7 @@ export default function Builder() {
/>
</Bvh>
<WallsAndWallItems
{/* <WallsAndWallItems
CSGGroup={CSGGroup}
setSelectedItemsIndex={setSelectedItemsIndex}
selectedItemsIndex={selectedItemsIndex}
@@ -215,16 +216,16 @@ export default function Builder() {
csg={csg}
lines={lines}
hoveredDeletableWallItem={hoveredDeletableWallItem}
/>
/> */}
<Bvh firstHitOnly>
<FloorGroup
{/* <FloorGroup
floorGroup={floorGroup}
lines={lines}
referencePole={referencePole}
hoveredDeletablePillar={hoveredDeletablePillar}
/>
/> */}
<FloorPlanGroup
floorPlanGroup={floorPlanGroup}
@@ -276,7 +277,9 @@ export default function Builder() {
<LayoutImage />
</Bvh>
{/* <WallGroup /> */}
<WallGroup />
<FloorGroup />
</>
);
}