【发布时间】:2019-07-20 18:05:53
【问题描述】:
我正在尝试使用 lottie 为在 After Effects 中创建的 SVG 动画制作动画。我使用 bodymovin 扩展来导出 JSON 数据文件。但是,我也注意到导出包含一些 PNG 图像。我也收到控制台错误,提示无法找到 PNG。
我在 AE 中使用 SVG(AI 文件)时为什么要导出 PNG。下面是我的代码和错误。
index.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
});
但我收到以下错误,即无法找到图像。为什么 bodymovin 导出/寻找 pngs?我需要 SVG。
Chrome console errors(抱歉不能嵌入到 10 个代表)
【问题讨论】: