gpt4 book ai didi

svg - 为什么 bodymovin 导出 PNG 而不是 SVG?

转载 作者:行者123 更新时间:2023-12-03 20:17:20 27 4
gpt4 key购买 nike

我正在尝试使用 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 导出/寻找 png?我需要SVG。

Chrome console errors (对不起,直到 10 人才能嵌入)

最佳答案

我发现了问题。如 here 所述,我必须在 AI 中将路径转换为形状.

关于svg - 为什么 bodymovin 导出 PNG 而不是 SVG?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48907867/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com