Constellations/js/GUI.js

16 lines
256 B
JavaScript

return {
activate: activate,
mouse: {
left: 0,
right: 2
}
};
function activate(on, targets) {
if(!Array.isArray(targets)) {
targets = [targets]
}
targets.forEach(function(element) {
element.classList[on ? 'add' : 'remove']('active');
});
}