function bindKeysToPlanets() {

        var planetAssociatedWith = {},
            keysToBind = [],
            shortcut;

        for (var i = 0; i < SolarSystem.length; i++) {
            shortcut = SolarSystem[i].shortcutKey;
            if (shortcut) {
                planetAssociatedWith[shortcut] = SolarSystem[i];
                keysToBind.push(shortcut);
            }
        }

        Mousetrap.bind(keysToBind, function (e, key) {
            camera.snapTo(planetAssociatedWith[key]);
            triggerAnimation();
        });

        return planetAssociatedWith;
    }
/**
     * Handles binding certain key presses to calling the camera snapTo() function.
     * @method bindKeysToPlanets
     * @return {JSON} Associative array where key is keyboard shortcut, value is Astronomical Object linked to that shortcut.
     */
Handles binding certain key presses to calling the camera snapTo() function.
@method bindKeysToPlanets
@return {JSON} Associative array where key is keyboard shortcut, value is Astronomical Object linked to that shortcut.
Handles binding certain key presses to calling the camera snapTo () function . @method bindKeysToPlanets @return { JSON } Associative array where key is keyboard shortcut value is Astronomical Object linked to that shortcut .
function bindKeysToPlanets() {
        var planetAssociatedWith = {},
            keysToBind = [],
            shortcut;
        for (var i = 0; i < SolarSystem.length; i++) {
            shortcut = SolarSystem[i].shortcutKey;
            if (shortcut) {
                planetAssociatedWith[shortcut] = SolarSystem[i];
                keysToBind.push(shortcut);
            }
        }
        Mousetrap.bind(keysToBind, function (e, key) {
            camera.snapTo(planetAssociatedWith[key]);
            triggerAnimation();
        });
        return planetAssociatedWith;
    }
function bindKeysToPlanets ( ) { var planetAssociatedWith = { } , keysToBind = [ ] , shortcut ; for ( var i = 0 ; i < SolarSystem . length ; i ++ ) { shortcut = SolarSystem [ i ] . shortcutKey ; if ( shortcut ) { planetAssociatedWith [ shortcut ] = SolarSystem [ i ] ; keysToBind . push ( shortcut ) ; } } Mousetrap . bind ( keysToBind , function ( e , key ) { camera . snapTo ( planetAssociatedWith [ key ] ) ; triggerAnimation ( ) ; } ) ; return planetAssociatedWith ; }
Handles binding certain key presses to calling the camera snapTo() function.
Handles binding certain key presses to calling the camera snapTo () function .