dynamic cursor depending on mouse scene state (#1995)

* dynamic cursor depending on mouse scene state

* hover stuff

* bump min length

* clean up

* sketch on face failing randomly

* more time out for extrude snapshots

* Update src/clientSideScene/sceneEntities.ts

Co-authored-by: Frank Noirot <frank@zoo.dev>

* move for profileStart handle, and select when no tool equiped

---------

Co-authored-by: Frank Noirot <frank@zoo.dev>
This commit is contained in:
Kurt Hutten
2024-04-04 11:07:51 +11:00
committed by GitHub
parent 108bb4ee90
commit f03f34d8be
8 changed files with 237 additions and 93 deletions

View File

@ -25,7 +25,7 @@ import { PathToNode, SketchGroup, getTangentialArcToInfo } from 'lang/wasm'
import {
EXTRA_SEGMENT_HANDLE,
EXTRA_SEGMENT_OFFSET_PX,
MIN_SEGMENT_LENGTH,
HIDE_SEGMENT_LENGTH,
PROFILE_START,
SEGMENT_WIDTH_PX,
STRAIGHT_SEGMENT,
@ -141,7 +141,7 @@ export function straightSegment({
.normalize()
arrowGroup.quaternion.setFromUnitVectors(new Vector3(0, 1, 0), dir)
const pxLength = length / scale
const shouldHide = pxLength < MIN_SEGMENT_LENGTH
const shouldHide = pxLength < HIDE_SEGMENT_LENGTH
arrowGroup.visible = !shouldHide
group.add(mesh)
@ -282,7 +282,7 @@ export function tangentialArcToSegment({
new Vector3(Math.cos(arrowheadAngle), Math.sin(arrowheadAngle), 0)
)
const pxLength = arcLength / scale
const shouldHide = pxLength < MIN_SEGMENT_LENGTH
const shouldHide = pxLength < HIDE_SEGMENT_LENGTH
arrowGroup.visible = !shouldHide
const extraSegmentGroup = createExtraSegmentHandle(scale, texture)