Merge remote-tracking branch 'origin/dev-simulation/human' into main-demo
This commit is contained in:
@@ -84,7 +84,6 @@ const MachineAnimator = ({ currentPhase, handleCallBack, processingTime, machine
|
|||||||
animationFrameId.current = null;
|
animationFrameId.current = null;
|
||||||
handleCallBack();
|
handleCallBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ function MachineInstance({ machineDetail }: { readonly machineDetail: MachineSta
|
|||||||
const { triggerPointActions } = useTriggerHandler();
|
const { triggerPointActions } = useTriggerHandler();
|
||||||
const { speed } = useAnimationPlaySpeed();
|
const { speed } = useAnimationPlaySpeed();
|
||||||
const { isPaused } = usePauseButtonStore();
|
const { isPaused } = usePauseButtonStore();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
isPausedRef.current = isPaused;
|
isPausedRef.current = isPaused;
|
||||||
}, [isPaused]);
|
}, [isPaused]);
|
||||||
@@ -50,6 +51,7 @@ function MachineInstance({ machineDetail }: { readonly machineDetail: MachineSta
|
|||||||
function machineStatus(modelId: string, status: string) {
|
function machineStatus(modelId: string, status: string) {
|
||||||
// console.log(`${modelId} , ${status}`);
|
// console.log(`${modelId} , ${status}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
function animate(currentTime: number) {
|
function animate(currentTime: number) {
|
||||||
if (previousTimeRef.current === null) {
|
if (previousTimeRef.current === null) {
|
||||||
previousTimeRef.current = currentTime;
|
previousTimeRef.current = currentTime;
|
||||||
@@ -130,6 +132,7 @@ function MachineInstance({ machineDetail }: { readonly machineDetail: MachineSta
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
||||||
<MachineAnimator processingTime={machineDetail.point.action.processTime} handleCallBack={handleCallBack} currentPhase={currentPhase} machineUuid={machineDetail.modelUuid} machineStatus={machineStatus} reset={reset} />
|
<MachineAnimator processingTime={machineDetail.point.action.processTime} handleCallBack={handleCallBack} currentPhase={currentPhase} machineUuid={machineDetail.modelUuid} machineStatus={machineStatus} reset={reset} />
|
||||||
|
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import FollowPerson from "../components/templates/FollowPerson";
|
|||||||
import { useLogger } from "../components/ui/log/LoggerContext";
|
import { useLogger } from "../components/ui/log/LoggerContext";
|
||||||
import RenderOverlay from "../components/templates/Overlay";
|
import RenderOverlay from "../components/templates/Overlay";
|
||||||
import LogList from "../components/ui/log/LogList";
|
import LogList from "../components/ui/log/LogList";
|
||||||
import { useToggleStore } from "../store/useUIToggleStore";
|
|
||||||
import { getAllProjects } from "../services/dashboard/getAllProjects";
|
import { getAllProjects } from "../services/dashboard/getAllProjects";
|
||||||
import { viewProject } from "../services/dashboard/viewProject";
|
import { viewProject } from "../services/dashboard/viewProject";
|
||||||
import ComparisonSceneProvider from "../components/layout/scenes/ComparisonSceneProvider";
|
import ComparisonSceneProvider from "../components/layout/scenes/ComparisonSceneProvider";
|
||||||
@@ -30,11 +29,9 @@ import { handleCanvasCursors } from "../utils/mouseUtils/handleCanvasCursors";
|
|||||||
const Project: React.FC = () => {
|
const Project: React.FC = () => {
|
||||||
let navigate = useNavigate();
|
let navigate = useNavigate();
|
||||||
const echo = useLogger();
|
const echo = useLogger();
|
||||||
const { setToggleUI } = useToggleStore();
|
|
||||||
const { setActiveModule } = useModuleStore();
|
const { setActiveModule } = useModuleStore();
|
||||||
const { setUserName } = useUserName();
|
const { setUserName } = useUserName();
|
||||||
const { setOrganization } = useOrganization();
|
const { setOrganization } = useOrganization();
|
||||||
const { isVersionSaved } = useSaveVersion();
|
|
||||||
const { projectId } = useParams();
|
const { projectId } = useParams();
|
||||||
const { setProjectName } = useProjectName();
|
const { setProjectName } = useProjectName();
|
||||||
const { userId, email, organization, userName } = getUserData();
|
const { userId, email, organization, userName } = getUserData();
|
||||||
@@ -98,13 +95,6 @@ const Project: React.FC = () => {
|
|||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [projectId]);
|
}, [projectId]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (!isVersionSaved) {
|
|
||||||
setToggleUI(true, true);
|
|
||||||
}
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
}, [isVersionSaved]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setActiveModule("builder");
|
setActiveModule("builder");
|
||||||
if (email) {
|
if (email) {
|
||||||
|
|||||||
@@ -95,10 +95,15 @@ const KeyPressListener: React.FC = () => {
|
|||||||
const toggleTo2D = toggleView;
|
const toggleTo2D = toggleView;
|
||||||
setToggleView(!toggleTo2D);
|
setToggleView(!toggleTo2D);
|
||||||
setToggleThreeD(toggleTo2D);
|
setToggleThreeD(toggleTo2D);
|
||||||
setToggleUI(toggleTo2D, toggleTo2D);
|
|
||||||
if (toggleTo2D) {
|
if (toggleTo2D) {
|
||||||
setSelectedWallItem(null);
|
setSelectedWallItem(null);
|
||||||
setAddAction(null);
|
setAddAction(null);
|
||||||
|
setToggleUI(
|
||||||
|
localStorage.getItem("navBarUiLeft") !== "false",
|
||||||
|
localStorage.getItem("navBarUiRight") !== "false"
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
setToggleUI(false, false);
|
||||||
}
|
}
|
||||||
setActiveTool("cursor");
|
setActiveTool("cursor");
|
||||||
setActiveSubTool("cursor");
|
setActiveSubTool("cursor");
|
||||||
|
|||||||
Reference in New Issue
Block a user