gravity/tool.js
2025-12-27 19:38:36 -06:00

25 lines
536 B
JavaScript

// Idea here is, tool can declare its parameters;
// can call back to toolbar for whatever...
// through toolbar can access sim
import {
DRAGGABLE_ELEMENT_CLASSNAME,
TOOL_CLASSNAME,
} from './config.js';
export class Tool {
toolbar = undefined;
sim = undefined;
constructor(toolbar) {
this.toolbar = toolbar;
this.sim = this.toolbar.sim;
const div = document.createElement('div');
this.div = div;
div.classList.add(TOOL_CLASSNAME)
div.classList.add(DRAGGABLE_ELEMENT_CLASSNAME);
}
frame() {}
}