Dimension outlines with SVG #3833
jukibom
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
That's amazing! I've told a number of people these kinds of dimensions weren't feasible, so well done in proving me wrong. I'm open to a PR exposing this. Happy to give feedback on API shape (you can always open a PR before you do any coding so we can discuss first if you like). Still, one thing this approach will never give you is proper 3D occlusion. I'm about to start on a much bigger API addition to allow for multiple 3D models in the scene. I believe that will allow an alternative solution to dimension lines (along with many other use cases). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So this is kinda gross but with some regex madness we rip the x, y div coordinates from the slot's shadow dom div css transform string and updating an SVG canvas inside
requestAnimationFrame
we managed this neat effect 🎉(and a feature request would be an API to get hotspot positions in screenspace because while the SVG works well, getting those positions is quite brittle wrt future model-viewer updates on our side! 🙏)
dimensions-test.mp4
Beta Was this translation helpful? Give feedback.
All reactions