• 一些API


    /**
    * Goto the specified frame index, and pause at this index.
    * @param startIndex The animation will pause at this index.
    */
    gotoFrameAndPause: function(startIndex){
    this._startFrame = this._currentFrame = startIndex;
    this._time = this._currentFrame * this._frameInternal;

    this.pause();
    this._gotoFrame(this._currentFrame);
    },
    action.gotoFrameAndPause(0)
        _gotoFrame: function(frameIndex){
            var size = this._timelineList.length;
            for(var i = 0; i < size; i++)
            {
                this._timelineList[i]._gotoFrame(frameIndex);
            }
        },
     /**
         * Goto the specified frame index, and start playing from this index.
         * @param startIndex The animation will play from this index.
         * @param [endIndex=] The animation will end at this index.
         * @param [currentFrameIndex=] set current frame index.
         * @param [loop=] Whether or not the animation need loop.
         */
        gotoFrameAndPlay: function(startIndex, endIndex, currentFrameIndex, loop){
            //Consolidation parameters
            var i = 0,
                argLen = arguments.length;
            var num = [],
                bool;
            for(i; i<argLen; i++){
                if(typeof arguments[i] === "boolean"){
                    bool = arguments[i];
                }else{
                    num.push(arguments[i]);
                }
            }
            startIndex = num[0];
            endIndex = num[1] || this._duration;
            currentFrameIndex = num[2] || startIndex;
            loop = bool!=null ? bool : true;
    
            this._startFrame = startIndex;
            this._endFrame = endIndex;
            this._currentFrame = currentFrameIndex;
            this._loop = loop;
            this._time = this._currentFrame * this._frameInternal;
    
            this.resume();
            this._gotoFrame(this._currentFrame);
        },
  • 相关阅读:
    Trying to access array offset on value of type null
    关于git的功能使用介绍
    魔法方法简介
    Celery介绍,基于django框架,场景例如短信发送。
    ksql 使用
    VSCode 运行 java project
    mongoclusterdocker
    Kafka 学习资料
    [转载] Kafka Rest Api的使用
    Windows 上连接虚拟机上docker的kafka报错unknown host
  • 原文地址:https://www.cnblogs.com/kanekiken/p/7358815.html
Copyright © 2020-2023  润新知