INNER CODE UNIT · JavaScript

keydown

loicbourgois/gravitle · front/alpha/index.js:162

const keydown = (e) => {
    if (bindings && bindings[e.key]) {
        universe.activate_thrust_for_links(bindings[e.key].link_indexes);
    } else {
        // Do nothing
    }
};

const get_bindings = () => {
    return {
        'ArrowLeft' : {
            link_indexes : [0]
        },
        'ArrowUp' : {
            link_indexes : [1]
        },
        'ArrowRight' : {
            link_indexes : [2]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…