-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
view STL files #5979
Comments
Maybe you can do it via third-party tools and add some config on app.ini |
If anyone has had success with third-party tools let me know. I would gladly try it out but I have no idea where to even start. Thanks. |
At first, are there any command line tools or scripts could convert the files to HTML files? |
How do you run gitea ? on windows, linux, ... ? Do you use the docker image ? |
I have a script that can render .scad and .stl file but it will need openscad that may not be easily installable depending of your installation https://gist.github.com/sapk/ce1c246dd39a5f434554b31d0ca8ecdb |
@sapk I am running in a freebsd jail installed with ports. I will take a look at that script but it seems like a static render...right? github does this: https://imgur.com/a/eZxCIHI which is amazing. It also highlights the parts of the STLs when you look at the commit diffs... |
We could use something like this: https://github.com/kaitlynhova/Three.js-STL-Viewer |
@lafriks there is various JS lib mostly all not maintained. The more advanced I found is https://github.com/kovacsv/Online3DViewer I feel like we should not support it but allow the use of direct HTML (no sanitize) via external render if requested by option (and add libs under public). |
Would it be better to still in general sanitise but allow an external renderer to add some standard page sections? |
i am looking for the same feature because i am doing tons of open hardware stuff with git. the github feature to render STL is really nice but i think github blows up and slows down. so need and want to host viewable cad files with clean versioning for my own. i am running gitea for a year now. maybe the stl feature could be done with Githubiverse templates and if another missing feature 'pages' would be there: |
at Github they use Three.js for the STL viewer. The process for the diff is explained here: https://github.blog/2013-09-17-3d-file-diffs/ Not a 3D expert, but it doesn't look that complex no? (but CPU/GPU consuming for the gitea server). |
gitea added this feature in documentation. i integrated madeleine.js (three.js wrapper) into our environent succesfully. i had to adjust some things to make it render with complete width on smarthpones and computers (tested with firefox and chrome) https://gitea.fablabchemnitz.de/MarioVoigt/Madeleine.js-for-Gitea happy for more fixes to make it clean. the docs for integration are provided here: https://docs.gitea.io/en-us/customizing-gitea/ |
FWIW an alternative STL previewer based rendering directly with three.js has been implemented in https://codeberg.org/Codeberg/build-deploy-gitea/pulls/31 -- we believe controls are a bit more intuitive (especially on mobile, also no gimbal lock in rotation; trackball-style control). Implementation is a single JS file, but threejs is added as dependency. Try and visit: https://codeberg.org/Codeberg/three.js/src/branch/dev/examples/models/stl/binary/colored.stl |
@vmario89 I tried to get madeleine.js up and running and it isn't working. Here is my setup:
any thoughts to help get this up and running? additional maybe helpful data I pulled from
|
Hey, i documented it for myself some weeks ago the following (hopefully correct):
Check your browser's console output for possible css/js/whatever errors :-) |
I will close this issue as it can be setup by many ways and at least one is in docs. |
Description
feature request: view, see, and track changes (visually) with .stl and other 3d files. (like github does)
Thanks!
I find this an amazing feature that github has and it would be even more amazing if gitea could implement similar functionality.
The text was updated successfully, but these errors were encountered: