RobotronicsClubIITMandi / URC_Mars_Rover

Mars Rover official website for IIT Mandi
https://rover.iitmandi.co.in
MIT License
2 stars 13 forks source link

Add 3D view of CAD model on the landing page #15

Open AnuragMaurya-PreD opened 1 year ago

aksy2512 commented 1 year ago

Hi , I want to work on this issue. Can you please add more details about the issue

AnuragMaurya-PreD commented 1 year ago

What is expected : Somewhat like https://sketchfab.com/tags/robot Functions: Zoom in, zoom out and view the robot around in 3D Resources to get started with: https://medium.com/samsung-internet-dev/adding-3d-models-to-your-website-d374a8cbbadd CAD files: Will upload soon after generating in appropriate format. The format of the file will be .STL so look for ways to display the STL files only.

Let me know if you need some help

aksy2512 commented 1 year ago

Hi! I tried implementing it using a demo website and a demo model which was in.STL format itself. I browsed around the internet to look out for some ways to do it and found out that the only way to do it was with the three.js package and webGL but the complexity was a little high and the location of the necessary scripts for rendering STL files was changed or damaged.

I looked for some other ways and found a simple way of doing this so, I changed the file format to a .glb file and used the model-viewer to render it. The short video below shows the demo of a cube being rendered :)

https://user-images.githubusercontent.com/79045568/211429762-b6429ddd-3dea-4663-a9f7-9c0bf6d36561.mp4

AnuragMaurya-PreD commented 1 year ago

Since the rover is an assembly of components, I need to see if the assembly can be exported in the said format. Will update you as soon as possible.

AnuragMaurya-PreD commented 1 year ago

Please find the necessary STL file here: https://drive.google.com/drive/folders/1ZobpWKlM0iXcPFHcfGNOf_zRO45vMgGC?usp=share_link