zoukankan      html  css  js  c++  java
  • 【D3】transition API

    摘要:

      动画类API

    一、API 使用

    1. 1 d3.ease

    1.2 d3.timer

    Start a custom animation timer, invoking the specified function repeatedly until it returns true. There is no way to cancel the timer after it starts, so make sure your timer function returns true when done!

    动画开始动作,知道方法返回true 才会停止。 动画开始后不能手动停止,只能方法返回true 才会停止。

    An optional numeric delay in milliseconds may be specified when the given function should only be invoked after a delay. The delay is relative to the specified time in milliseconds since UNIX epoch; if time is not specified, it defaults to Date.now.

    可以设置动画延迟时间,延时单位为毫秒。延迟是和指定的时间相关,如果没制定时间,默认为当前时间。

    You may use delay and time to specify relative and absolute moments in time when the function should start being invoked. For example, a calendar notification might be coded as:

    可以使用延迟和时间指定动画开始的确切时间。例如,日历提醒可以如下编码:

    d3.timer(notify, -4 * 1000 * 60 * 60, +new Date(2012, 09, 29)); // four hours before midnight October 29 (months are zero-based)

    Note that if d3.timer is called within the callback of another timer, the new timer will be invoked immediately at the end of the current frame (if active as determined by the specified delay and time), rather than waiting until the next frame.

    可以看到d3.timer 是在另一时刻被调用,新计时器将立刻被触发 (如果指定动作的延迟和时间),而不是等待下一帧。

    1.3 d3.interpolate

    计划、执行、每天高效的活着学着
  • 相关阅读:
    【新阁教育】爱普生机器人建立工具坐标系教程
    BPF CO-RE 示例代码解析
    gRPC Load Balancing
    Linux Clone函数
    高性能 Nginx HTTPS 调优
    内网渗透测试:内网横向移动基础总结
    Python 运算符
    华为云-容器引擎CCE-部署Nginx应用
    华为云-云容器引擎(CCE)-高危操作及解决方案
    周杰伦新歌《说好不哭》上线,程序员哭了......
  • 原文地址:https://www.cnblogs.com/huxiaoyun90/p/4562550.html
Copyright © 2011-2022 走看看