Skip to content

JS实现高性能动画优化的黄金法则 #44

Open

Description

@Yangxiaqing

边界判断的时候需要加步长

使用setTimeout实现轮循动画,每一次要把没用的定时器销毁掉

如果move方法需要传参的话,里面要写一个小move来避免不销毁作用域的累积

让当前的元素在同一时间只运行一个动画,我们把定时器的返回值放在当前元素的自定义属性上

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions