Fork Me on GitHub

VirtualSky

VirtualSky a browser-based planetarium that lets you see what is visible in the sky from any location on Earth. It can be customized and included on your own website, blog etc. It is provided freely for educational and non-profit use.

Contents

What's new?

Version 0.7.4 / 15 September 2019

Changes:

Version 0.7.3 / 6 August 2019

There have been some improvements to the code:

Version 0.7.0 / 15 October 2018

There has been a major overhaul to remove the need for jQuery (replaced with stuQuery). This has reduced the initial page load from 337kB to 200kB so it should hopefully load more quickly and save bandwidth. Also:

Please report any bugs on Github giving your browser make/version. You can also suggest new features there (although they may not happen for ages or at all as this is an entirely spare time project).

Keyboard shortcuts

Press the "?" key (with your mouse over VirtualSky) to see the full list of keyboard controls.

Instructions for embedding

The easiest way to include VirtualSky on your website is to use the custom form to create an embed link (uses an <iframe>).

Sometimes an <iframe> just doesn't give you the flexibility you need (or you might want to include it in an offline page during a public talk). In that case you could download a copy of the source from GitHub and include VirtualSky in your page using Javascript. You will need to include the following in your page:

That is a version of VirtualSky with all the default options. However, one of the great things about VirtualSky is that it can be customised. Here are some examples to give you some ideas:

  1. A stereo projection set for Santa Barbara's lat/long:
  2. A lambert projection, with constellations shown, no keyboard control and a black-on-white view. It is based in Manchester,UK and facing north:
  3. A stereo projection with no keyboard or mouse input and with a Galactic grid and the Meridian line displayed. The view is facing south east from Hill Valley, California at 1:21 am on October 25, 1985.
  4. A mollweide projection with with star labels drawn and the ground blocking half the sky.
  5. A default view with a stereo projection, constellation lines and two manually specified constellation boundaries (note that RA/Dec for boundaries are assumed to be in B1875).
  6. A default view using stereo projection with a place marker
  7. A default view using gnomic-tan projection centred on M42
  8. A default view using gnomic-tan projection centred on Orion with a button to move, and a handler for contextmenu (try the right mouse button...)
  9. A default view using stereo projection in Arabic
  10. A default view using stereo projection showing objects (in this case the Messier catalogue) included from a local JSON file:

    If you have multiple files of objects you can separate them with semi-colons e.g. objects: 'messier.json;caldwell.json'.

Options

There are a range of options to try (default values in brackets):

Technical details

Virtual Sky uses the <canvas> element - part of the HTML5 proposal - so should work in most modern browsers such as Firefox (there are issues in Firefox 3.0 on Ubuntu), Opera, Chrome and Safari. It should also work in Internet Explorer 7.0 and 8.0 through the use of the excanvas.js library. The code can be found on Github.

Alternatives

There are other browser-based planetaria available online e.g. Ivan Boldyrev's Starchartjs, Luther Huffman's StarAtlas and Thomas Boch's All Sky Map. On the desktop, Stellarium is a highly featured planetarium program that works on Windows, Mac and Linux platforms (VirtualSky uses many of the same keyboard shortcuts).