wall asset movement bug fixed

This commit is contained in:
2025-09-04 10:14:14 +05:30
parent 58007a96dc
commit e208d79ce6
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
import { Vector3 } from "three";
export default function closestPointOnLineSegment(p: Vector3, a: Vector3, b: Vector3) {
const ab = new Vector3().subVectors(a, b);
const ab = new Vector3().subVectors(b, a);
const ap = new Vector3().subVectors(p, a);
const abLengthSq = ab.lengthSq();

View File

@@ -17,7 +17,7 @@ import closestPointOnLineSegment from '../../../line/helpers/getClosestPointOnLi
import { upsertWallAssetApi } from '../../../../../services/factoryBuilder/asset/wallAsset/upsertWallAssetApi';
import { deleteWallAssetApi } from '../../../../../services/factoryBuilder/asset/wallAsset/deleteWallAssetApi';
function WallAssetInstance({ wallAsset }: { wallAsset: WallAsset }) {
function WallAssetInstance({ wallAsset }: { readonly wallAsset: WallAsset }) {
const url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`;
const { socket } = useSocketStore();
const { raycaster, pointer, camera, scene, controls, gl } = useThree();