feat(simulation): optimize and persist collision viewing

This commit is contained in:
DCCONSTRUCTIONS
2026-08-26 15:18:34 +03:00
parent 5e97fa293f
commit a65ae9c285
13 changed files with 662 additions and 65 deletions
@@ -78,6 +78,12 @@ export function SimulationWorkspace() {
setEditing(null);
};
const acceptViewerProject = useCallback((project: SimulationProject) => {
setProjects((current) => current.map((item) => (
item.projectId === project.projectId ? project : item
)));
}, []);
const confirmDelete = async () => {
if (!deleting) return;
await deleteSimulationProject(deleting.projectId);
@@ -122,7 +128,10 @@ export function SimulationWorkspace() {
</StatusBadge>
</header>
{selected.status === "ready" && selected.worldManifest ? (
<SimulationViewport project={selected} />
<SimulationViewport
project={selected}
onProjectChange={acceptViewerProject}
/>
) : (
<GlassSurface className="simulation-workspace__processing" padding="lg">
{selected.status === "failed" ? <Icon name="alert" size={20} /> : <ActivityIndicator label="Сборка мира" />}