make close segment visually distinct (#1620)

This commit is contained in:
Kurt Hutten
2024-03-04 14:18:08 +11:00
committed by GitHub
parent 61e2a1eddc
commit 3c721f2b29
4 changed files with 33 additions and 14 deletions

View File

@ -425,7 +425,9 @@ function updateSceneObjectColors(codeBasedSelections: Selection[]) {
const groupHasCursor = codeBasedSelections.some((selection) => {
return isOverlap(selection.range, [node.start, node.end])
})
const color = groupHasCursor ? 0x0000ff : 0xffffff
const color = groupHasCursor
? 0x0000ff
: segmentGroup?.userData?.baseColor || 0xffffff
segmentGroup.traverse(
(child) => child instanceof Mesh && child.material.color.set(color)
)