Refactor: Remove deprecated API endpoints and implement new zone management features

- Deleted obsolete API files for wall items, layers, lines, and points.
- Introduced new zone management APIs including create, delete, and update functionalities.
- Enhanced zone state management in the store with new properties for height and color.
- Implemented 2D and 3D zone rendering components for better visualization.
- Added asset fetching functionalities for marketplace integration.
- Updated types to accommodate new zone properties and API responses.
This commit is contained in:
2025-06-27 17:51:57 +05:30
parent 812a4f6aef
commit fa6506c0be
46 changed files with 1301 additions and 1301 deletions

View File

@@ -24,6 +24,11 @@ interface BuilderState {
sideMaterial: string;
topMaterial: string;
// Zone Settings
selectedZone: Object3D | null;
zoneHeight: number;
zoneColor: string;
// Decal Settings
selectedDecal: Object3D | null;
@@ -59,6 +64,11 @@ interface BuilderState {
setBevelStrength: (strength: number) => void;
setFloorMaterial: (material: string, side: 'side' | 'top') => void;
// Setters - Zone
setSelectedZone: (zone: Object3D | null) => void;
setZoneHeight: (height: number) => void;
setZoneColor: (color: string) => void;
// Setters - Decal
setSelectedDecal: (decal: Object3D | null) => void;
@@ -103,6 +113,10 @@ export const useBuilderStore = create<BuilderState>()(
sideMaterial: 'Material 1',
topMaterial: 'Default Material',
selectedZone: null,
zoneHeight: 7,
zoneColor: 'blue',
selectedDecal: null,
selectedAisle: null,
@@ -201,6 +215,26 @@ export const useBuilderStore = create<BuilderState>()(
});
},
// === Setters: Zone ===
setSelectedZone: (zone: Object3D | null) => {
set((state) => {
state.selectedZone = zone;
});
},
setZoneHeight: (height: number) => {
set((state) => {
state.zoneHeight = height;
});
},
setZoneColor: (color: string) => {
set((state) => {
state.zoneColor = color;
});
},
// === Setters: Decal ===
setSelectedDecal: (decal: Object3D | null) => {