Skip to content

Add stl support#99

Merged
orhun merged 9 commits into
orhun:mainfrom
Rushmore75:main
Jun 30, 2026
Merged

Add stl support#99
orhun merged 9 commits into
orhun:mainfrom
Rushmore75:main

Conversation

@Rushmore75

Copy link
Copy Markdown
Contributor
  • STLs load
  • clippy is happy

Somewhat related to #78

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

@orhun orhun left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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/objects for demo purposes?

Comment thread src/model.rs

@orhun orhun left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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.

Comment thread .gitignore Outdated
@@ -1,4 +1,5 @@
/target
assets/img
/widget/target

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

nit: we could just one entry such as */**/target (don't remember the exact syntax) instead of ignoring each target directory

@Rushmore75

Rushmore75 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author
  • support stl for cursor
  • update RGP protocol spec
  • figure out target .gitignore
  • find / create demo stl

@Rushmore75

Copy link
Copy Markdown
Contributor Author

That should solve all those issues if you would like to test again

@orhun orhun left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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? 👼🏼

@Rushmore75

Copy link
Copy Markdown
Contributor Author

When I open that STL in blender it also has the large plane below it. So I think that it's rendering as-intended 🤔
image

@orhun

orhun commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Oh I see, I'll try with a different model!
In the meantime, can you run cargo fmt and commit the changes?

@orhun orhun left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

thanks!

I just gave this a try and it works! There is no texture loading yet it seems like, but this should be a good start already :)

Comment thread src/inline.rs Outdated
@orhun orhun merged commit eac65ce into orhun:main Jun 30, 2026
10 of 11 checks passed
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