It’s been a while since the previous version of Photo Sphere Viewer. But here we are: a new one is finally released!

A not so useless library?

I would like to begin this article by thanking those of you who help me by reporting bugs or giving me some ideas of new features.

If I developed Photo Sphere Viewer, it was first for making my own library for WP Photo Sphere, in order to stop using the previous one. Developing my own library allows me to fix the bugs by myself and add the features I want.

However, it seems like Photo Sphere Viewer encounters a bigger success than WP Photo Sphere. It’s pretty cool as, I must admit it, I now prefer developing Photo Sphere Viewer (that doesn’t mean that I don’t like developing WP Photo Sphere, I won’t stop!).

Anyway, the release of Photo Sphere Viewer 2.2 was the occasion to thanking you. It’s not the final version, the road will be long: the list of features I want to add is a big one!

Zoom and zoom. Oh, and zoom again.

Three new features of Photo Sphere Viewer 2.2 are about zoom. The first one is the mobile zoom (finally!). Now, your users will be able to “pinch to zoom”. There’s nothing you need to do to activate this feature.

However, there’s now a new option you can use: zoom_level. It excepts for a number between 0 and 100 (a percentage), representing the default zoom level (0 by default). Some of you wanted this option, now it’s here.

It’s not a new feature. It’s not a bug fix. It’s a new behavior that, I hope, you’ll find as useful as I find. Now, you can more easily use the dedicated bar to zoom in the panorama. This bar was already here in the navigation bar but, now, you can “catch” it more easily.

Four new options

In addition to the default zoom level, four new options are now here. First, the default position. By default, the user is positioned at coordinates (0, 0) (spherical coordinates, longitude/latitude). With the default_position option you can change this.

The value you must pass to this option is an object, with lat and long properties (one, the other, or both). These values are numbers, representing the angle in radians (but you’ll be able to use degrees in a future version).

You can also define the maximum tilt angles, up and down. If you don’t want your users to be able to see the top of your panorama, it’s possible with the options tilt_up_max and tilt_down_max. Values must be in radians.

The last option is onready. The value of this option is a callback function, called once the panorama is loaded and the first image displayed. Note that you can also use the actions system to do that.

Thank you Chrome for your fullscreen bug

I don’t know if it’s Chrome or the other browsers that are wrong (I think it’s Chrome), but Google’s implementation is different.

This means that the fullscreen feature in Photo Sphere Viewer on Chrome was buggy. Now, it’s fixed.

What’s next?

As usual, let’s talk about the future. Obviously, a new version of WP Photo Sphere will come, maybe tomorrow.

Right after, I’ll begin to develop the next version of Photo Sphere Viewer. In parallel, I’ll also begin to develop my own 3D renderer.