Add stl support#99
Conversation
orhun
left a comment
There was a problem hiding this comment.
Looks good! Just had a question about which library to use here.
I saw bevy_stl and thought that it might be used since we already use bevy. Additionally, I saw that we already depend on some code from it.
Also, can you do the following updates:
- Update the RGP protocol spec based on this new support. Should be quick to do :)
- Do you have a cool STL model that we can include in
assets/objectsfor demo purposes?
| let mut c = Cursor::new(reader); | ||
| let stl = stl_io::read_stl(&mut c)?; | ||
|
|
||
| // credit: bevy_stl (MIT) |
There was a problem hiding this comment.
bevy_stl uses stl_io under the hood - So I just took the piece of the (albet, already small) library that this needed. This was because I didn't want to figure out if bevy_stl needed any custom loaders or whatnot. https://github.com/nilclass/bevy_stl/blob/73a0afb5d7d4f444a0e5bb95a7f4f83e6bf9f624/src/lib.rs#L61
This was just the first way I tried to solve it 🤷♂️
orhun
left a comment
There was a problem hiding this comment.
Another thing that I realized: I could not use a STL file in place of the cursor. I think this implementation only supports placing STL objects via RGP protocol.
| @@ -1,4 +1,5 @@ | |||
| /target | |||
| assets/img | |||
| /widget/target | |||
There was a problem hiding this comment.
nit: we could just one entry such as */**/target (don't remember the exact syntax) instead of ignoring each target directory
|
|
That should solve all those issues if you would like to test again |
orhun
left a comment
There was a problem hiding this comment.
Looks good :)
I tried this STL file for the cursor: https://p.orhun.dev/teamug.stl
But couldn't get it to work properly:
Peek.2026-06-15.00-53.mp4
Any ideas?
P.S. can you resolve conflicts? 👼🏼

Somewhat related to #78
Got slightly carried away in
src/inline.rsand abstracted some logic into afrominsrc/model.rs. But besides that this just adds stl support. It looks likegltfsupport basically already exists, but I don't have a gltf model on hand to test it.