diff --git a/modern/src/App.js b/modern/src/App.js index fb5e7782..c05b8d74 100644 --- a/modern/src/App.js +++ b/modern/src/App.js @@ -354,7 +354,7 @@ function animatedLayerOffsetAndSize( function AnimatedLayer({ node, id, - image, + js_assets, x, y, w, @@ -362,12 +362,12 @@ function AnimatedLayer({ framewidth, frameheight, }) { - if (image == null) { + const img = js_assets.image; + if (img == null) { console.warn("Got an AnimatedLayer without an image. Rendering null", id); return null; } - const img = node.js_imageLookup(image.toLowerCase()); const frameNum = node.getcurframe(); let style = {}; diff --git a/modern/src/initialize.js b/modern/src/initialize.js index 42e5494a..762b2529 100644 --- a/modern/src/initialize.js +++ b/modern/src/initialize.js @@ -44,7 +44,8 @@ async function prepareMakiImage(node, zip, file) { function imageAttributesFromNode(node) { if (!node.name) return []; switch (node.name.toLowerCase()) { - case "layer": { + case "layer": + case "animatedlayer": { return ["image"]; } case "layout": { diff --git a/modern/src/runtime/AnimatedLayer.ts b/modern/src/runtime/AnimatedLayer.ts index 599fc19d..ec92fe05 100644 --- a/modern/src/runtime/AnimatedLayer.ts +++ b/modern/src/runtime/AnimatedLayer.ts @@ -55,7 +55,7 @@ class AnimatedLayer extends Layer { return; } - const image = this.js_imageLookup(attributes.image); + const image = attributes.js_assets.image; if (!image) { console.warn("Could not find image: ", attributes.image); return;