我正在尝试使用 lottie 为 After Effects 中创建的 SVG 动画制作动画。我使用 bodymovin 扩展来导出 JSON 数据文件。但是,我也注意到导出包含一些 PNG 图像。我还收到控制台错误,说找不到 PNG。
当我在 AE 中使用 SVG(AI 文件)时,为什么要导出 PNG。下面是我的代码和错误。
索引.ts
import * as lottie from 'lottie-web';
import * as header from './assets/header.json';
import './css/base.sss';
var animation = lottie.loadAnimation({
container: document.getElementById('header'),
animationData: header,
renderer: 'svg/canvas/html',
autoplay: true
});
Run Code Online (Sandbox Code Playgroud)
但是我收到以下错误,无法找到图像。为什么 bodymovin 导出/寻找 png?我需要SVG。
Chrome 控制台错误(对不起,直到 10 次才能嵌入)