()
| 34 | // Need to initialize file manager alongside loading image. |
| 35 | // TODO: clean up file manager initialization! |
| 36 | let loadImage = async function() { |
| 37 | let response = await fetch("start.png"); |
| 38 | let data = await response.blob(); |
| 39 | let metadata = { |
| 40 | type: "image/png" |
| 41 | }; |
| 42 | let file = new File([data], "start.png", metadata); |
| 43 | wpd.imageManager.initializeFileManager([file]); |
| 44 | wpd.imageManager.loadFromFile(file); |
| 45 | }; |
| 46 | loadImage(); |
| 47 | } |
| 48 |