GitHub has a built-in 3D file viewer that allows you to get a 360 degree view of your 3D models. This 3D file viewer also gives you an interactive diff experience to compare changes between commits!
I created a quick cube using Microsoft’s 3D Builder. I added it to my repo and pushed it up to GitHub.
There are 3 options for viewing the 3D model.
And the grand finale, how to view a diff of a 3D Model.
Using the 3D Builder software, I added a cone to the top of the cube. I pushed these changes up to GitHub.
If you look at the diff of the commit (click the commit ID circled in red above), you’ll see the diff viewer. By default it shows you what’s changed. Since I added a cone, the cone is shown in green (for additive).
At the bottom of the image, you’ll find the Revision Slider. Click this link for an interactive 3D diff experience!
In the image below, you’ll see how the cone is added.
GitHub offers 3 ways for you to diff your images. For example, this commit diff shows how I checked in an image and then changed the image completely in the next commit.
At the bottom of the image, you’ll see the options for 2-up, Swipe, and Onion Skin.
The default view is the 2-up, which shows the images before and after side-by-side.
Swipe allows you to do more of a pixel-by-pixel comparison by allowing you to slide a splitter back and forth over the image.
Onion skin allows you to pick up on subtle changes you might have otherwise missed. Although there’s nothing subtle with the image I picked
Today’s tip of the day images are brought to you by https://octodex.github.com/. And thanks to the Help Documentation for clarifying when to use Onion Skin versus Swipe!
If you don’t know today’s tip, be prepared for a life-changing event (provided you are using Chrome).
Suppose you want to open an Issue on a project on GitHub. For example, let’s say you were learning Electron and tried out my your-moment-of-github-zen app on a Windows machine. You’ll quickly noticed that I wrote it on a Mac environment.
First, you can go to the repo, click on the Issue tab, (search to make sure there are no duplicate issues), and then fill out steps to reproduce the issue.
Place the cursor where you want the new image to go, and press Ctrl-v (or your non-Windows equivalent of paste).
Not only will you see that the file was uploaded to GitHub, but also the Ctrl-v shortcut generated the markdown for showing images.
To make sure the image is :+1: click on the Issue – Preview tab.
If you are not using Chrome, you’ll only see two options listed at the bottom of an Issue comment field.
meaning you’ll have to save the file locally and then drag and drop it into the comment box (or use the Open File Dialog from the selecting them link).