Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for STL model loading/deserialization #35

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

themkat
Copy link
Contributor

@themkat themkat commented Aug 22, 2024

Uses stl_io to parse and implement a very simple STL parser. The original STL model format is quite minimal compared to other formats, so I assumed there was only one object in the "scene". Have not experienced it any other way yet, though with a very minimal experience with these formats used for 3D printing. Test cases cover both ascii and binary formats, so they will do basic verification if we ever want to change stl library (or write out own).

Fixes #7

Threw it into the lights demo in the three-d repo, and it seems to work okay:
image
(that demo has point lights, which is the little dots floating around Suzanne)

EDIT: Notice that the build fails due to missing trait in the web version. I'm on it. Never really use web thingys,

@themkat
Copy link
Contributor Author

themkat commented Aug 22, 2024

Thanks for fixing @asny ! 😸 I just found that error mapping while debugging just now myself. Did not notice it before 😱

@asny
Copy link
Owner

asny commented Aug 22, 2024

No problem, that was a small fix 🙂 The code looks good, thanks a lot for the contribution 🙏

@asny asny merged commit 80fb3fd into asny:main Aug 22, 2024
4 checks passed
@themkat themkat deleted the feature/stl branch August 22, 2024 15:37
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.

STL format (deserialize)
2 participants