Add miniPaint as new frontend base

This commit is contained in:
motion
2026-01-26 12:20:16 -05:00
parent bb859105ff
commit 6ae4cbcb77
306 changed files with 60729 additions and 4050 deletions
+48
View File
@@ -0,0 +1,48 @@
import config from './../../config.js';
import Helper_class from './../../libs/helpers.js';
import Base_gui_class from './../../core/base-gui.js';
var instance = null;
class View_grid_class {
constructor() {
//singleton
if (instance) {
return instance;
}
instance = this;
this.GUI = new Base_gui_class();
this.Helper = new Helper_class();
this.set_events();
}
set_events() {
document.addEventListener('keydown', (event) => {
var code = event.keyCode;
if (this.Helper.is_input(event.target))
return;
if (code == 71 && event.ctrlKey != true && event.metaKey != true) {
//G - grid
this.grid({visible: !this.GUI.grid});
event.preventDefault();
}
}, false);
}
grid() {
if (this.GUI.grid == false) {
this.GUI.grid = true;
}
else {
this.GUI.grid = false;
}
config.need_render = true;
}
}
export default View_grid_class;