代码之家  ›  专栏  ›  技术社区  ›  tic

d3加速/减速运动的缓解功能

  •  0
  • tic  · 技术社区  · 7 年前

    什么 easing functions 我有没有用过渡来模拟d3中的匀速加速运动和匀速减速运动?

    1 回复  |  直到 7 年前
        1
  •  1
  •   theCaveat    7 年前

    对于恒定加速度,缓和应为平方指数。

    (t) => t * t
    

    内置的 d3easeQuad(t) 是你想要的。

    编辑:没有看到@riov8的评论。抱歉重复了一遍,