Generate screenshots for parts with any code within them [solved in #209] #208
Replies: 2 comments 3 replies
-
You're 100% right this would be useful. I've actually wanted to do this, but haven't taken the time to dive in figure out how to make it work. Sounds like you already have an idea with the canvas. I made issue #111 because CascadeStudio had an experimental branch where this same feature was implemented, so looking at that code may help (at least that was what I was planning on doing, but happy for you do it whichever way you think best). In regards to when to take the screen shot, I agree that taking one every time it generates seems a little problematic, how about instead we add a button in this section |
Beta Was this translation helpful? Give feedback.
-
Alright @Irev-Dev I've made some progress. Here are my Figma sketches , you can give your thoughts and feedback using the comment tool (tapping the "C" key) and tagging me if you like. Some notes I realized while mocking it up:
I've made some headway on wiring up the logic over in my fork, got an image to be collected out of CascadeStudio (you were right, it was very straightforward to adapt Zalo's code), and am just about ready to put together the Cloudinary logic. I should have time tomorrow evening to work more. |
Beta Was this translation helpful? Give feedback.
-
Hi there! Love this project, and would love to help however I can.
I think that parts could benefit from having screenshots generated of them, perhaps by hooking into the Save functionality.
Codepen generates screenshots of pens for use on mobile and metadata generation. They are a rails app and do their work server side.
Since all CadHub parts are 3d viewports and therefore always just a
<canvas>
element, could it be saved from the client side directly by listening for a successful model generation, then saving the canvas as the thumbnail, saving the image to the database and replacing the old one?One issue with the above is that it then relies on the user being in the right camera position when they save if they want the thumbnail to look good.
Beta Was this translation helpful? Give feedback.
All reactions