SkySphere

SkySphere is a lightweight JavaScript sky map for HTML5 canvas.

It's written in pure Vanilla JavaScript, no plugins are required! All in only 26 kB!

Works also on touchscreen devices.

You can simply add it on your page or load it in the AMD way.

Quick start

Add a canvas to the page:

<canvas id="sky"></canvas>

Inside your script section initialize SkySphere:

var sky = new SkySphere('sky', {
    width: 800,
    height: 400,
    customOnClick: function(data) {
        // Define your custom action for added objects.
    }
});

Add your custom objects to the maps:

sky.addCustomObject(5.58814, -4.92319, { clickData: 'M 42 - the Great Orion Nebula' });

Draw the map:

sky.drawSky();

Enjoy! :-)

For the full list of functionalities read the Wiki!