blaze-2d
Version:
A fast and simple WebGL 2 2D game engine written in TypeScript
19 lines • 555 B
JavaScript
import KeyboardHandler from "../input/keyboard";
import MouseHandler from "../input/mouse";
/**
* Provides a streamlined api to interact with UI elements in blaze.
*/
export default class BlazeElement {
/**
* Creates a {@link BlazeElement}.
*
* @param element An HTML element
*/
constructor(element) {
this.element = element;
this.element.classList.add("blzElement");
this.mouse = new MouseHandler(element);
this.keys = new KeyboardHandler(element);
}
}
//# sourceMappingURL=element.js.map