added screenspace to point helper
This commit is contained in:
@@ -72,24 +72,27 @@ function Point({ point }: { readonly point: Point }) {
|
||||
</ScreenSizer>
|
||||
</DragControls>
|
||||
) : (
|
||||
<group
|
||||
<ScreenSizer
|
||||
key={point.pointUuid}
|
||||
uuid={point.pointUuid}
|
||||
name={`${point.pointType}-Point`}
|
||||
scale={1}
|
||||
position={[point.position[0], 0.3, point.position[2]]}
|
||||
userData={point}
|
||||
rotation={[Math.PI / 2, 0, 0]}
|
||||
>
|
||||
<mesh>
|
||||
<torusGeometry args={[0.4, 0.1, 2, 16]} />
|
||||
<meshBasicMaterial color="#6F42C1" />
|
||||
</mesh>
|
||||
<mesh uuid={point.pointUuid} name={`${point.pointType}-Point`} userData={point}>
|
||||
<mesh>
|
||||
<torusGeometry args={Constants.pointConfig.screenSpaceTorus} />
|
||||
<meshBasicMaterial color={Constants.pointConfig.helperColor} />
|
||||
</mesh>
|
||||
|
||||
<mesh position={[0, 0, 0]}>
|
||||
<sphereGeometry args={[0.3, 8, 16]} />
|
||||
<meshBasicMaterial color="white" />
|
||||
<mesh>
|
||||
<sphereGeometry args={Constants.pointConfig.screenSpaceSphere} />
|
||||
<meshBasicMaterial color="white" />
|
||||
</mesh>
|
||||
</mesh>
|
||||
</group>
|
||||
</ScreenSizer>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -9,8 +9,6 @@ import { getUserData } from "../../../../../functions/getUserData";
|
||||
import { useSceneContext } from "../../../sceneContext";
|
||||
import { useSelectedPoints } from "../../../../../store/simulation/useSimulationStore";
|
||||
import useModuleStore from "../../../../../store/ui/useModuleStore";
|
||||
import useWallAssetResponseHandler from "../../../../collaboration/responseHandler/useWallAssetResponseHandler";
|
||||
import useWallResponseHandler from "../../../../collaboration/responseHandler/useWallResponseHandler";
|
||||
import { calculateAssetTransformationOnWall } from "../../../../builder/wallAsset/Instances/Instance/functions/calculateAssetTransformationOnWall";
|
||||
|
||||
import { upsertAisleApi } from "../../../../../services/factoryBuilder/aisle/upsertAisleApi";
|
||||
@@ -18,6 +16,9 @@ import { upsertWallApi } from "../../../../../services/factoryBuilder/wall/upser
|
||||
import { upsertFloorApi } from "../../../../../services/factoryBuilder/floor/upsertFloorApi";
|
||||
import { upsertZoneApi } from "../../../../../services/factoryBuilder/zone/upsertZoneApi";
|
||||
import { upsertWallAssetApi } from "../../../../../services/factoryBuilder/asset/wallAsset/upsertWallAssetApi";
|
||||
|
||||
import useWallAssetResponseHandler from "../../../../collaboration/responseHandler/useWallAssetResponseHandler";
|
||||
import useWallResponseHandler from "../../../../collaboration/responseHandler/useWallResponseHandler";
|
||||
import useAisleResponseHandler from "../../../../collaboration/responseHandler/useAisleResponseHandler";
|
||||
|
||||
function MoveControls2D({ movedObjects, setMovedObjects, pastedObjects, setPastedObjects, duplicatedObjects, setDuplicatedObjects, rotatedObjects, setRotatedObjects }: any) {
|
||||
|
||||
@@ -115,6 +115,8 @@ export type PointConfig = {
|
||||
defaultOuterColor: string;
|
||||
deleteColor: string;
|
||||
screenSpaceBoxScale: [number, number, number];
|
||||
screenSpaceSphere: [number, number, number];
|
||||
screenSpaceTorus: [number, number, number, number];
|
||||
boxScale: [number, number, number];
|
||||
wallOuterColor: string;
|
||||
floorOuterColor: string;
|
||||
@@ -319,13 +321,15 @@ export const pointConfig: PointConfig = {
|
||||
defaultOuterColor: "#ffffff", // Default outer color of the points
|
||||
deleteColor: "#ff0000", // Color of the points when deleting
|
||||
screenSpaceBoxScale: [20, 20, 20], // Scale of the points
|
||||
screenSpaceSphere: [7.5, 8, 16], // [Radius, WidthSegment, HeightSegment]
|
||||
screenSpaceTorus: [7.5, 5, 2, 16], // [Radius, Tube, RadicalSegment, TublarSegment]
|
||||
boxScale: [0.5, 0.5, 0.5], // Scale of the points
|
||||
wallOuterColor: "#C7C7C7", // Outer color of the wall points
|
||||
floorOuterColor: "#808080", // Outer color of the floor points
|
||||
aisleOuterColor: "#FBBC05", // Outer color of the aisle points
|
||||
zoneOuterColor: "#007BFF", // Outer color of the zone points
|
||||
snappingThreshold: 1, // Threshold for snapping
|
||||
helperColor: "#C164FF", // Color of the helper lines
|
||||
snappingThreshold: 1, // Threshold for snapping
|
||||
};
|
||||
|
||||
export const lineConfig: LineConfig = {
|
||||
|
||||
Reference in New Issue
Block a user