docs
docs copied to clipboard
Add a 3d model viewer
I would be able to have both static previews and 3d previews in Teddy (like www.sketchfab.com)
Visualization of different 3d file formats:
- GLTF2 (Works both in three.js and Godot Engine as a webpage)
- FBX via fbx2gltf2 (I have patches for better support.) https://github.com/revolufire/FBX2glTF/releases/tag/v2019-12-25T15_23-08_00
- stl can be easily converted to gltf2
- obj can be easily converted to gltf2
google modelviewer package could be usefull: https://modelviewer.dev/ .
the viewer from google looks really impressive. But the conversion of file formats is a problem. I am working a lot with STL files for 3d printing and lasercutting for example. Having some files about 500 mb sometimes. Conversion would destroy its original purpose and would create extra load. a native support would be the better approach
but supporting the formats to display i'd like too
And also the files need to be read server-side to create a thumbnail, which is no small task.
And also the files need to be read server-side to create a thumbnail, which is no small task.
https://modelviewer.dev/examples/tester.html . Here there is the option to create poster. This could be used for thumbnail.
regarding to this topic, gitea added some easy support for this(STL file format only). Just by adding Madeleine.js like the following:
- https://docs.gitea.io/en-us/customizing-gitea/ (look for section "STL Preview")
- https://gitea.fablabchemnitz.de/MarioVoigt/STL-Test/src/branch/master/Unicorn.stl
for bulk handling STL files inside a Teedy instance maybe this can help (i can not really help. i am not a Java or JavaScript/node.js software dev) :/
Madeleine.js only supports STL files however, but yes it seems easy enough