Spherical thumbnails
Spherical 360-degree images deserve better than a plain ol' paint-chip thumbnail images, don't you think? I suggest that we display them as small balls. Maybe we should call them thumb-tips or thumb-marbles. Anyway, let's do a little hacking to make this happen.
Add a sphere to the Thumbnail class
In the Thumbnail
class, add a sphere
variable:
public Sphere sphere;
Modify setImage
to recognize a photosphere image:
public void setImage(Image image) { // ... // show it if (image.isPhotosphere) { UnlitTexMaterial material = (UnlitTexMaterial) sphere.getMaterial(); material.setTexture(image.textureHandle); } else { image.showThumbnail(cardboardView, plane); } }
We must also change setVisible
to handle both the plane
and sphere
variables, as follows:
public void setVisible(boolean visible) { if(visible) { if(image.isPhotosphere){ plane.enabled = false;...