When looking directly at an STL file on GitHub you can:
- Click and drag to spin the model
- Right click and drag to translate the view
- Scroll to zoom in and out
- Click the different view modes to change the view
When looking at a commit or set of changes which includes an STL file, you'll see a diff of it.
By default you'll get a view where everything unchanged is in wireframe, additions are in green, and removed parts are in red.
You can also select the "Revision Slider" mode, which lets you use the slider at the top to transition between the current and previous revisions.
If you see this icon in the corner of the viewer, then WebGL is not available. This means we cannot use your computer's hardware to it's fullest. We recommend you try browsers like Chrome or Firefox which ship with WebGL enabled.
Currently, GitHub only supports .stl files. If you convert your project to an stl file and then commit it, you should be able to view the 3D file.
If you get an 'Unable to display' message, the model is invalid or exceeds 10M.
For example, if your model's URL is github.com/skalnik/secret-bear-clip/blob/master/stl/clip.stl, your embed code would be:
By default, the embedded renderer is 420px x 620px, but you can customize the output by passing height and width variables as parameters at the end, such as
ref can be a branch (like
master), or the hash to an individual commit (like