Refactor builder module and distance text component; enhance trigger handler with optional materialId

- Updated the builder module to improve code readability and organization by adjusting import statements and restructuring the component.
- Enhanced the distance text component to manage lines more effectively, including the addition of room state management.
- Modified the trigger handler to accept an optional materialId parameter, ensuring more robust handling of triggers across different event types.
- Introduced a new rooms state in the store for better management of room-related data.
This commit is contained in:
2025-05-08 16:56:53 +05:30
parent 12b12d9eb0
commit bb4d649294
5 changed files with 491 additions and 415 deletions

View File

@@ -66,6 +66,11 @@ export const useWalls = create<any>((set: any) => ({
setWalls: (x: any) => set(() => ({ walls: x })),
}));
export const useRoomsState = create<any>((set: any) => ({
roomsState: [],
setRoomsState: (x: any) => set(() => ({ walls: x })),
}));
export const useZones = create<any>((set: any) => ({
zones: [],
setZones: (callback: any) =>