import InterfaceEvent from "./events/InterfaceEvent.js"; import ImageLoadedEvent from "./events/ImageLoadedEvent"; export default class MediaImage { constructor(filename) { this.image = new Image(); this.image.src = filename; this.image.onload = function () { window.dispatchEvent(new ImageLoadedEvent(filename)); } } }