assign 3d models current after all clients resolve#678
Merged
Conversation
🦋 Changeset detectedLatest commit: 4aca432 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
mattmacf98
commented
May 14, 2026
| } | ||
| const geometryLabel = geometries[0].label | ||
| const prefix = geometryLabel.split(':')[0] | ||
| const models = await client.current.get3DModels() |
Member
Author
There was a problem hiding this comment.
if we get to. point where we have tons of different 3d models in the scene at once, we could parallelize these calls with promise.all, seemed pre-mature to do in this pr
Member
There was a problem hiding this comment.
even better, it would be nice to know if we already fetched the arm for a matching model and just use local cache
Contributor
|
micheal-parks
approved these changes
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
in this thread https://viaminc.slack.com/archives/C071CRAU7EJ/p1778765771671389
we saw issue when visualizing multiple 3d models for different resources in the same scene, I was setting current in the inner loop so it would update for the first arm but just add more keys on subsequent sets (which svelte was not reactive to since it is a state.raw). This worked fine on other real arms since the geometry labels are set by the module (so base_top is always xarm:base_top for all arms) the fake and simulated change the label prefix to match the frame e.x. arm1:base_top and arm2:base_top
This PR sets current outside of the loop after the full object is accumulated
Testing