import * as ASSETS from "./src/assets.js" function preload(a) { var tempImg = new Image() tempImg.src=a } function preloadAudio(a) { var tempAud = new Audio(a) tempAud.load() } export function preloadAll() { ASSETS.PORTAL.map(preload) Array.from([ASSETS.BOSHY.BULLET, ASSETS.BOSHY.NORMAL]).map(preload) Array.from([ASSETS.MUSIC.PREQUEL, ASSETS.MUSIC.HELL, ASSETS.MUSIC.DEATH]).map(preloadAudio) Array.from([ASSETS.BACKGROUND.DEFAULT, ASSETS.BACKGROUND.DARK_SUN]).map(preload) } preloadAll()