oops, add a missing assetProxy call!

This commit is contained in:
Emi Matchu 2020-09-22 04:34:40 -07:00
parent 772065815a
commit d1be0f2d4a

View file

@ -207,7 +207,12 @@ export function OutfitCanvasMovie({ librarySrc, zIndex }) {
} }
async function addMovieClip() { async function addMovieClip() {
library = await loadMovieLibrary(librarySrc); try {
library = await loadMovieLibrary(librarySrc);
} catch (e) {
console.error("Error loading movie library", librarySrc, e);
}
let constructorName; let constructorName;
try { try {
const fileName = librarySrc.split("/").pop(); const fileName = librarySrc.split("/").pop();
@ -369,7 +374,7 @@ async function loadMovieLibrary(librarySrc) {
// scripts will trigger their onloads in order of arrival, and my // scripts will trigger their onloads in order of arrival, and my
// _hope_ is that the onload will execute before the next script to // _hope_ is that the onload will execute before the next script to
// arrive executes. Let's, ah, find out! // arrive executes. Let's, ah, find out!
await loadScriptTag(librarySrc); await loadScriptTag(safeImageUrl(librarySrc));
const composition = Object.values(window.AdobeAn.compositions).pop(); const composition = Object.values(window.AdobeAn.compositions).pop();
const library = composition.getLibrary(); const library = composition.getLibrary();
@ -384,9 +389,7 @@ async function loadMovieLibrary(librarySrc) {
const manifestImages = new Map( const manifestImages = new Map(
library.properties.manifest.map(({ id, src }) => [ library.properties.manifest.map(({ id, src }) => [
id, id,
loadImage(safeImageUrl(librarySrcDir + "/" + src)).catch((e) => { loadImage(safeImageUrl(librarySrcDir + "/" + src)),
console.error("Error loading image for movie manifest", e);
}),
]) ])
); );
await Promise.all(manifestImages.values()); await Promise.all(manifestImages.values());