update assetID

This commit is contained in:
2025-06-12 09:31:51 +05:30
parent 9b0842ed14
commit c7cc5cf2ca
59 changed files with 1039 additions and 1029 deletions

View File

@@ -1,7 +1,7 @@
import * as THREE from "three";
import { useMemo, useRef, useState } from "react";
import { useThree } from "@react-three/fiber";
import { useDeleteTool } from "../../../../store/builder/store";
import { useToolMode } from "../../../../store/builder/store";
interface ConnectionLine {
id: string;
@@ -14,7 +14,7 @@ export function Arrows({ connections }: { readonly connections: ConnectionLine[]
const [hoveredLineKey, setHoveredLineKey] = useState<string | null>(null);
const groupRef = useRef<THREE.Group>(null);
const { scene } = useThree();
const { deleteTool } = useDeleteTool();
const { toolMode } = useToolMode();
const getWorldPositionFromScene = (uuid: string): THREE.Vector3 | null => {
const obj = scene.getObjectByProperty("uuid", uuid);
@@ -61,7 +61,7 @@ export function Arrows({ connections }: { readonly connections: ConnectionLine[]
onPointerOut={() => setHoveredLineKey(null)}
>
<meshStandardMaterial
color={deleteTool && hoveredLineKey === key ? "red" : "#42a5f5"}
color={toolMode === '2D-Delete' && hoveredLineKey === key ? "red" : "#42a5f5"}
/>
</mesh>
<mesh
@@ -72,7 +72,7 @@ export function Arrows({ connections }: { readonly connections: ConnectionLine[]
onPointerOut={() => setHoveredLineKey(null)}
>
<meshStandardMaterial
color={deleteTool && hoveredLineKey === key ? "red" : "#42a5f5"}
color={toolMode === '2D-Delete' && hoveredLineKey === key ? "red" : "#42a5f5"}
/>
</mesh>
</group>