{"id":1571,"date":"2018-02-02T23:10:56","date_gmt":"2018-02-02T15:10:56","guid":{"rendered":"http:\/\/39.100.100.179\/?p=1571"},"modified":"2021-12-22T16:53:57","modified_gmt":"2021-12-22T08:53:57","slug":"egret%e7%99%bd%e9%b9%ad%e4%b9%8bwtween%e7%bc%93%e5%8a%a8%e5%8a%a8%e7%94%bb%ef%bc%88%e7%ae%80%e6%b4%81%e3%80%81%e9%ab%98%e6%95%88%e3%80%81%e5%bc%80%e6%ba%90%ef%bc%89","status":"publish","type":"post","link":"http:\/\/www.u3d8.com\/?p=1571","title":{"rendered":"Egret\u767d\u9e6d\u4e4bWTween\u7f13\u52a8\u52a8\u753b\uff08\u7b80\u6d01\u3001\u9ad8\u6548\u3001\u5f00\u6e90\uff09"},"content":{"rendered":"<h2>\u4ecb\u7ecd<\/h2>\n<p>\u8fd9\u6bb5\u65f6\u95f4\u7814\u7a76\u4e86\u5fae\u4fe1\u5c0f\u6e38\u620f\uff0c\u7531\u4e8e\u767d\u9e6d\u81ea\u8eab\u7684Tween\u52a8\u753b\u6548\u7387\u8f83\u5dee\uff0c\u5c31\u5c1d\u8bd5\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93<\/p>\n<p>\u4e8e\u662f\u5728\u7f51\u4e0a\u627e\u5230\u4e86GreenSock\u5e93\uff0c\u4f46\u4e0d\u6e05\u695a\u662f\u5c0f\u6e38\u620f\u4e0d\u517c\u5bb9\u8fd8\u662f\u522b\u7684\u4ec0\u4e48\u539f\u56e0\uff0c\u6298\u817e\u597d\u4e45\u4e5f\u6ca1\u5f04\u4e0a<\/p>\n<p>\u6700\u540e\u5b9e\u5728\u6ca1\u529e\u6cd5\uff0c\u81ea\u5df1\u5199\u4e86\u4e2aTween\u5e93<\/p>\n<p>\u6458\u53d6\u7f51\u866b\u866b\u7b2c\u4e00\u4e2a\u5b57\u6bcdW\uff0c\u4e8e\u662f\u540d\u5b57\u5c31\u51fa\u6765\u5566\u00a0 WTween~~<\/p>\n<p>\u67e5\u770b\u52a8\u753b\u6f14\u793a\uff1a<a href=\"https:\/\/wow.techbrood.com\/static\/20161006\/16237.html\" target=\"_blank\" rel=\"noopener\">\u7f13\u52a8\u793a\u4f8b\u6f14\u793a<\/a><\/p>\n<p>\u52a8\u753b\u7b97\u6cd5\u6765\u81ea\uff1a<a href=\"http:\/\/dsqiu.iteye.com\/blog\/2001007\" target=\"_blank\" rel=\"noopener\">TextFx\u2014\u2014Ease Function(\u7f13\u52a8\u51fd\u6570)<\/a><\/p>\n<p>\u611f\u8c22@liuyonggen \u63d0\u4f9bts\u8bed\u8a00\u6280\u672f\u652f\u6301<\/p>\n<h2>\u5305\u542b\u52a8\u753b<\/h2>\n<pre class=\"lang:default decode:true\">    Linear,\n    QuadEaseOut, QuadEaseIn, QuadEaseInOut, QuadEaseOutIn,     \n    ExpoEaseOut, ExpoEaseIn, ExpoEaseInOut, ExpoEaseOutIn,\n    CubicEaseOut, CubicEaseIn, CubicEaseInOut, CubicEaseOutIn,\n    QuartEaseOut, QuartEaseIn, QuartEaseInOut, QuartEaseOutIn,\n    QuintEaseOut, QuintEaseIn, QuintEaseInOut, QuintEaseOutIn,\n    CircEaseOut, CircEaseIn, CircEaseInOut, CircEaseOutIn,\n    SineEaseOut, SineEaseIn, SineEaseInOut, SineEaseOutIn,\n    ElasticEaseOut, ElasticEaseIn, ElasticEaseInOut, ElasticEaseOutIn,\n    BounceEaseOut, BounceEaseIn, BounceEaseInOut, BounceEaseOutIn,\n    BackEaseOut, BackEaseIn, BackEaseInOut, BackEaseOutIn<\/pre>\n<h2>\u6548\u679c\u5c55\u793a<\/h2>\n<p><a href=\"http:\/\/www.u3d8.com\/wp-content\/uploads\/2018\/02\/wtween.gif\" data-lightbox=\"image_lg\"><img title=\"Egret\u767d\u9e6d\u4e4bWTween\u7f13\u52a8\u52a8\u753b\uff08\u7b80\u6d01\u3001\u9ad8\u6548\u3001\u5f00\u6e90\uff09 - \u7b2c1\u5f20  | u3d8\u6280\u672f\u5206\u4eab\" alt=\"Egret\u767d\u9e6d\u4e4bWTween\u7f13\u52a8\u52a8\u753b\uff08\u7b80\u6d01\u3001\u9ad8\u6548\u3001\u5f00\u6e90\uff09 - \u7b2c1\u5f20  | u3d8\u6280\u672f\u5206\u4eab\"  loading=\"lazy\" class=\"alignnone size-full wp-image-1577\"  data-src=\"http:\/\/www.u3d8.com\/wp-content\/uploads\/2018\/02\/wtween.gif\" width=\"545\" height=\"776\" \/><\/a><\/p>\n<h2>\u6e90\u7801<\/h2>\n<p>\u6d4b\u8bd5\u4ee3\u7801<\/p>\n<pre class=\"lang:js decode:true\">    \/**\n     * \u521b\u5efa\u573a\u666f\u754c\u9762\n     * Create scene interface\n     *\/\n    protected createGameScene(): void {\n        \n        for(var i = 0; i &lt; 5; i++)\n        { \n            let icon: egret.Bitmap = this.createBitmapByName(\"egret_icon_png\");\n            this.addChild(icon);\n            icon.x = 26 + i * 120;\n            icon.y = 33;\n\n\n            WTween.Play(new WTweener()\n            .get(icon, -1)\n            .to({y:800, alpha:0.5}, 2000, WTweenType.BounceEaseOut)\n            .call(()=&gt;{\n                console.log(\"\u56de\u8c031\", new Date());\n            })\n            .wait(1000)\n            .call(()=&gt;{\n                console.log(\"\u56de\u8c032\", new Date());\n            }));\n        }\n    }<\/pre>\n<p>\u52a8\u753b\u5e93\u6587\u4ef6<\/p>\n<pre class=\"lang:js decode:true \">enum WTweenType\n{\n    Linear,\n    QuadEaseOut, QuadEaseIn, QuadEaseInOut, QuadEaseOutIn,     \n    ExpoEaseOut, ExpoEaseIn, ExpoEaseInOut, ExpoEaseOutIn,\n    CubicEaseOut, CubicEaseIn, CubicEaseInOut, CubicEaseOutIn,\n    QuartEaseOut, QuartEaseIn, QuartEaseInOut, QuartEaseOutIn,\n    QuintEaseOut, QuintEaseIn, QuintEaseInOut, QuintEaseOutIn,\n    CircEaseOut, CircEaseIn, CircEaseInOut, CircEaseOutIn,\n    SineEaseOut, SineEaseIn, SineEaseInOut, SineEaseOutIn,\n    ElasticEaseOut, ElasticEaseIn, ElasticEaseInOut, ElasticEaseOutIn,\n    BounceEaseOut, BounceEaseIn, BounceEaseInOut, BounceEaseOutIn,\n    BackEaseOut, BackEaseIn, BackEaseInOut, BackEaseOutIn\n}\n \nclass WTweener\n{\n    public stepBackups = [];\n    public step = [];\n    public target : any;\n    public loop : number;  \/\/ -1 \u65e0\u9650\u5faa\u73af\uff1b0 \u6267\u884c\u4e00\u6b21\n    public index : number = 0;\n \n    \/\/\/ &lt;param name=\"target\"&gt;\u52a8\u753b\u76ee\u6807&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"loop\"&gt;\u5faa\u73af\u6b21\u6570 -1 \u65e0\u9650\u5faa\u73af\uff1b0 \u6267\u884c\u4e00\u6b21&lt;\/param&gt;   \n    public get(target : any, loop : number = 0)\n    {\n        this.target = target;\n        this.loop = loop;\n        return this;\n    }\n \n    \/\/\/ &lt;param name=\"params\"&gt;\u53c2\u6570 \u683c\u5f0f\u4e3a\uff1a{x:10,y:20}&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"time\"&gt;\u52a8\u753b\u65f6\u957f&lt;\/param&gt; \n    \/\/\/ &lt;param name=\"ease\"&gt;\u7f13\u52a8\u6548\u679c\u7c7b\u578b&lt;\/param&gt; \n    public to(params : any, time : number, ease : WTweenType = WTweenType.Linear)\n    {\n        var obj : any = {};\n        obj.type = \"to\";\n        obj.startValues = Tools.Copy(params);\n        obj.endValues = params;\n        obj.endTime = time;\n        obj.currentTime = 0;\n        obj.ease = ease;\n        obj.index = this.index++;\n        if(obj.index == 0)\n        {\n            for(var key in obj.startValues)\n            {\n                obj.startValues[key] = this.target[key];\n            }\n        }\n        this.step.push(obj);\n        if(this.loop != 0 &amp;&amp; this.loop != 1)\n            this.stepBackups.push(Tools.Copy(obj));\n        return this;\n    }\n \n    \/\/\/ &lt;param name=\"func\"&gt;\u65b9\u6cd5&lt;\/param&gt;  \n    public call(func)\n    {\n        var obj : any = {};\n        obj.type = \"call\";\n        obj.func = func;\n        this.step.push(obj);\n        if(this.loop != 0 &amp;&amp; this.loop != 1)\n            this.stepBackups.push(Tools.Copy(obj));\n        return this;\n    }\n \n    \/\/\/ &lt;param name=\"time\"&gt;\u52a8\u753b\u65f6\u957f&lt;\/param&gt; \n    public wait(time : number)\n    {\n        var obj : any = {};\n        obj.type = \"wait\";\n        obj.endTime = time;\n        obj.currentTime = 0;\n        this.step.push(obj);\n        if(this.loop != 0 &amp;&amp; this.loop != 1)\n            this.stepBackups.push(Tools.Copy(obj));\n        return this;\n    } \n}\n \nclass WTween\n{ \n    private static tweenTable : Array&lt;WTweener&gt; = new Array();\n\n    \/\/\/ \u5728Main.ts\u4e2d\u521d\u59cb\u5316\u540e\u8c03\u7528\u8be5\u65b9\u6cd5\u7ed9WTween\u6dfb\u52a0\u5fc3\u8df3\n    public static Init()\n    {\n        egret.startTick(this.Update,this);\n    }\n \n    public static Play(wTweener : WTweener)\n    {\n        this.tweenTable.push(wTweener);\n        return  wTweener;\n    }\n \n    public static Stop(wTweener : WTweener) \n    {\n        var index = -1;\n        for(var i = 0; i &lt; this.tweenTable.length; i++)\n        {\n            if(this.tweenTable[i] == wTweener)\n            {\n                index = i;\n                break;\n            }\n        }\n        if(index != -1)\n            this.tweenTable.splice(index, 1);\n    }\n \n    private static timeOnEnterFrame:number = 0;\n    private static Update(timeStamp:number)\n    {        \n        var now = timeStamp;\n        var time = this.timeOnEnterFrame;\n        var pass = now - time;\n        this.timeOnEnterFrame = now;\n \n        for(var i = 0; i &lt; this.tweenTable.length; i++)\n        {\n            switch(this.tweenTable[i].step[0][\"type\"])\n            {\n                case \"to\":              \n                    if(this.tweenTable[i].step[0][\"currentTime\"] == 0)\n                    {\n                        if(this.tweenTable[i].step[0][\"index\"] != 0)\n                        {\n                            for(var key in this.tweenTable[i].step[0][\"startValues\"])\n                            {  \n                                this.tweenTable[i].step[0][\"startValues\"][key] = this.tweenTable[i].target[key];\n                                this.tweenTable[i].stepBackups.forEach((value,index,array)=&gt;{\n                                if(value[\"index\"] != null &amp;&amp; value[\"index\"] == this.tweenTable[i].step[0][\"index\"])\n                                    this.tweenTable[i].stepBackups[index][\"startValues\"][key] = this.tweenTable[i].target[key];\n                                })\n                            }\n                        }\n                    }  \n                    if(this.tweenTable[i].step[0][\"currentTime\"] + pass &lt; this.tweenTable[i].step[0][\"endTime\"])\n                    {\n                        this.tweenTable[i].step[0][\"currentTime\"] += pass;\n                        this.DoTween(this.tweenTable[i].target, this.tweenTable[i].step[0])\n                    }\n                    else\n                    { \n                        for(var key in this.tweenTable[i].step[0][\"endValues\"])\n                            this.tweenTable[i].target[key] = this.tweenTable[i].step[0][\"endValues\"][key];\n                        this.tweenTable[i].step.shift();\n                    }\n                break;\n                case \"call\":\n                    if(this.tweenTable[i].step[0][\"func\"] != null)\n                        this.tweenTable[i].step[0][\"func\"].call();\n                    this.tweenTable[i].step.shift();\n                break;\n                case \"wait\":\n                    if(this.tweenTable[i].step[0][\"currentTime\"] &lt; this.tweenTable[i].step[0][\"endTime\"])\n                        this.tweenTable[i].step[0][\"currentTime\"] += pass;\n                    else\n                        this.tweenTable[i].step.shift();\n                break;\n            }\n            if(this.tweenTable[i].step.length == 0)\n            {\n                if(this.tweenTable[i].loop &gt; 1 || this.tweenTable[i].loop == -1)\n                {\n                    if(this.tweenTable[i].loop &gt; 1)\n                        this.tweenTable[i].loop--;\n                    this.tweenTable[i].step = Tools.Copy(this.tweenTable[i].stepBackups);\n                    for(var j = 0; j &lt; this.tweenTable[i].stepBackups.length; j++)\n                    {\n                        if(this.tweenTable[i].stepBackups[j][\"type\"] == \"to\")\n                        {\n                            for(var key in this.tweenTable[i].stepBackups[j][\"startValues\"])\n                            {\n                                this.tweenTable[i].target[key] = this.tweenTable[i].stepBackups[j][\"startValues\"][key];\n                            }\n                            break;\n                        }\n                    }\n                }\n                else\n                    this.Stop(this.tweenTable[i]);\n            }\n        }\n        return true;\n    }\n    \n    private static DoTween(target : any, obj : any)\n    {\n        for(var key in obj[\"endValues\"])\n        {\n            var currentValue = 0;\n            switch(obj[\"ease\"])\n            {\n                case WTweenType.Linear:\n                    currentValue = this.Linear(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.BackEaseIn:\n                    currentValue = this.BackEaseIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.BackEaseInOut:\n                    currentValue = this.BackEaseInOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.BackEaseOut:\n                    currentValue = this.BackEaseOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.BackEaseOutIn:\n                    currentValue = this.BackEaseOutIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.BounceEaseIn:\n                    currentValue = this.BounceEaseIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.BounceEaseInOut:\n                    currentValue = this.BounceEaseInOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.BounceEaseOut:\n                    currentValue = this.BounceEaseOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.BounceEaseOutIn:\n                    currentValue = this.BounceEaseOutIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.CircEaseIn:\n                    currentValue = this.CircEaseIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.CircEaseInOut:\n                    currentValue = this.CircEaseInOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.CircEaseOut:\n                    currentValue = this.CircEaseOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.CircEaseOutIn:\n                    currentValue = this.CircEaseOutIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.CubicEaseIn:\n                    currentValue = this.CubicEaseIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.CubicEaseInOut:\n                    currentValue = this.CubicEaseInOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.CubicEaseOut:\n                    currentValue = this.CubicEaseOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.CubicEaseOutIn:\n                    currentValue = this.CubicEaseOutIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.ElasticEaseIn:\n                    currentValue = this.ElasticEaseIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.ElasticEaseInOut:\n                    currentValue = this.ElasticEaseInOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.ElasticEaseOut:\n                    currentValue = this.ElasticEaseOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.ElasticEaseOutIn:\n                    currentValue = this.ElasticEaseOutIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.ExpoEaseIn:\n                    currentValue = this.ExpoEaseIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.ExpoEaseInOut:\n                    currentValue = this.ExpoEaseInOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.ExpoEaseOut:\n                    currentValue = this.ExpoEaseOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.ExpoEaseOutIn:\n                    currentValue = this.ExpoEaseOutIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.QuadEaseIn:\n                    currentValue = this.QuadEaseIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.QuadEaseInOut:\n                    currentValue = this.QuadEaseInOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.QuadEaseOut:\n                    currentValue = this.QuadEaseOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.QuadEaseOutIn:\n                    currentValue = this.QuadEaseOutIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.QuartEaseIn:\n                    currentValue = this.QuartEaseIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.QuartEaseInOut:\n                    currentValue = this.QuartEaseInOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.QuartEaseOut:\n                    currentValue = this.QuartEaseOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.QuartEaseOutIn:\n                    currentValue = this.QuartEaseOutIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.QuintEaseIn:\n                    currentValue = this.QuintEaseIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.QuintEaseInOut:\n                    currentValue = this.QuintEaseInOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.QuintEaseOut:\n                    currentValue = this.QuintEaseOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.QuintEaseOutIn:\n                    currentValue = this.QuintEaseOutIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.SineEaseIn:\n                    currentValue = this.SineEaseIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.SineEaseInOut:\n                    currentValue = this.SineEaseInOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.SineEaseOut:\n                    currentValue = this.SineEaseOut(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                case WTweenType.SineEaseOutIn:\n                    currentValue = this.SineEaseOutIn(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n                default:\n                    currentValue = this.Linear(obj[\"currentTime\"], 0, obj[\"endValues\"][key] - obj[\"startValues\"][key], obj[\"endTime\"]);\n                    break;\n            }\n            target[key] = currentValue + obj[\"startValues\"][key];\n        }\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a simple linear tweening, with no easing.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static Linear(t : number, b : number, c : number, d : number)\n    {\n        return c * t \/ d + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for an exponential (2^t) easing out:   \n    \/\/\/ decelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static ExpoEaseOut(t : number, b : number, c : number, d : number)\n    {\n        return (t == d) ? b + c : c * (-Math.pow(2, -10 * t \/ d) + 1) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for an exponential (2^t) easing in:   \n    \/\/\/ accelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static ExpoEaseIn(t : number, b : number, c : number, d : number)\n    {\n        return (t == 0) ? b : c * Math.pow(2, 10 * (t \/ d - 1)) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for an exponential (2^t) easing in\/out:   \n    \/\/\/ acceleration until halfway, then deceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static ExpoEaseInOut(t : number, b : number, c : number, d : number)\n    {\n        if (t == 0)\n            return b;\n \n        if (t == d)\n            return b + c;\n \n        if ((t \/= d \/ 2) &lt; 1)\n            return c \/ 2 * Math.pow(2, 10 * (t - 1)) + b;\n \n        return c \/ 2 * (-Math.pow(2, -10 * --t) + 2) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for an exponential (2^t) easing out\/in:   \n    \/\/\/ deceleration until halfway, then acceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static ExpoEaseOutIn(t : number, b : number, c : number, d : number)\n    {\n        if (t &lt; d \/ 2)\n            return this.ExpoEaseOut(t * 2, b, c \/ 2, d);\n \n        return this.ExpoEaseIn((t * 2) - d, b + c \/ 2, c \/ 2, d);\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a circular (sqrt(1-t^2)) easing out:   \n    \/\/\/ decelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static CircEaseOut(t : number, b : number, c : number, d : number)\n    {\n        return c * Math.sqrt(1 - (t = t \/ d - 1) * t) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a circular (sqrt(1-t^2)) easing in:   \n    \/\/\/ accelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static CircEaseIn(t : number, b : number, c : number, d : number)\n    {\n        return -c * (Math.sqrt(1 - (t \/= d) * t) - 1) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a circular (sqrt(1-t^2)) easing in\/out:   \n    \/\/\/ acceleration until halfway, then deceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static CircEaseInOut(t : number, b : number, c : number, d : number)\n    {\n        if ((t \/= d \/ 2) &lt; 1)\n            return -c \/ 2 * (Math.sqrt(1 - t * t) - 1) + b;\n \n        return c \/ 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a circular (sqrt(1-t^2)) easing in\/out:   \n    \/\/\/ acceleration until halfway, then deceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static CircEaseOutIn(t : number, b : number, c : number, d : number)\n    {\n        if (t &lt; d \/ 2)\n            return this.CircEaseOut(t * 2, b, c \/ 2, d);\n \n        return this.CircEaseIn((t * 2) - d, b + c \/ 2, c \/ 2, d);\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a quadratic (t^2) easing out:   \n    \/\/\/ decelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static QuadEaseOut(t : number, b : number, c : number, d : number)\n    {\n        return -c * (t \/= d) * (t - 2) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a quadratic (t^2) easing in:   \n    \/\/\/ accelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static QuadEaseIn(t : number, b : number, c : number, d : number)\n    {\n        return c * (t \/= d) * t + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a quadratic (t^2) easing in\/out:   \n    \/\/\/ acceleration until halfway, then deceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static QuadEaseInOut(t : number, b : number, c : number, d : number)\n    {\n        if ((t \/= d \/ 2) &lt; 1)\n            return c \/ 2 * t * t + b;\n \n        return -c \/ 2 * ((--t) * (t - 2) - 1) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a quadratic (t^2) easing out\/in:   \n    \/\/\/ deceleration until halfway, then acceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static QuadEaseOutIn(t : number, b : number, c : number, d : number)\n    {\n        if (t &lt; d \/ 2)\n            return this.QuadEaseOut(t * 2, b, c \/ 2, d);\n \n        return this.QuadEaseIn((t * 2) - d, b + c \/ 2, c \/ 2, d);\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a sinusoidal (sin(t)) easing out:   \n    \/\/\/ decelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static SineEaseOut(t : number, b : number, c : number, d : number)\n    {\n        return c * Math.sin(t \/ d * (Math.PI \/ 2)) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a sinusoidal (sin(t)) easing in:   \n    \/\/\/ accelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static SineEaseIn(t : number, b : number, c : number, d : number)\n    {\n        return -c * Math.cos(t \/ d * (Math.PI \/ 2)) + c + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a sinusoidal (sin(t)) easing in\/out:   \n    \/\/\/ acceleration until halfway, then deceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static SineEaseInOut(t : number, b : number, c : number, d : number)\n    {\n        if ((t \/= d \/ 2) &lt; 1)\n            return c \/ 2 * (Math.sin(Math.PI * t \/ 2)) + b;\n \n        return -c \/ 2 * (Math.cos(Math.PI * --t \/ 2) - 2) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a sinusoidal (sin(t)) easing in\/out:   \n    \/\/\/ deceleration until halfway, then acceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static SineEaseOutIn(t : number, b : number, c : number, d : number)\n    {\n        if (t &lt; d \/ 2)\n            return this.SineEaseOut(t * 2, b, c \/ 2, d);\n \n        return this.SineEaseIn((t * 2) - d, b + c \/ 2, c \/ 2, d);\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a cubic (t^3) easing out:   \n    \/\/\/ decelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static CubicEaseOut(t : number, b : number, c : number, d : number)\n    {\n        return c * ((t = t \/ d - 1) * t * t + 1) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a cubic (t^3) easing in:   \n    \/\/\/ accelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static CubicEaseIn(t : number, b : number, c : number, d : number)\n    {\n        return c * (t \/= d) * t * t + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a cubic (t^3) easing in\/out:   \n    \/\/\/ acceleration until halfway, then deceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static CubicEaseInOut(t : number, b : number, c : number, d : number)\n    {\n        if ((t \/= d \/ 2) &lt; 1)\n            return c \/ 2 * t * t * t + b;\n \n        return c \/ 2 * ((t -= 2) * t * t + 2) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a cubic (t^3) easing out\/in:   \n    \/\/\/ deceleration until halfway, then acceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static CubicEaseOutIn(t : number, b : number, c : number, d : number)\n    {\n        if (t &lt; d \/ 2)\n            return this.CubicEaseOut(t * 2, b, c \/ 2, d);\n \n        return this.CubicEaseIn((t * 2) - d, b + c \/ 2, c \/ 2, d);\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a quartic (t^4) easing out:   \n    \/\/\/ decelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static QuartEaseOut(t : number, b : number, c : number, d : number)\n    {\n        return -c * ((t = t \/ d - 1) * t * t * t - 1) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a quartic (t^4) easing in:   \n    \/\/\/ accelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static QuartEaseIn(t : number, b : number, c : number, d : number)\n    {\n        return c * (t \/= d) * t * t * t + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a quartic (t^4) easing in\/out:   \n    \/\/\/ acceleration until halfway, then deceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static QuartEaseInOut(t : number, b : number, c : number, d : number)\n    {\n        if ((t \/= d \/ 2) &lt; 1)\n            return c \/ 2 * t * t * t * t + b;\n \n        return -c \/ 2 * ((t -= 2) * t * t * t - 2) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a quartic (t^4) easing out\/in:   \n    \/\/\/ deceleration until halfway, then acceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static QuartEaseOutIn(t : number, b : number, c : number, d : number)\n    {\n        if (t &lt; d \/ 2)\n            return this.QuartEaseOut(t * 2, b, c \/ 2, d);\n \n        return this.QuartEaseIn((t * 2) - d, b + c \/ 2, c \/ 2, d);\n    } \n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a quintic (t^5) easing out:   \n    \/\/\/ decelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static QuintEaseOut(t : number, b : number, c : number, d : number)\n    {\n        return c * ((t = t \/ d - 1) * t * t * t * t + 1) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a quintic (t^5) easing in:   \n    \/\/\/ accelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static QuintEaseIn(t : number, b : number, c : number, d : number)\n    {\n        return c * (t \/= d) * t * t * t * t + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a quintic (t^5) easing in\/out:   \n    \/\/\/ acceleration until halfway, then deceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static QuintEaseInOut(t : number, b : number, c : number, d : number)\n    {\n        if ((t \/= d \/ 2) &lt; 1)\n            return c \/ 2 * t * t * t * t * t + b;\n        return c \/ 2 * ((t -= 2) * t * t * t * t + 2) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a quintic (t^5) easing in\/out:   \n    \/\/\/ acceleration until halfway, then deceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static QuintEaseOutIn(t : number, b : number, c : number, d : number)\n    {\n        if (t &lt; d \/ 2)\n            return this.QuintEaseOut(t * 2, b, c \/ 2, d);\n        return this.QuintEaseIn((t * 2) - d, b + c \/ 2, c \/ 2, d);\n    } \n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for an elastic (exponentially decaying sine wave) easing out:   \n    \/\/\/ decelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static ElasticEaseOut(t : number, b : number, c : number, d : number)\n    {\n        if ((t \/= d) == 1)\n            return b + c;\n \n        var p = d * 0.3;\n        var s = p \/ 4;\n \n        return (c * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) \/ p) + c + b);\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for an elastic (exponentially decaying sine wave) easing in:   \n    \/\/\/ accelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static ElasticEaseIn(t : number, b : number, c : number, d : number)\n    {\n        if ((t \/= d) == 1)\n            return b + c;\n \n        var p = d * 0.3;\n        var s = p \/ 4;\n \n        return -(c * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) \/ p)) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for an elastic (exponentially decaying sine wave) easing in\/out:   \n    \/\/\/ acceleration until halfway, then deceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static ElasticEaseInOut(t : number, b : number, c : number, d : number)\n    {\n        if ((t \/= d \/ 2) == 2)\n            return b + c;\n \n        var p = d * (0.3 * 1.5);\n        var s = p \/ 4;\n \n        if (t &lt; 1)\n            return -0.5 * (c * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) \/ p)) + b;\n        return c * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) \/ p) * 0.5 + c + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for an elastic (exponentially decaying sine wave) easing out\/in:   \n    \/\/\/ deceleration until halfway, then acceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static ElasticEaseOutIn(t : number, b : number, c : number, d : number)\n    {\n        if (t &lt; d \/ 2)\n            return this.ElasticEaseOut(t * 2, b, c \/ 2, d);\n        return this.ElasticEaseIn((t * 2) - d, b + c \/ 2, c \/ 2, d);\n    } \n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a bounce (exponentially decaying parabolic bounce) easing out:   \n    \/\/\/ decelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static BounceEaseOut(t : number, b : number, c : number, d : number)\n    {\n        if ((t \/= d) &lt; (1 \/ 2.75))\n            return c * (7.5625 * t * t) + b;\n        else if (t &lt; (2 \/ 2.75))\n            return c * (7.5625 * (t -= (1.5 \/ 2.75)) * t + 0.75) + b;\n        else if (t &lt; (2.5 \/ 2.75))\n            return c * (7.5625 * (t -= (2.25 \/ 2.75)) * t + 0.9375) + b;\n        else\n            return c * (7.5625 * (t -= (2.625 \/ 2.75)) * t + .984375) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in:   \n    \/\/\/ accelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static BounceEaseIn(t : number, b : number, c : number, d : number)\n    {\n        return c - this.BounceEaseOut(d - t, 0, c, d) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in\/out:   \n    \/\/\/ acceleration until halfway, then deceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static BounceEaseInOut(t : number, b : number, c : number, d : number)\n    {\n        if (t &lt; d \/ 2)\n            return this.BounceEaseIn(t * 2, 0, c, d) * 0.5 + b;\n        else\n            return this.BounceEaseOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a bounce (exponentially decaying parabolic bounce) easing out\/in:   \n    \/\/\/ deceleration until halfway, then acceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static BounceEaseOutIn(t : number, b : number, c : number, d : number)\n    {\n        if (t &lt; d \/ 2)\n            return this.BounceEaseOut(t * 2, b, c \/ 2, d);\n        return this.BounceEaseIn((t * 2) - d, b + c \/ 2, c \/ 2, d);\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing out:   \n    \/\/\/ decelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static BackEaseOut(t : number, b : number, c : number, d : number)\n    {\n        return c * ((t = t \/ d - 1) * t * ((1.70158 + 1) * t + 1.70158) + 1) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing in:   \n    \/\/\/ accelerating from zero velocity.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static BackEaseIn(t : number, b : number, c : number, d : number)\n    {\n        return c * (t \/= d) * t * ((1.70158 + 1) * t - 1.70158) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing in\/out:   \n    \/\/\/ acceleration until halfway, then deceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static BackEaseInOut(t : number, b : number, c : number, d : number)\n    {\n        var s = 1.70158;\n        if ((t \/= d \/ 2) &lt; 1)\n            return c \/ 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;\n        return c \/ 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;\n    }\n \n    \/\/\/ &lt;summary&gt;  \n    \/\/\/ Easing equation function for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing out\/in:   \n    \/\/\/ deceleration until halfway, then acceleration.  \n    \/\/\/ &lt;\/summary&gt;  \n    \/\/\/ &lt;param name=\"t\"&gt;Current time in seconds.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"b\"&gt;Starting value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"c\"&gt;Final value.&lt;\/param&gt;  \n    \/\/\/ &lt;param name=\"d\"&gt;Duration of animation.&lt;\/param&gt;  \n    \/\/\/ &lt;returns&gt;The correct value.&lt;\/returns&gt;  \n    public static BackEaseOutIn(t : number, b : number, c : number, d : number)\n    {\n        if (t &lt; d \/ 2)\n            return this.BackEaseOut(t * 2, b, c \/ 2, d);\n        return this.BackEaseIn((t * 2) - d, b + c \/ 2, c \/ 2, d);\n    }\n}<\/pre>\n<p>\u6570\u7ec4\u53caJson\u6df1\u5ea6\u62f7\u8d1d\u811a\u672c<\/p>\n<pre class=\"lang:js decode:true \">class Tools{\n\n    public static Copy (o) {\n        if (o instanceof Array) \n        {\n            var a = [];\n            for (var i = 0; i &lt; o.length; ++i) {\n                a[i] = Tools.Copy(o[i]);\n            }\n            return a;\n\n        } \n        else if (o instanceof Function) \n        {\n            var b = o;\n            return b;\n        }  \n        else if (o instanceof Object) \n        {\n            var c = {}\n            for (var j in o) {\n                c[j] = Tools.Copy(o[j]);\n            }\n            return c;\n        }\n        else \n        {\n            return o;\n        }\n    }\n}<\/pre>\n<p>\u7ed9WTween\u6dfb\u52a0\u5fc3\u8df3<\/p>\n<pre class=\"lang:default decode:true\">class Main extends eui.UILayer {\n\n    protected createChildren(): void {\n        super.createChildren();\n\n        WTween.Init();<\/pre>\n<p>\u7ecf\u5e38\u4f7f\u7528\u767d\u9e6d\u81ea\u5e26Tween\u52a8\u753b\u7684\u4f1a\u53d1\u73b0 \u8c03\u7528\u65b9\u5f0f\u662f\u8ddfTween\u5dee\u4e0d\u591a\u7684~~<\/p>\n<p>\u672c\u6587\u4e3a\u4f5c\u8005\u539f\u521b\uff0c\u5982\u9700\u8f6c\u8f7d\u8bf7\u8054\u7cfb\u4f5c\u8005\u3002<\/p>\n<p>\u9879\u76ee\u4f7f\u7528\u7248\u672c\uff1aEgretEngine5.1.5 GitHub\u4e0b\u8f7d\u5730\u5740\uff1a<\/p>\n<p><a href=\"https:\/\/github.com\/654306663\/WTween-For-Egret\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/654306663\/WTween-For-Egret<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ecb\u7ecd \u8fd9\u6bb5\u65f6\u95f4\u7814\u7a76\u4e86\u5fae\u4fe1\u5c0f\u6e38\u620f\uff0c\u7531\u4e8e\u767d\u9e6d\u81ea\u8eab\u7684Tween\u52a8\u753b\u6548\u7387\u8f83\u5dee\uff0c\u5c31\u5c1d\u8bd5\u4f7f\u7528 &hellip; <a href=\"http:\/\/www.u3d8.com\/?p=1571\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[103],"tags":[339,338,340],"_links":{"self":[{"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/posts\/1571"}],"collection":[{"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1571"}],"version-history":[{"count":14,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/posts\/1571\/revisions"}],"predecessor-version":[{"id":2427,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=\/wp\/v2\/posts\/1571\/revisions\/2427"}],"wp:attachment":[{"href":"http:\/\/www.u3d8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1571"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.u3d8.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}