【发布时间】:2021-03-27 10:59:02
【问题描述】:
谁能建议在 svg 中基于 JPEG 实现基于帧的动画的最佳方法是什么?
我发现的一个例子是这样的:
<svg version="1.1" baseProfile="tiny" id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<image width="320" height="240" xlink:href="test1.jpg">
<animate id='frame_0' attributeName='display' values='inline;none'
dur='0.5s' fill='freeze' begin="0s" repeatCount="indefinite"/>
</image>
<image width="320" height="240" xlink:href="test2.jpg">
<animate id='frame_1' attributeName='display' values='none;inline'
dur='0.5s' fill='freeze' begin="0.5s" repeatCount="indefinite" />
</image>
</svg>
它适用于 2 帧,但不能真正缩放。我想要一个可以处理 100 帧甚至更多帧的东西。
【问题讨论】: