Constellations/js/GUI.js

17 lines
256 B
JavaScript
Raw Normal View History

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');
});
}