Basic implementations

This commit is contained in:
Mal
2020-01-22 22:50:45 +01:00
parent 893c226fe4
commit fb762d1778
17 changed files with 424 additions and 13 deletions

14
js/MediaImage.js Normal file
View File

@@ -0,0 +1,14 @@
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));
}
}
}