added wall asset visiblity toggle and code optimization

This commit is contained in:
2025-08-23 12:26:45 +05:30
parent 8b01372d08
commit 21cd12b518
15 changed files with 172 additions and 89 deletions

View File

@@ -17,7 +17,7 @@ import { useSceneContext } from "../../../../../../modules/scene/sceneContext";
import { useParams } from "react-router-dom";
function HumanMechanics() {
const [activeOption, setActiveOption] = useState<"worker" | "manufacturer" | "operator">("worker");
const [activeOption, setActiveOption] = useState<"worker" | "manufacturer" | "operator" | "assembler">("worker");
const [speed, setSpeed] = useState("0.5");
const [loadCount, setLoadCount] = useState(0);
const [manufactureCount, setManufactureCount] = useState(0);
@@ -118,7 +118,7 @@ function HumanMechanics() {
const handleSelectActionType = (actionType: string) => {
if (!selectedAction.actionId || !currentAction || !selectedPointData) return;
const updatedAction = { ...currentAction, actionType: actionType as "worker" | "manufacturer" | "operator" };
const updatedAction = { ...currentAction, actionType: actionType as "worker" | "manufacturer" | "operator" | "assembler" };
const updatedActions = selectedPointData.actions.map(action => action.actionUuid === updatedAction.actionUuid ? updatedAction : action);
const updatedPoint = { ...selectedPointData, actions: updatedActions };
@@ -306,6 +306,11 @@ function HumanMechanics() {
actionName: `Action ${selectedPointData.actions.length + 1}`,
actionType: "worker",
loadCount: 1,
assemblyCount: 1,
assemblyCondition: {
conditionType: 'material',
materialType: "Default material"
},
manufactureCount: 1,
loadCapacity: 1,
processTime: 10,