summaryrefslogtreecommitdiff
path: root/boot.js
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2023-10-23 22:37:19 -0400
committerDavid Thompson <dthompson2@worcester.edu>2023-10-23 22:37:19 -0400
commite35626532ee4e3e29b26b9415eaac4886484ad68 (patch)
tree2d91f80cb10f1014d224f1d6e9af52cda6fdca8b /boot.js
parentee937abcfeb7bd65617790936bb6ee25a2b1760a (diff)
load images programatically.
Diffstat (limited to 'boot.js')
-rw-r--r--boot.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/boot.js b/boot.js
index f834d62..b9e8fe1 100644
--- a/boot.js
+++ b/boot.js
@@ -121,6 +121,13 @@ async function load() {
setVolume(audio, vol) {
audio.volume = vol;
}
+ },
+ image: {
+ new(src) {
+ const img = new Image();
+ img.src = src;
+ return img;
+ }
}
});
const scheme = await mod.reflect();