zoukankan      html  css  js  c++  java
  • equestAnimationFrame


    export const requestAnimationFrame = (() => {
    /* istanbul ignore next */
    if (!inBrowser) {
    return noop
    }
    return window.requestAnimationFrame ||
    /* istanbul ignore next */
    window.webkitRequestAnimationFrame ||
    /* istanbul ignore next */
    window.mozRequestAnimationFrame ||
    /* istanbul ignore next */
    window.oRequestAnimationFrame ||
    // if all else fails, use setTimeout
    /* istanbul ignore next */
    function (callback) {
    return window.setTimeout(callback, (callback.interval || DEFAULT_INTERVAL) / 2) // make interval as precise as possible.
    }
    })()

    export const cancelAnimationFrame = (() => {
    /* istanbul ignore next */
    if (!inBrowser) {
    return noop
    }
    return window.cancelAnimationFrame ||
    /* istanbul ignore next */
    window.webkitCancelAnimationFrame ||
    /* istanbul ignore next */
    window.mozCancelAnimationFrame ||
    /* istanbul ignore next */
    window.oCancelAnimationFrame ||
    /* istanbul ignore next */
    function (id) {
    window.clearTimeout(id)
    }
    })()
  • 相关阅读:
    数组元素的查找1
    排序——选择排序
    排序——冒泡排序
    内部类——匿名内部类
    跳一跳
    数组元素换位置游戏
    六 java和Tomcat
    九 Jenkins持续集成
    八 ip和子网详解
    七 Git版本控制
  • 原文地址:https://www.cnblogs.com/liuhao-web/p/10756081.html
Copyright © 2011-2022 走看看