added backend connection for conveyor and vehicle mechanics

This commit is contained in:
2025-04-04 16:57:18 +05:30
parent e1892b0b00
commit cf6946750b
24 changed files with 595 additions and 280 deletions

View File

@@ -19,7 +19,7 @@
// const updatedPaths = simulationPaths.map((path) => ({
// ...path,
// points: path.points.map((point) => {
// if (point.uuid === selectedActionSphere.point.uuid) {
// if (point.uuid === selectedActionSphere.points.uuid) {
// const actionIndex = point.actions.length;
// const newAction = {
// uuid: THREE.MathUtils.generateUUID(),
@@ -46,7 +46,7 @@
// const updatedPaths = simulationPaths.map((path) => ({
// ...path,
// points: path.points.map((point) =>
// point.uuid === selectedActionSphere.point.uuid
// point.uuid === selectedActionSphere.points.uuid
// ? { ...point, actions: point.actions.filter(action => action.uuid !== uuid) }
// : point
// ),
@@ -61,7 +61,7 @@
// const updatedPaths = simulationPaths.map((path) => ({
// ...path,
// points: path.points.map((point) =>
// point.uuid === selectedActionSphere.point.uuid
// point.uuid === selectedActionSphere.points.uuid
// ? {
// ...point,
// actions: point.actions.map((action) =>
@@ -81,7 +81,7 @@
// const updatedPaths = simulationPaths.map((path) => ({
// ...path,
// points: path.points.map((point) =>
// point.uuid === selectedActionSphere.point.uuid
// point.uuid === selectedActionSphere.points.uuid
// ? {
// ...point,
// actions: point.actions.map((action) =>
@@ -101,7 +101,7 @@
// const updatedPaths = simulationPaths.map((path) => ({
// ...path,
// points: path.points.map((point) =>
// point.uuid === selectedActionSphere.point.uuid
// point.uuid === selectedActionSphere.points.uuid
// ? {
// ...point,
// actions: point.actions.map((action) =>
@@ -121,7 +121,7 @@
// const updatedPaths = simulationPaths.map((path) => ({
// ...path,
// points: path.points.map((point) =>
// point.uuid === selectedActionSphere.point.uuid
// point.uuid === selectedActionSphere.points.uuid
// ? {
// ...point,
// actions: point.actions.map((action) =>
@@ -152,7 +152,7 @@
// const updatedPaths = simulationPaths.map((path) => ({
// ...path,
// points: path.points.map((point) => {
// if (point.uuid === selectedActionSphere.point.uuid) {
// if (point.uuid === selectedActionSphere.points.uuid) {
// const triggerIndex = point.triggers.length;
// const newTrigger = {
// uuid: THREE.MathUtils.generateUUID(),
@@ -176,7 +176,7 @@
// const updatedPaths = simulationPaths.map((path) => ({
// ...path,
// points: path.points.map((point) =>
// point.uuid === selectedActionSphere.point.uuid
// point.uuid === selectedActionSphere.points.uuid
// ? { ...point, triggers: point.triggers.filter(trigger => trigger.uuid !== uuid) }
// : point
// ),
@@ -191,7 +191,7 @@
// const updatedPaths = simulationPaths.map((path) => ({
// ...path,
// points: path.points.map((point) =>
// point.uuid === selectedActionSphere.point.uuid
// point.uuid === selectedActionSphere.points.uuid
// ? {
// ...point,
// triggers: point.triggers.map((trigger) =>
@@ -217,7 +217,7 @@
// const updatedPaths = simulationPaths.map((path) => ({
// ...path,
// points: path.points.map((point) =>
// point.uuid === selectedActionSphere.point.uuid
// point.uuid === selectedActionSphere.points.uuid
// ? {
// ...point,
// actions: point.actions.map((action) => ({
@@ -238,7 +238,7 @@
// const updatedPaths = simulationPaths.map((path) => ({
// ...path,
// points: path.points.map((point) =>
// point.uuid === selectedActionSphere.point.uuid
// point.uuid === selectedActionSphere.points.uuid
// ? {
// ...point,
// triggers: point.triggers.map((trigger) => ({
@@ -255,7 +255,7 @@
// const selectedPoint = useMemo(() => {
// if (!selectedActionSphere) return null;
// return simulationPaths.flatMap((path) => path.points).find((point) => point.uuid === selectedActionSphere.point.uuid);
// return simulationPaths.flatMap((path) => path.points).find((point) => point.uuid === selectedActionSphere.points.uuid);
// }, [selectedActionSphere, simulationPaths]);
// const createPath = () => {