Skip to content

Force directed graph labels#751

Merged
micheal-parks merged 10 commits into
mainfrom
labels
Jun 8, 2026
Merged

Force directed graph labels#751
micheal-parks merged 10 commits into
mainfrom
labels

Conversation

@micheal-parks

Copy link
Copy Markdown
Member

Overview

Updates labels to use d3's force directed graph plugin to prevent overlap. For example, here's a complicated scene:

Screenshot 2026-06-05 at 13 21 09

This is a hard problem - Claude did a lot of algorithmic heavy lifting - and this solution is nowhere near perfect, it's just a lot better than the current label behavior, which renders them unusable pretty quickly as scene members grow.

@changeset-bot

changeset-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 58baebc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@viamrobotics/motion-tools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-08 19:37 UTC

@mattmacf98 mattmacf98 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The end product LGTM! The math is a lot but probably ok (wonder if force directed UI layouts might have a used case for general public and we could lift into @threlte/extras or something asp)

<Arrows />

{#if enableLabels}
<Labels />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! Labels are much less invasive when disabled now :)

@micheal-parks micheal-parks merged commit dc668f7 into main Jun 8, 2026
13 checks passed
@micheal-parks micheal-parks deleted the labels branch June 8, 2026 19:37
@claude claude Bot mentioned this pull request Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants