Appearance
除了SMIL动画,通过SVG其他属性,也能制作很精美的动画效果:
Animated line drawing in SVG - jakearchibald
- 通过
<path stroke-dasharray="" stroke-dashoffset="">
的2个属性制作路径动画 - 可通过
path.getTotalLength()
方法获取路径的总长度
- 通过
How SVG Line Animation Works - @csstricks
- 详细介绍
stroke-dasharray
+stroke-dashoffset
+CSS animations
制作动画的原理
- 详细介绍
- 先介绍svg基础
- 列举出SVG动画的几种方式:
- SMIL动画 + 例子
- SMIL + 路径动画
- 描边动画 ->
stroke-dasharray
+stroke-dashoffset
属性的使用 - 轨迹动画 -> SMIL中
<animationMotion>
天然支持轨迹动画
🚀Animate Anything Along an SVG Path - @tympanus 主要是SVG结合GSAP制作动画
gsap + path的
getPointAtLength()
制作酷炫动画效果gsap +
getTotalLength()
制作沿路径运动动画效果SVG + THREEJS 制作3D动画效果
2023年01月11日18:03:01