feat: Refactor swap handling and enhance delay management in conveyor actions
This commit is contained in:
@@ -36,7 +36,7 @@ type MaterialsStore = {
|
||||
setIsRendered: (materialId: string, isRendered: boolean) => MaterialSchema | undefined;
|
||||
|
||||
getMaterialById: (materialId: string) => MaterialSchema | undefined;
|
||||
getMaterialByCurrentModelUuid: (currentModelUuid: string) => MaterialSchema | undefined;
|
||||
getMaterialsByCurrentModelUuid: (currentModelUuid: string) => MaterialSchema[] | undefined;
|
||||
getMaterialByCurrentPointUuid: (currentPointUuid: string) => MaterialSchema | undefined;
|
||||
getMaterialsByPoint: (pointUuid: string) => MaterialSchema[];
|
||||
getMaterialsByModel: (modelUuid: string) => MaterialSchema[];
|
||||
@@ -207,11 +207,11 @@ export const useMaterialStore = create<MaterialsStore>()(
|
||||
getMaterialById: (materialId) => {
|
||||
return get().materials.find(m => m.materialId === materialId);
|
||||
},
|
||||
|
||||
getMaterialByCurrentModelUuid: (currentModelUuid) => {
|
||||
return get().materials.find(m => m.current?.modelUuid === currentModelUuid);
|
||||
|
||||
getMaterialsByCurrentModelUuid: (currentModelUuid) => {
|
||||
return get().materials.filter(m => m.current?.modelUuid === currentModelUuid);
|
||||
},
|
||||
|
||||
|
||||
getMaterialByCurrentPointUuid: (currentPointlUuid) => {
|
||||
return get().materials.find(m => m.current?.pointUuid === currentPointlUuid);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user