From 3a282494d64102c0bc1224ba8731d40be23437fd Mon Sep 17 00:00:00 2001 From: howard Date: Thu, 22 Apr 2021 20:50:24 -0700 Subject: [PATCH] fixed angle obtuse angle bug --- src/drawDimension.js | 2 +- src/mouseEvents.js | 2 +- src/react/dialog.jsx | 2 +- src/shared.js | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/drawDimension.js b/src/drawDimension.js index 8e6360f..4e62e51 100644 --- a/src/drawDimension.js +++ b/src/drawDimension.js @@ -30,7 +30,7 @@ export async function drawDimension() { constraint = [ 'angle', dimVal, - [-1, -1, selection[0].name, selection[1].name] + [-1, -1, selection[0].name, selection[1].name], 0 ] dimType = 'a' diff --git a/src/mouseEvents.js b/src/mouseEvents.js index 0cb479d..c4d5439 100644 --- a/src/mouseEvents.js +++ b/src/mouseEvents.js @@ -32,7 +32,7 @@ export function onHover(e) { let idx = [] - const thresh = this.snap ? 1 : 0.0001 + const thresh = 0.0001 if (hoverPts.length) { let minDist = Infinity; for (let i = 0; i < hoverPts.length; i++) { diff --git a/src/react/dialog.jsx b/src/react/dialog.jsx index 42dcc8d..293987c 100644 --- a/src/react/dialog.jsx +++ b/src/react/dialog.jsx @@ -96,7 +96,7 @@ export const Dialog = () => { switch (dialog.action) { case 'extrude': return <> - + ref.current.value *= -1} /> diff --git a/src/shared.js b/src/shared.js index 09bc413..540f232 100644 --- a/src/shared.js +++ b/src/shared.js @@ -216,13 +216,13 @@ const fragmentShader = ` } } ` -const pixelRatio = 2 +const sz = 4 const custPtMat = new THREE.ShaderMaterial({ uniforms: { color: { value: new THREE.Color(0xff0000) }, - edgeColor: { value: new THREE.Color(0x990000) }, - pointWidth: { value: 4 * pixelRatio }, - edgeSize: { value: 4 * pixelRatio }, + edgeColor: { value: new THREE.Color(0x770000) }, + pointWidth: { value: sz }, + edgeSize: { value: sz }, }, vertexShader, fragmentShader,