var cc=cc||{};cc._tmp=cc._tmp||{};cc._LogInfos={};_p=window;_p=Object.prototype;delete window._p;cc.newElement=function(a){return document.createElement(a)};cc._addEventListener=function(a,b,c,d){a.addEventListener(b,c,d)};cc._isNodeJs="undefined"!==typeof require&&require("fs");cc.each=function(a,b,c){if(a)if(a instanceof Array)for(var d=0,e=a.length;de)throw"arguments error!"; "function"==typeof b&&(b={iterator:b});if(void 0!==c)b.cb=c||b.cb;else if(void 0===a)throw"arguments error!";var f=(e=a instanceof Array)?a.length:Object.keys(a).length;if(0===f)b.cb&&b.cb.call(b.cbTarget,null);else{var g={length:f,count:f,option:b,results:e?[]:{}};cc.each(a,function(a,c){if(g.err)return!1;var e=!b.cb?d._emptyFunc:d._counterFunc.bind({counter:g,index:c});b.iterator.call(b.iteratorTarget,a,c,e)})}}}; cc.path={join:function(){for(var a=arguments.length,b="",c=0;cc?a+b+d:a.substring(0,c)+b+d},changeBasename:function(a,b,c){if(0==b.indexOf("."))return this.changeExtname(a,b);var d=a.indexOf("?"),e="";c=c?this.extname(a):"";0=d?0:d+1)+b+c+e}}; cc.loader={_jsCache:{},_register:{},_langPathCache:{},_aliases:{},resPath:"",audioPath:"",cache:{},getXMLHttpRequest:function(){return window.XMLHttpRequest?new window.XMLHttpRequest:new ActiveXObject("MSXML2.XMLHTTP")},_getArgs4Js:function(a){var b=a[0],c=a[1],d=a[2],e=["",null,null];if(1===a.length)e[1]=b instanceof Array?b:[b];else if(2===a.length)"function"==typeof c?(e[1]=b instanceof Array?b:[b],e[2]=c):(e[0]=b||"",e[1]=c instanceof Array?c:[c]);else if(3===a.length)e[0]=b||"",e[1]=c instanceof Array?c:[c],e[2]=d;else throw"arguments error to load js!";return e},loadJs:function(a,b,c){var d=this,e=d._jsCache,f=d._getArgs4Js(arguments);-1=b.length)d&&d();else{var e=this;e._createScript(cc.path.join(a,b[c]),!1,function(f){if(f)return d(f);e._loadJs4Dependency(a,b,c+1,d)})}},_loadJsImg:function(){var a= document,b=a.getElementById("cocos2d_loadJsImg");if(!b){b=cc.newElement("img");cc._loadingImage&&(b.src=cc._loadingImage);a=a.getElementById(cc.game.config.id);a.style.backgroundColor="black";a.parentNode.appendChild(b);var c=getComputedStyle?getComputedStyle(a):a.currentStyle;c||(c={width:a.width,height:a.height});b.style.left=a.offsetLeft+(parseFloat(c.width)-b.width)/2+"px";b.style.top=a.offsetTop+(parseFloat(c.height)-b.height)/2+"px";b.style.position="absolute"}return b},loadTxt:function(a,b){if(cc._isNodeJs)require("fs").readFile(a, function(a,c){a?b(a):b(null,c.toString())});else{var c=this.getXMLHttpRequest(),d="load "+a+" failed!";c.open("GET",a,!0);/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent)?(c.setRequestHeader("Accept-Charset","utf-8"),c.onreadystatechange=function(){4==c.readyState&&200==c.status?b(null,c.responseText):b(d)}):(c.overrideMimeType&&c.overrideMimeType("text/plain; charset\x3dutf-8"),c.onload=function(){4==c.readyState&&200==c.status?b(null,c.responseText):b(d)});c.send(null)}},_loadTxtSync:function(a){if(cc._isNodeJs)return require("fs").readFileSync(a).toString(); var b=this.getXMLHttpRequest();b.open("GET",a,!1);/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent)?b.setRequestHeader("Accept-Charset","utf-8"):b.overrideMimeType&&b.overrideMimeType("text/plain; charset\x3dutf-8");b.send(null);return 4==!b.readyState||200!=b.status?null:b.responseText},loadJson:function(a,b){this.loadTxt(a,function(c,d){try{c?b(c):b(null,JSON.parse(d))}catch(e){throw"load json ["+a+"] failed : "+e;}})},_checkIsImageURL:function(a){return null!=/(\.png)|(\.jpg)|(\.bmp)|(\.jpeg)|(\.gif)/.exec(a)}, loadImg:function(a,b,c){var d=!0;void 0!==c?d=null==b.isCrossOrigin?d:b.isCrossOrigin:void 0!==b&&(c=b);var e=new Image;d&&"file://"!=location.origin&&(e.crossOrigin="Anonymous");cc._addEventListener(e,"load",function(){this.removeEventListener("load",arguments.callee,!1);this.removeEventListener("error",arguments.callee,!1);c&&c(null,e)});cc._addEventListener(e,"error",function(){this.removeEventListener("error",arguments.callee,!1);c&&c("load image failed")});e.src=a;return e},_loadResIterator:function(a, b,c){var d=this,e=null,f=a.type;f?(f="."+f.toLowerCase(),e=a.src?a.src:a.name+f):(e=a,f=cc.path.extname(e));if(b=d.cache[e])return c(null,b);b=d._register[f.toLowerCase()];if(!b)return cc.error("loader for ["+f+"] not exists!"),c();f=b.getBasePath?b.getBasePath():d.resPath;f=d.getUrl(f,e);b.load(f,e,a,function(a,b){a?(cc.log(a),d.cache[e]=null,delete d.cache[e],c()):(d.cache[e]=b,c(null,b))})},getUrl:function(a,b){var c=this._langPathCache,d=cc.path;if(void 0!==a&&void 0===b){b=a;var e=d.extname(b), e=e?e.toLowerCase():"";a=(e=this._register[e])?e.getBasePath?e.getBasePath():this.resPath:this.resPath}b=cc.path.join(a||"",b);if(b.match(/[\/(\\\\)]lang[\/(\\\\)]/i)){if(c[b])return c[b];d=d.extname(b)||"";b=c[b]=b.substring(0,b.length-d.length)+"_"+cc.sys.language+d}return b},load:function(a,b,c){if(void 0!==c)"function"==typeof b&&(b={trigger:b});else if(void 0!==b)"function"==typeof b&&(c=b,b={});else if(void 0!==a)b={};else throw"arguments error!";b.cb=function(a,b){a&&cc.log(a);c&&c(b)};a instanceof Array||(a=[a]);b.iterator=this._loadResIterator;b.iteratorTarget=this;cc.async.map(a,b)},_handleAliases:function(a,b){var c=this._aliases,d=[],e;for(e in a){var f=a[e];c[e]=f;d.push(f)}this.load(d,b)},loadAliases:function(a,b){var c=this,d=c.getRes(a);d?c._handleAliases(d.filenames,b):c.load(a,function(a){c._handleAliases(a[0].filenames,b)})},register:function(a,b){if(a&&b){if("string"==typeof a)return this._register[a.trim().toLowerCase()]=b;for(var c=0,d=a.length;cm.indexOf("core")&&m.splice(0,0,"core");for(var r=0,s=m.length;rc;c++)for(var d=0;256>d;d++)b[String.fromCharCode(c+256*d)]=String.fromCharCode(c)+String.fromCharCode(d);c=IEBinaryToArray_ByteStr(a);a=IEBinaryToArray_ByteStr_Last(a);return c.replace(/[\s\S]/g,function(a){return b[a]})+a}};cc=cc||{};cc._loadingImage="data:image/gif;base64,R0lGODlhEAAQALMNAD8/P7+/vyoqKlVVVX9/fxUVFUBAQGBgYMDAwC8vL5CQkP///wAAAP///wAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFAAANACwAAAAAEAAQAAAEO5DJSau9OOvNex0IMnDIsiCkiW6g6BmKYlBFkhSUEgQKlQCARG6nEBwOgl+QApMdCIRD7YZ5RjlGpCUCACH5BAUAAA0ALAAAAgAOAA4AAAQ6kLGB0JA4M7QW0hrngRllkYyhKAYqKUGguAws0ypLS8JxCLQDgXAIDg+FRKIA6v0SAECCBpXSkstMBAAh+QQFAAANACwAAAAACgAQAAAEOJDJORAac6K1kDSKYmydpASBUl0mqmRfaGTCcQgwcxDEke+9XO2WkxQSiUIuAQAkls0n7JgsWq8RACH5BAUAAA0ALAAAAAAOAA4AAAQ6kMlplDIzTxWC0oxwHALnDQgySAdBHNWFLAvCukc215JIZihVIZEogDIJACBxnCSXTcmwGK1ar1hrBAAh+QQFAAANACwAAAAAEAAKAAAEN5DJKc4RM+tDyNFTkSQF5xmKYmQJACTVpQSBwrpJNteZSGYoFWjIGCAQA2IGsVgglBOmEyoxIiMAIfkEBQAADQAsAgAAAA4ADgAABDmQSVZSKjPPBEDSGucJxyGA1XUQxAFma/tOpDlnhqIYN6MEAUXvF+zldrMBAjHoIRYLhBMqvSmZkggAIfkEBQAADQAsBgAAAAoAEAAABDeQyUmrnSWlYhMASfeFVbZdjHAcgnUQxOHCcqWylKEohqUEAYVkgEAMfkEJYrFA6HhKJsJCNFoiACH5BAUAAA0ALAIAAgAOAA4AAAQ3kMlJq704611SKloCAEk4lln3DQgyUMJxCBKyLAh1EMRR3wiDQmHY9SQslyIQUMRmlmVTIyRaIgA7"; cc._fpsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAAgCAYAA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AmFqEOmOPEfaH+BQd1ueo211IzrgFUYKNAAqI1WztCpUqVCRUqVKgFSpUqAVKlSoBUqVKgFSpUqAVKlSoBUqVKgFSpUqAVKlSoD/9k\x3d";var cc=cc||{},ClassManager={id:0|998*Math.random(),instanceId:0|998*Math.random(),compileSuper:function(a,b,c){a=a.toString();var d=a.indexOf("("),e=a.indexOf(")"),d=a.substring(d+1,e),d=d.trim(),e=a.indexOf("{"),f=a.lastIndexOf("}");for(a=a.substring(e+1,f);-1!=a.indexOf("this._super");){var e=a.indexOf("this._super"),f=a.indexOf("(",e),g=a.indexOf(")",f),g=a.substring(f+1,g),g=(g=g.trim())?",":"";a=a.substring(0,e)+"ClassManager["+c+"]."+b+".call(this"+g+a.substring(f+1)}return Function(d,a)},getNewID:function(){return this.id++}, getNewInstanceId:function(){return this.instanceId++}};ClassManager.compileSuper.ClassManager=ClassManager; (function(){var a=/\b_super\b/,b=cc.game.config[cc.game.CONFIG_KEY.classReleaseMode];b&&console.log("release Mode");cc.Class=function(){};cc.Class.extend=function(c){function d(){this.__instanceId=ClassManager.getNewInstanceId();this.ctor&&this.ctor.apply(this,arguments)}var e=this.prototype,f=Object.create(e),g=ClassManager.getNewID();ClassManager[g]=e;var h={writable:!0,enumerable:!1,configurable:!0};f.__instanceId=null;d.id=g;h.value=g;Object.defineProperty(f,"__pid",h);d.prototype=f;h.value=d; Object.defineProperty(d.prototype,"constructor",h);this.__getters__&&(d.__getters__=cc.clone(this.__getters__));this.__setters__&&(d.__setters__=cc.clone(this.__setters__));for(var k=0,m=arguments.length;k=b.x||a.y>=b.y||a.x+a.width<=b.x+b.width||a.y+a.height<=b.y+b.height)};cc.rectGetMaxX=function(a){return a.x+a.width};cc.rectGetMidX=function(a){return a.x+a.width/2};cc.rectGetMinX=function(a){return a.x};cc.rectGetMaxY=function(a){return a.y+a.height};cc.rectGetMidY=function(a){return a.y+a.height/2};cc.rectGetMinY=function(a){return a.y}; cc.rectContainsPoint=function(a,b){return b.x>=cc.rectGetMinX(a)&&b.x<=cc.rectGetMaxX(a)&&b.y>=cc.rectGetMinY(a)&&b.y<=cc.rectGetMaxY(a)};cc.rectIntersectsRect=function(a,b){var c=a.y+a.height,d=b.x+b.width,e=b.y+b.height;return!(a.x+a.width>16,(a>>8)%256,a%256)}; cc.colorToHex=function(a){var b=a.r.toString(16),c=a.g.toString(16),d=a.b.toString(16);return"#"+(16>a.r?"0"+b:b)+(16>a.g?"0"+c:c)+(16>a.b?"0"+d:d)};cc.TEXT_ALIGNMENT_LEFT=0;cc.TEXT_ALIGNMENT_CENTER=1;cc.TEXT_ALIGNMENT_RIGHT=2;cc.VERTICAL_TEXT_ALIGNMENT_TOP=0;cc.VERTICAL_TEXT_ALIGNMENT_CENTER=1;cc.VERTICAL_TEXT_ALIGNMENT_BOTTOM=2; cc._Dictionary=cc.Class.extend({_keyMapTb:null,_valueMapTb:null,__currId:0,ctor:function(){this._keyMapTb={};this._valueMapTb={};this.__currId=2<<(0|10*Math.random())},__getKey:function(){this.__currId++;return"key_"+this.__currId},setObject:function(a,b){if(null!=b){var c=this.__getKey();this._keyMapTb[c]=b;this._valueMapTb[c]=a}},objectForKey:function(a){if(null==a)return null;var b=this._keyMapTb,c;for(c in b)if(b[c]===a)return this._valueMapTb[c];return null},valueForKey:function(a){return this.objectForKey(a)}, removeObjectForKey:function(a){if(null!=a){var b=this._keyMapTb,c;for(c in b)if(b[c]===a){delete this._valueMapTb[c];delete b[c];break}}},removeObjectsForKeys:function(a){if(null!=a)for(var b=0;bMath.abs(a-c)&&(c=a);2>Math.abs(b-d)&&(d=b);a=cc.rect(Math.round((a-c)/2),Math.round((b-d)/2),c,d);cc._renderType==cc._RENDER_TYPE_CANVAS&&cc._renderContext.translate(a.x,a.y+d);this._result.scale=[e,f];this._result.viewport=a;return this._result},preApply:function(a){},apply:function(a,b){return{scale:[1,1]}},postApply:function(a){}}); (function(){var a=cc.ContainerStrategy.extend({apply:function(a){this._setupContainer(a,a._frameSize.width,a._frameSize.height)}}),b=cc.ContainerStrategy.extend({apply:function(a,b){var c=a._frameSize.width,d=a._frameSize.height,e=cc.container.style,n=b.width,q=b.height,r=c/n,s=d/q,u,t;r>=1}return-1},_removeUsedIndexBit:function(a){0>a|| a>=this._maxTouches||(a=~(1<=c.length?c.push(a):(c[this._preTouchPoolPointer]=a,this._preTouchPoolPointer=(this._preTouchPoolPointer+1)%50))},getTouchByXY:function(a,b,c){var d=this._preTouchPoint;a=this._glView.convertToLocationInView(a,b,c);b=new cc.Touch(a.x,a.y);b._setPrevPoint(d.x,d.y);d.x=a.x;d.y=a.y; return b},getMouseEvent:function(a,b,c){var d=this._prevMousePoint;this._glView._convertMouseToLocationInView(a,b);b=new cc.EventMouse(c);b.setLocation(a.x,a.y);b._setPrevCursor(d.x,d.y);d.x=a.x;d.y=a.y;return b},getPointByEvent:function(a,b){if(null!=a.pageX)return{x:a.pageX,y:a.pageY};b.left-=document.body.scrollLeft;b.top-=document.body.scrollTop;return{x:a.clientX,y:a.clientY}},getTouchesByEvent:function(a,b){for(var c=[],d=this._glView,e,f,g=this._preTouchPoint,h=a.changedTouches.length,k=0;k< h;k++)if(e=a.changedTouches[k]){var m;m=cc.sys.BROWSER_TYPE_FIREFOX===cc.sys.browserType?d.convertToLocationInView(e.pageX,e.pageY,b):d.convertToLocationInView(e.clientX,e.clientY,b);null!=e.identifier?(e=new cc.Touch(m.x,m.y,e.identifier),f=this.getPreTouch(e).getLocation(),e._setPrevPoint(f.x,f.y),this.setPreTouch(e)):(e=new cc.Touch(m.x,m.y),e._setPrevPoint(g.x,g.y));g.x=m.x;g.y=m.y;c.push(e)}return c},registerSystemEvent:function(a){if(!this._isRegisterEvent){var b=this._glView=cc.view,c=this, d="touches"in cc.sys.capabilities;"mouse"in cc.sys.capabilities&&(cc._addEventListener(window,"mousedown",function(){c._mousePressed=!0},!1),cc._addEventListener(window,"mouseup",function(b){var e=c._mousePressed;c._mousePressed=!1;if(e){var e=c.getHTMLElementPosition(a),f=c.getPointByEvent(b,e);cc.rectContainsPoint(new cc.Rect(e.left,e.top,e.width,e.height),f)||(d||c.handleTouchesEnd([c.getTouchByXY(f.x,f.y,e)]),e=c.getMouseEvent(f,e,cc.EventMouse.UP),e.setButton(b.button),cc.eventManager.dispatchEvent(e))}}, !1),cc._addEventListener(a,"mousedown",function(b){c._mousePressed=!0;var e=c.getHTMLElementPosition(a),f=c.getPointByEvent(b,e);d||c.handleTouchesBegin([c.getTouchByXY(f.x,f.y,e)]);e=c.getMouseEvent(f,e,cc.EventMouse.DOWN);e.setButton(b.button);cc.eventManager.dispatchEvent(e);b.stopPropagation();b.preventDefault();a.focus()},!1),cc._addEventListener(a,"mouseup",function(b){c._mousePressed=!1;var e=c.getHTMLElementPosition(a),f=c.getPointByEvent(b,e);d||c.handleTouchesEnd([c.getTouchByXY(f.x,f.y, e)]);e=c.getMouseEvent(f,e,cc.EventMouse.UP);e.setButton(b.button);cc.eventManager.dispatchEvent(e);b.stopPropagation();b.preventDefault()},!1),cc._addEventListener(a,"mousemove",function(b){var e=c.getHTMLElementPosition(a),f=c.getPointByEvent(b,e);d||c.handleTouchesMove([c.getTouchByXY(f.x,f.y,e)]);e=c.getMouseEvent(f,e,cc.EventMouse.MOVE);c._mousePressed?e.setButton(b.button):e.setButton(null);cc.eventManager.dispatchEvent(e);b.stopPropagation();b.preventDefault()},!1),cc._addEventListener(a,"mousewheel", function(b){var d=c.getHTMLElementPosition(a),e=c.getPointByEvent(b,d),d=c.getMouseEvent(e,d,cc.EventMouse.SCROLL);d.setButton(b.button);d.setScrollData(0,b.wheelDelta);cc.eventManager.dispatchEvent(d);b.stopPropagation();b.preventDefault()},!1),cc._addEventListener(a,"DOMMouseScroll",function(b){var d=c.getHTMLElementPosition(a),e=c.getPointByEvent(b,d),d=c.getMouseEvent(e,d,cc.EventMouse.SCROLL);d.setButton(b.button);d.setScrollData(0,-120*b.detail);cc.eventManager.dispatchEvent(d);b.stopPropagation(); b.preventDefault()},!1));if(window.navigator.msPointerEnabled){var e={MSPointerDown:c.handleTouchesBegin,MSPointerMove:c.handleTouchesMove,MSPointerUp:c.handleTouchesEnd,MSPointerCancel:c.handleTouchesCancel},f;for(f in e)(function(b,d){cc._addEventListener(a,b,function(b){var e=c.getHTMLElementPosition(a);e.left-=document.documentElement.scrollLeft;e.top-=document.documentElement.scrollTop;d.call(c,[c.getTouchByXY(b.clientX,b.clientY,e)]);b.stopPropagation()},!1)})(f,e[f])}d&&(cc._addEventListener(a, "touchstart",function(b){if(b.changedTouches){var d=c.getHTMLElementPosition(a);d.left-=document.body.scrollLeft;d.top-=document.body.scrollTop;c.handleTouchesBegin(c.getTouchesByEvent(b,d));b.stopPropagation();b.preventDefault();a.focus()}},!1),cc._addEventListener(a,"touchmove",function(b){if(b.changedTouches){var d=c.getHTMLElementPosition(a);d.left-=document.body.scrollLeft;d.top-=document.body.scrollTop;c.handleTouchesMove(c.getTouchesByEvent(b,d));b.stopPropagation();b.preventDefault()}},!1), cc._addEventListener(a,"touchend",function(b){if(b.changedTouches){var d=c.getHTMLElementPosition(a);d.left-=document.body.scrollLeft;d.top-=document.body.scrollTop;c.handleTouchesEnd(c.getTouchesByEvent(b,d));b.stopPropagation();b.preventDefault()}},!1),cc._addEventListener(a,"touchcancel",function(d){if(d.changedTouches){var e=c.getHTMLElementPosition(a);e.left-=document.body.scrollLeft;e.top-=document.body.scrollTop;b.handleTouchesCancel(c.getTouchesByEvent(d,e));d.stopPropagation();d.preventDefault()}}, !1));this._registerKeyboardEvent();this._registerAccelerometerEvent();this._isRegisterEvent=!0}},_registerKeyboardEvent:function(){},_registerAccelerometerEvent:function(){},update:function(a){this._accelCurTime>this._accelInterval&&(this._accelCurTime-=this._accelInterval,cc.eventManager.dispatchEvent(new cc.EventAcceleration(this._acceleration)));this._accelCurTime+=a}};cc.AffineTransform=function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.d=d;this.tx=e;this.ty=f};cc.affineTransformMake=function(a,b,c,d,e,f){return{a:a,b:b,c:c,d:d,tx:e,ty:f}};cc.pointApplyAffineTransform=function(a,b){return{x:b.a*a.x+b.c*a.y+b.tx,y:b.b*a.x+b.d*a.y+b.ty}};cc._pointApplyAffineTransform=function(a,b,c){return{x:c.a*a+c.c*b+c.tx,y:c.b*a+c.d*b+c.ty}};cc.sizeApplyAffineTransform=function(a,b){return{width:b.a*a.width+b.c*a.height,height:b.b*a.width+b.d*a.height}}; cc.affineTransformMakeIdentity=function(){return{a:1,b:0,c:0,d:1,tx:0,ty:0}};cc.affineTransformIdentity=function(){return{a:1,b:0,c:0,d:1,tx:0,ty:0}}; cc.rectApplyAffineTransform=function(a,b){var c=cc.rectGetMinY(a),d=cc.rectGetMinX(a),e=cc.rectGetMaxX(a),f=cc.rectGetMaxY(a),g=cc._pointApplyAffineTransform(d,c,b),c=cc._pointApplyAffineTransform(e,c,b),d=cc._pointApplyAffineTransform(d,f,b),h=cc._pointApplyAffineTransform(e,f,b),e=Math.min(g.x,c.x,d.x,h.x),f=Math.max(g.x,c.x,d.x,h.x),k=Math.min(g.y,c.y,d.y,h.y),g=Math.max(g.y,c.y,d.y,h.y);return cc.rect(e,k,f-e,g-k)}; cc._rectApplyAffineTransformIn=function(a,b){var c=cc.rectGetMinY(a),d=cc.rectGetMinX(a),e=cc.rectGetMaxX(a),f=cc.rectGetMaxY(a),g=cc._pointApplyAffineTransform(d,c,b),c=cc._pointApplyAffineTransform(e,c,b),d=cc._pointApplyAffineTransform(d,f,b),h=cc._pointApplyAffineTransform(e,f,b),e=Math.min(g.x,c.x,d.x,h.x),f=Math.max(g.x,c.x,d.x,h.x),k=Math.min(g.y,c.y,d.y,h.y),g=Math.max(g.y,c.y,d.y,h.y);a.x=e;a.y=k;a.width=f-e;a.height=g-k;return a}; cc.affineTransformTranslate=function(a,b,c){return{a:a.a,b:a.b,c:a.c,d:a.d,tx:a.tx+a.a*b+a.c*c,ty:a.ty+a.b*b+a.d*c}};cc.affineTransformScale=function(a,b,c){return{a:a.a*b,b:a.b*b,c:a.c*c,d:a.d*c,tx:a.tx,ty:a.ty}};cc.affineTransformRotate=function(a,b){var c=Math.sin(b),d=Math.cos(b);return{a:a.a*d+a.c*c,b:a.b*d+a.d*c,c:a.c*d-a.a*c,d:a.d*d-a.b*c,tx:a.tx,ty:a.ty}}; cc.affineTransformConcat=function(a,b){return{a:a.a*b.a+a.b*b.c,b:a.a*b.b+a.b*b.d,c:a.c*b.a+a.d*b.c,d:a.c*b.b+a.d*b.d,tx:a.tx*b.a+a.ty*b.c+b.tx,ty:a.tx*b.b+a.ty*b.d+b.ty}};cc.affineTransformEqualToTransform=function(a,b){return a.a===b.a&&a.b===b.b&&a.c===b.c&&a.d===b.d&&a.tx===b.tx&&a.ty===b.ty};cc.affineTransformInvert=function(a){var b=1/(a.a*a.d-a.b*a.c);return{a:b*a.d,b:-b*a.b,c:-b*a.c,d:b*a.a,tx:b*(a.c*a.ty-a.d*a.tx),ty:b*(a.b*a.tx-a.a*a.ty)}};cc.POINT_EPSILON=parseFloat("1.192092896e-07F");cc.pNeg=function(a){return cc.p(-a.x,-a.y)};cc.pAdd=function(a,b){return cc.p(a.x+b.x,a.y+b.y)};cc.pSub=function(a,b){return cc.p(a.x-b.x,a.y-b.y)};cc.pMult=function(a,b){return cc.p(a.x*b,a.y*b)};cc.pMidpoint=function(a,b){return cc.pMult(cc.pAdd(a,b),0.5)};cc.pDot=function(a,b){return a.x*b.x+a.y*b.y};cc.pCross=function(a,b){return a.x*b.y-a.y*b.x};cc.pPerp=function(a){return cc.p(-a.y,a.x)};cc.pRPerp=function(a){return cc.p(a.y,-a.x)}; cc.pProject=function(a,b){return cc.pMult(b,cc.pDot(a,b)/cc.pDot(b,b))};cc.pRotate=function(a,b){return cc.p(a.x*b.x-a.y*b.y,a.x*b.y+a.y*b.x)};cc.pUnrotate=function(a,b){return cc.p(a.x*b.x+a.y*b.y,a.y*b.x-a.x*b.y)};cc.pLengthSQ=function(a){return cc.pDot(a,a)};cc.pDistanceSQ=function(a,b){return cc.pLengthSQ(cc.pSub(a,b))};cc.pLength=function(a){return Math.sqrt(cc.pLengthSQ(a))};cc.pDistance=function(a,b){return cc.pLength(cc.pSub(a,b))};cc.pNormalize=function(a){return cc.pMult(a,1/cc.pLength(a))}; cc.pForAngle=function(a){return cc.p(Math.cos(a),Math.sin(a))};cc.pToAngle=function(a){return Math.atan2(a.y,a.x)};cc.clampf=function(a,b,c){if(b>c){var d=b;b=c;c=d}return a=e.x&&0<=e.y&&1>=e.y?!0:!1};cc.pIntersectPoint=function(a,b,c,d){var e=cc.p(0,0);return cc.pLineIntersect(a,b,c,d,e)?(c=cc.p(0,0),c.x=a.x+e.x*(b.x-a.x),c.y=a.y+e.x*(b.y-a.y),c):cc.p(0,0)};cc.pSameAs=function(a,b){return null!=a&&null!=b?a.x==b.x&&a.y==b.y:!1};cc.pZeroIn=function(a){a.x=0;a.y=0};cc.pIn=function(a,b){a.x=b.x;a.y=b.y};cc.pMultIn=function(a,b){a.x*=b;a.y*=b}; cc.pSubIn=function(a,b){a.x-=b.x;a.y-=b.y};cc.pAddIn=function(a,b){a.x+=b.x;a.y+=b.y};cc.pNormalizeIn=function(a){cc.pMultIn(a,1/Math.sqrt(a.x*a.x+a.y*a.y))};cc.Touch=cc.Class.extend({_point:null,_prevPoint:null,_id:0,_startPointCaptured:!1,_startPoint:null,ctor:function(a,b,c){this._point=cc.p(a||0,b||0);this._id=c||0},getLocation:function(){return{x:this._point.x,y:this._point.y}},getLocationX:function(){return this._point.x},getLocationY:function(){return this._point.y},getPreviousLocation:function(){return{x:this._prevPoint.x,y:this._prevPoint.y}},getStartLocation:function(){return{x:this._startPoint.x,y:this._startPoint.y}},getDelta:function(){return cc.pSub(this._point, this._prevPoint)},getLocationInView:function(){return{x:this._point.x,y:this._point.y}},getPreviousLocationInView:function(){return{x:this._prevPoint.x,y:this._prevPoint.y}},getStartLocationInView:function(){return{x:this._startPoint.x,y:this._startPoint.y}},getID:function(){return this._id},getId:function(){return this._id},setTouchInfo:function(a,b,c){this._prevPoint=this._point;this._point=cc.p(b||0,c||0);this._id=a;this._startPointCaptured||(this._startPoint=cc.p(this._point),this._startPointCaptured= !0)},_setPoint:function(a,b){void 0===b?(this._point.x=a.x,this._point.y=a.y):(this._point.x=a,this._point.y=b)},_setPrevPoint:function(a,b){this._prevPoint=void 0===b?cc.p(a.x,a.y):cc.p(a||0,b||0)}});cc.Event=cc.Class.extend({_type:0,_isStopped:!1,_currentTarget:null,_setCurrentTarget:function(a){this._currentTarget=a},ctor:function(a){this._type=a},getType:function(){return this._type},stopPropagation:function(){this._isStopped=!0},isStopped:function(){return this._isStopped},getCurrentTarget:function(){return this._currentTarget}});cc.Event.TOUCH=0;cc.Event.KEYBOARD=1;cc.Event.ACCELERATION=2;cc.Event.MOUSE=3;cc.Event.CUSTOM=4; cc.EventCustom=cc.Event.extend({_eventName:null,_userData:null,ctor:function(a){cc.Event.prototype.ctor.call(this,cc.Event.CUSTOM);this._eventName=a},setUserData:function(a){this._userData=a},getUserData:function(){return this._userData},getEventName:function(){return this._eventName}}); cc.EventMouse=cc.Event.extend({_eventType:0,_button:0,_x:0,_y:0,_prevX:0,_prevY:0,_scrollX:0,_scrollY:0,ctor:function(a){cc.Event.prototype.ctor.call(this,cc.Event.MOUSE);this._eventType=a},setScrollData:function(a,b){this._scrollX=a;this._scrollY=b},getScrollX:function(){return this._scrollX},getScrollY:function(){return this._scrollY},setLocation:function(a,b){this._x=a;this._y=b},getLocation:function(){return{x:this._x,y:this._y}},getLocationInView:function(){return{x:this._x,y:cc.view._designResolutionSize.height- this._y}},_setPrevCursor:function(a,b){this._prevX=a;this._prevY=b},getDelta:function(){return{x:this._x-this._prevX,y:this._y-this._prevY}},getDeltaX:function(){return this._x-this._prevX},getDeltaY:function(){return this._y-this._prevY},setButton:function(a){this._button=a},getButton:function(){return this._button},getLocationX:function(){return this._x},getLocationY:function(){return this._y}});cc.EventMouse.NONE=0;cc.EventMouse.DOWN=1;cc.EventMouse.UP=2;cc.EventMouse.MOVE=3; cc.EventMouse.SCROLL=4;cc.EventMouse.BUTTON_LEFT=0;cc.EventMouse.BUTTON_RIGHT=2;cc.EventMouse.BUTTON_MIDDLE=1;cc.EventMouse.BUTTON_4=3;cc.EventMouse.BUTTON_5=4;cc.EventMouse.BUTTON_6=5;cc.EventMouse.BUTTON_7=6;cc.EventMouse.BUTTON_8=7; cc.EventTouch=cc.Event.extend({_eventCode:0,_touches:null,ctor:function(a){cc.Event.prototype.ctor.call(this,cc.Event.TOUCH);this._touches=a||[]},getEventCode:function(){return this._eventCode},getTouches:function(){return this._touches},_setEventCode:function(a){this._eventCode=a},_setTouches:function(a){this._touches=a}});cc.EventTouch.MAX_TOUCHES=5;cc.EventTouch.EventCode={BEGAN:0,MOVED:1,ENDED:2,CANCELLED:3};cc.EventListener=cc.Class.extend({_onEvent:null,_type:0,_listenerID:null,_registered:!1,_fixedPriority:0,_node:null,_paused:!1,_isEnabled:!0,ctor:function(a,b,c){this._onEvent=c;this._type=a||0;this._listenerID=b||""},_setPaused:function(a){this._paused=a},_isPaused:function(){return this._paused},_setRegistered:function(a){this._registered=a},_isRegistered:function(){return this._registered},_getType:function(){return this._type},_getListenerID:function(){return this._listenerID},_setFixedPriority:function(a){this._fixedPriority= a},_getFixedPriority:function(){return this._fixedPriority},_setSceneGraphPriority:function(a){this._node=a},_getSceneGraphPriority:function(){return this._node},checkAvailable:function(){return null!=this._onEvent},clone:function(){return null},setEnabled:function(a){this._isEnabled=a},isEnabled:function(){return this._isEnabled},retain:function(){},release:function(){}});cc.EventListener.UNKNOWN=0;cc.EventListener.TOUCH_ONE_BY_ONE=1;cc.EventListener.TOUCH_ALL_AT_ONCE=2; cc.EventListener.KEYBOARD=3;cc.EventListener.MOUSE=4;cc.EventListener.ACCELERATION=5;cc.EventListener.CUSTOM=6; cc._EventListenerCustom=cc.EventListener.extend({_onCustomEvent:null,ctor:function(a,b){this._onCustomEvent=b;var c=this;cc.EventListener.prototype.ctor.call(this,cc.EventListener.CUSTOM,a,function(a){null!=c._onCustomEvent&&c._onCustomEvent(a)})},checkAvailable:function(){return cc.EventListener.prototype.checkAvailable.call(this)&&null!=this._onCustomEvent},clone:function(){return new cc._EventListenerCustom(this._listenerID,this._onCustomEvent)}}); cc._EventListenerCustom.create=function(a,b){return new cc._EventListenerCustom(a,b)}; cc._EventListenerMouse=cc.EventListener.extend({onMouseDown:null,onMouseUp:null,onMouseMove:null,onMouseScroll:null,ctor:function(){var a=this;cc.EventListener.prototype.ctor.call(this,cc.EventListener.MOUSE,cc._EventListenerMouse.LISTENER_ID,function(b){var c=cc.EventMouse;switch(b._eventType){case c.DOWN:if(a.onMouseDown)a.onMouseDown(b);break;case c.UP:if(a.onMouseUp)a.onMouseUp(b);break;case c.MOVE:if(a.onMouseMove)a.onMouseMove(b);break;case c.SCROLL:if(a.onMouseScroll)a.onMouseScroll(b)}})}, clone:function(){var a=new cc._EventListenerMouse;a.onMouseDown=this.onMouseDown;a.onMouseUp=this.onMouseUp;a.onMouseMove=this.onMouseMove;a.onMouseScroll=this.onMouseScroll;return a},checkAvailable:function(){return!0}});cc._EventListenerMouse.LISTENER_ID="__cc_mouse";cc._EventListenerMouse.create=function(){return new cc._EventListenerMouse}; cc._EventListenerTouchOneByOne=cc.EventListener.extend({_claimedTouches:null,swallowTouches:!1,onTouchBegan:null,onTouchMoved:null,onTouchEnded:null,onTouchCancelled:null,ctor:function(){cc.EventListener.prototype.ctor.call(this,cc.EventListener.TOUCH_ONE_BY_ONE,cc._EventListenerTouchOneByOne.LISTENER_ID,null);this._claimedTouches=[]},setSwallowTouches:function(a){this.swallowTouches=a},clone:function(){var a=new cc._EventListenerTouchOneByOne;a.onTouchBegan=this.onTouchBegan;a.onTouchMoved=this.onTouchMoved; a.onTouchEnded=this.onTouchEnded;a.onTouchCancelled=this.onTouchCancelled;a.swallowTouches=this.swallowTouches;return a},checkAvailable:function(){return!this.onTouchBegan?(cc.log(cc._LogInfos._EventListenerTouchOneByOne_checkAvailable),!1):!0}});cc._EventListenerTouchOneByOne.LISTENER_ID="__cc_touch_one_by_one";cc._EventListenerTouchOneByOne.create=function(){return new cc._EventListenerTouchOneByOne}; cc._EventListenerTouchAllAtOnce=cc.EventListener.extend({onTouchesBegan:null,onTouchesMoved:null,onTouchesEnded:null,onTouchesCancelled:null,ctor:function(){cc.EventListener.prototype.ctor.call(this,cc.EventListener.TOUCH_ALL_AT_ONCE,cc._EventListenerTouchAllAtOnce.LISTENER_ID,null)},clone:function(){var a=new cc._EventListenerTouchAllAtOnce;a.onTouchesBegan=this.onTouchesBegan;a.onTouchesMoved=this.onTouchesMoved;a.onTouchesEnded=this.onTouchesEnded;a.onTouchesCancelled=this.onTouchesCancelled;return a}, checkAvailable:function(){return null==this.onTouchesBegan&&null==this.onTouchesMoved&&null==this.onTouchesEnded&&null==this.onTouchesCancelled?(cc.log(cc._LogInfos._EventListenerTouchAllAtOnce_checkAvailable),!1):!0}});cc._EventListenerTouchAllAtOnce.LISTENER_ID="__cc_touch_all_at_once";cc._EventListenerTouchAllAtOnce.create=function(){return new cc._EventListenerTouchAllAtOnce}; cc.EventListener.create=function(a){cc.assert(a&&a.event,cc._LogInfos.EventListener_create);var b=a.event;delete a.event;var c=null;b===cc.EventListener.TOUCH_ONE_BY_ONE?c=new cc._EventListenerTouchOneByOne:b===cc.EventListener.TOUCH_ALL_AT_ONCE?c=new cc._EventListenerTouchAllAtOnce:b===cc.EventListener.MOUSE?c=new cc._EventListenerMouse:b===cc.EventListener.CUSTOM?(c=new cc._EventListenerCustom(a.eventName,a.callback),delete a.eventName,delete a.callback):b===cc.EventListener.KEYBOARD?c=new cc._EventListenerKeyboard: b===cc.EventListener.ACCELERATION&&(c=new cc._EventListenerAcceleration(a.callback),delete a.callback);for(var d in a)c[d]=a[d];return c};cc.copyArray=function(a){var b,c=a.length,d=Array(c);for(b=0;bh.getLocalZOrder())this._visitTarget(h,!1);else break;null!=g[a.__instanceId]&&(f[a.getGlobalZOrder()]||(f[a.getGlobalZOrder()]=[]),f[a.getGlobalZOrder()].push(a.__instanceId));for(;dd._localZOrder)d.visit(a);else break;for(this.draw(a);bd&&-1E-6e&&-1E-6=b&&this.unschedule(this._updatePercent)}}); cc.LoaderScene.preload=function(a,b){var c=cc;c.loaderScene||(c.loaderScene=new cc.LoaderScene,c.loaderScene.init());c.loaderScene.initWithResources(a,b);cc.director.runScene(c.loaderScene);return c.loaderScene};cc._tmp.PrototypeLayerColor=function(){var a=cc.LayerColor.prototype;cc.defineGetterSetter(a,"width",a._getWidth,a._setWidth);cc.defineGetterSetter(a,"height",a._getHeight,a._setHeight)}; cc._tmp.PrototypeLayerGradient=function(){var a=cc.LayerGradient.prototype;cc.defineGetterSetter(a,"startColor",a.getStartColor,a.setStartColor);cc.defineGetterSetter(a,"endColor",a.getEndColor,a.setEndColor);cc.defineGetterSetter(a,"startOpacity",a.getStartOpacity,a.setStartOpacity);cc.defineGetterSetter(a,"endOpacity",a.getEndOpacity,a.setEndOpacity);cc.defineGetterSetter(a,"vector",a.getVector,a.setVector)};cc.Layer=cc.Node.extend({_isBaked:!1,_bakeSprite:null,_className:"Layer",ctor:function(){var a=cc.Node.prototype;a.ctor.call(this);this._ignoreAnchorPointForPosition=!0;a.setAnchorPoint.call(this,0.5,0.5);a.setContentSize.call(this,cc.winSize)},init:function(){this._ignoreAnchorPointForPosition=!0;this.setAnchorPoint(0.5,0.5);this.setContentSize(cc.winSize);this.cascadeColor=this.cascadeOpacity=!1;return!0},bake:null,unbake:null,isBaked:function(){return this._isBaked},visit:null}); cc.Layer.create=function(){return new cc.Layer}; if(cc._renderType===cc._RENDER_TYPE_CANVAS){var p=cc.Layer.prototype;p.bake=function(){if(!this._isBaked){this._isBaked=this._cacheDirty=!0;this._cachedParent=this;for(var a=this._children,b=0,c=a.length;bg._localZOrder)g.visit(f);else break;for(this.draw(f);b=this._layers.length?cc.log(cc._LogInfos.LayerMultiplex_switchTo):(this.removeChild(this._layers[this._enabledLayer],!0),this._enabledLayer=a,this.addChild(this._layers[a]))},switchToAndReleaseMe:function(a){a>=this._layers.length?cc.log(cc._LogInfos.LayerMultiplex_switchToAndReleaseMe):(this.removeChild(this._layers[this._enabledLayer],!0),this._layers[this._enabledLayer]=null,this._enabledLayer=a,this.addChild(this._layers[a]))},addLayer:function(a){a?this._layers.push(a): cc.log(cc._LogInfos.LayerMultiplex_addLayer)}});cc.LayerMultiplex.create=function(){return new cc.LayerMultiplex(Array.prototype.slice.call(arguments))};cc._tmp.PrototypeSprite=function(){var a=cc.Sprite.prototype;cc.defineGetterSetter(a,"opacityModifyRGB",a.isOpacityModifyRGB,a.setOpacityModifyRGB);cc.defineGetterSetter(a,"opacity",a.getOpacity,a.setOpacity);cc.defineGetterSetter(a,"color",a.getColor,a.setColor);cc.defineGetterSetter(a,"flippedX",a.isFlippedX,a.setFlippedX);cc.defineGetterSetter(a,"flippedY",a.isFlippedY,a.setFlippedY);cc.defineGetterSetter(a,"offsetX",a._getOffsetX);cc.defineGetterSetter(a,"offsetY",a._getOffsetY);cc.defineGetterSetter(a, "texture",a.getTexture,a.setTexture);cc.defineGetterSetter(a,"textureRectRotated",a.isTextureRectRotated);cc.defineGetterSetter(a,"batchNode",a.getBatchNode,a.setBatchNode);cc.defineGetterSetter(a,"quad",a.getQuad)};cc.generateTintImageWithMultiply=function(a,b,c,d){d=d||cc.newElement("canvas");c=c||cc.rect(0,0,a.width,a.height);var e=d.getContext("2d");d.width!=c.width||d.height!=c.height?(d.width=c.width,d.height=c.height):e.globalCompositeOperation="source-over";e.fillStyle="rgb("+b.r+","+b.g+","+b.b+")";e.fillRect(0,0,c.width,c.height);e.globalCompositeOperation="multiply";e.drawImage(a,c.x,c.y,c.width,c.height,0,0,c.width,c.height);e.globalCompositeOperation="destination-atop";e.drawImage(a,c.x,c.y,c.width, c.height,0,0,c.width,c.height);return d}; cc.generateTintImage=function(a,b,c,d,e){d||(d=cc.rect(0,0,a.width,a.height));a=c.r/255;var f=c.g/255;c=c.b/255;var g=Math.min(d.width,b[0].width),h=Math.min(d.height,b[0].height),k;e?(k=e.getContext("2d"),k.clearRect(0,0,g,h)):(e=cc.newElement("canvas"),e.width=g,e.height=h,k=e.getContext("2d"));k.save();k.globalCompositeOperation="lighter";var m=k.globalAlpha;0a+f+c&&(k.globalAlpha=m,k.drawImage(b[3],d.x,d.y,g,h,0,0,g,h));k.restore();return e}; cc.generateTextureCacheForColor=function(a){function b(){var b=cc.generateTextureCacheForColor,d=a.width,g=a.height;c[0].width=d;c[0].height=g;c[1].width=d;c[1].height=g;c[2].width=d;c[2].height=g;c[3].width=d;c[3].height=g;b.canvas.width=d;b.canvas.height=g;var h=b.canvas.getContext("2d");h.drawImage(a,0,0);b.tempCanvas.width=d;b.tempCanvas.height=g;for(var h=h.getImageData(0,0,d,g).data,k=0;4>k;k++){var m=c[k].getContext("2d");m.getImageData(0,0,d,g).data;b.tempCtx.drawImage(a,0,0);for(var n=b.tempCtx.getImageData(0, 0,d,g),q=n.data,r=0;ra.width&&cc.error(cc._LogInfos.RectWidth,a.url),d>a.height&&cc.error(cc._LogInfos.RectHeight,a.url));this.texture=this._originalTexture=a;this.setTextureRect(b,c);this.batchNode=null;return!0},_p._textureLoadedCallback=function(a){if(!this._textureLoaded){this._textureLoaded=!0;var b=this._rect;b?cc._rectEqualToZero(b)&&(b.width=a.width,b.height=a.height):b=cc.rect(0,0,a.width,a.height);this.texture=this._originalTexture=a;this.setTextureRect(b, this._rectRotated);a=this._displayedColor;(255!=a.r||255!=a.g||255!=a.b)&&this._changeTextureColor();this.batchNode=this._batchNode;this._callLoadedEventCallbacks()}},_p.setTextureRect=function(a,b,c){this._rectRotated=b||!1;this.setContentSize(c||a);this.setVertexRect(a);b=this._textureRect_Canvas;c=cc.contentScaleFactor();b.x=0|a.x*c;b.y=0|a.y*c;b.width=0|a.width*c;b.height=0|a.height*c;b.validRect=!(0===b.width||0===b.height||0>b.x||0>b.y);a=this._unflippedOffsetPositionFromCenter;this._flippedX&& (a.x=-a.x);this._flippedY&&(a.y=-a.y);this._offsetPosition.x=a.x+(this._contentSize.width-this._rect.width)/2;this._offsetPosition.y=a.y+(this._contentSize.height-this._rect.height)/2;this._batchNode&&(this.dirty=!0)},_p.updateTransform=function(){if(this.dirty){var a=this._parent;!this._visible||a&&a!=this._batchNode&&a._shouldBeHidden?this._shouldBeHidden=!0:(this._shouldBeHidden=!1,this._transformToBatch=!a||a==this._batchNode?this.nodeToParentTransform():cc.affineTransformConcat(this.nodeToParentTransform(), a._transformToBatch));this.dirty=this._recursiveDirty=!1}this._hasChildren&&this._arrayMakeObjectsPerformSelector(this._children,cc.Node.StateCallbackType.updateTransform)},_p.addChild=function(a,b,c){cc.assert(a,cc._LogInfos.CCSpriteBatchNode_addChild_2);null==b&&(b=a._localZOrder);null==c&&(c=a.tag);cc.Node.prototype.addChild.call(this,a,b,c);this._hasChildren=!0},_p.setOpacity=function(a){cc.Node.prototype.setOpacity.call(this,a);this._setNodeDirtyForCache()},_p.setColor=function(a){var b=this.color; this._oldDisplayColor=b;b.r===a.r&&b.g===a.g&&b.b===a.b||cc.Node.prototype.setColor.call(this,a)},_p.updateDisplayedColor=function(a){cc.Node.prototype.updateDisplayedColor.call(this,a);a=this._oldDisplayColor;var b=this._displayedColor;a.r===b.r&&a.g===b.g&&a.b===b.b||(this._changeTextureColor(),this._setNodeDirtyForCache())},_p.setSpriteFrame=function(a){var b=this;"string"==typeof a&&(a=cc.spriteFrameCache.getSpriteFrame(a),cc.assert(a,cc._LogInfos.CCSpriteBatchNode_setSpriteFrame));b.setNodeDirty(!0); var c=a.getOffset();b._unflippedOffsetPositionFromCenter.x=c.x;b._unflippedOffsetPositionFromCenter.y=c.y;b._rectRotated=a.isRotated();var c=a.getTexture(),d=a.textureLoaded();d||(b._textureLoaded=!1,a.addLoadedEventListener(function(a){b._textureLoaded=!0;var c=a.getTexture();c!=b._texture&&(b.texture=c);b.setTextureRect(a.getRect(),a.isRotated(),a.getOriginalSize());b._callLoadedEventCallbacks()},b));c!=b._texture&&(b.texture=c);b._rectRotated&&(b._originalTexture=c);b.setTextureRect(a.getRect(), b._rectRotated,a.getOriginalSize());b._colorized=!1;d&&(a=b.color,(255!==a.r||255!==a.g||255!==a.b)&&b._changeTextureColor())},_p.isFrameDisplayed=function(a){return a.getTexture()!=this._texture?!1:cc.rectEqualToRect(a.getRect(),this._rect)},_p.setBatchNode=function(a){(this._batchNode=a)?(this._transformToBatch=cc.affineTransformIdentity(),this.textureAtlas=this._batchNode.textureAtlas):(this.atlasIndex=cc.Sprite.INDEX_NOT_INITIALIZED,this.textureAtlas=null,this.dirty=this._recursiveDirty=!1)}, _p.setTexture=function(a){a&&"string"===typeof a?(a=cc.textureCache.addImage(a),this.setTexture(a),a=a.getContentSize(),this.setTextureRect(cc.rect(0,0,a.width,a.height))):(cc.assert(!a||a instanceof cc.Texture2D,cc._LogInfos.CCSpriteBatchNode_setTexture),this._texture!=a&&(a&&a.getHtmlElementObj()instanceof HTMLImageElement&&(this._originalTexture=a),this._texture=a))},_p.draw=function(a){if(this._textureLoaded){a=a||cc._renderContext;this._isLighterMode&&(a.globalCompositeOperation="lighter");var b= cc.view.getScaleX(),c=cc.view.getScaleY();a.globalAlpha=this._displayedOpacity/255;var d=this._rect,e=this._contentSize,f=this._offsetPosition,g=this._drawSize_Canvas,h=0|f.x,k=-f.y-d.height,m=this._textureRect_Canvas;g.width=d.width*b;g.height=d.height*c;if(this._flippedX||this._flippedY)a.save(),this._flippedX&&(h=-f.x-d.width,a.scale(-1,1)),this._flippedY&&(k=f.y,a.scale(1,-1));h*=b;k*=c;this._texture&&m.validRect?(e=this._texture.getHtmlElementObj(),this._colorized?a.drawImage(e,0,0,m.width,m.height, h,k,g.width,g.height):a.drawImage(e,m.x,m.y,m.width,m.height,h,k,g.width,g.height)):!this._texture&&m.validRect&&(g=this.color,a.fillStyle="rgba("+g.r+","+g.g+","+g.b+",1)",a.fillRect(h,k,e.width*b,e.height*c));1===cc.SPRITE_DEBUG_DRAW||this._showNode?(a.strokeStyle="rgba(0,255,0,1)",h/=b,k=-(k/c),h=[cc.p(h,k),cc.p(h+d.width,k),cc.p(h+d.width,k-d.height),cc.p(h,k-d.height)],cc._drawingUtil.drawPoly(h,4,!0)):2===cc.SPRITE_DEBUG_DRAW&&(a.strokeStyle="rgba(0,255,0,1)",b=this._rect,k=-k,h=[cc.p(h,k), cc.p(h+b.width,k),cc.p(h+b.width,k-b.height),cc.p(h,k-b.height)],cc._drawingUtil.drawPoly(h,4,!0));(this._flippedX||this._flippedY)&&a.restore();cc.g_NumberOfDraws++}},cc.sys._supportCanvasNewBlendModes||(_p._changeTextureColor=function(){var a,b=this._texture,c=this._textureRect_Canvas;if(b&&(c.validRect&&this._originalTexture)&&(a=b.getHtmlElementObj()))if(b=cc.textureCache.getTextureColors(this._originalTexture.getHtmlElementObj()))this._colorized=!0,a instanceof HTMLCanvasElement&&!this._rectRotated&& !this._newTextureWhenChangeColor?cc.generateTintImage(a,b,this._displayedColor,c,a):(a=cc.generateTintImage(a,b,this._displayedColor,c),b=new cc.Texture2D,b.initWithElement(a),b.handleLoadedTexture(),this.texture=b)}),delete _p):(cc.assert("function"===typeof cc._tmp.WebGLSprite,cc._LogInfos.MissingFile,"SpritesWebGL.js"),cc._tmp.WebGLSprite(),delete cc._tmp.WebGLSprite);cc.assert("function"===typeof cc._tmp.PrototypeSprite,cc._LogInfos.MissingFile,"SpritesPropertyDefine.js");cc._tmp.PrototypeSprite(); delete cc._tmp.PrototypeSprite;cc.BakeSprite=cc.Sprite.extend({_cacheCanvas:null,_cacheContext:null,ctor:function(){cc.Sprite.prototype.ctor.call(this);var a=document.createElement("canvas");a.width=a.height=10;this._cacheCanvas=a;this._cacheContext=a.getContext("2d");var b=new cc.Texture2D;b.initWithElement(a);b.handleLoadedTexture();this.setTexture(b)},getCacheContext:function(){return this._cacheContext},getCacheCanvas:function(){return this._cacheCanvas},resetCanvasSize:function(a,b){void 0===b&&(b=a.height,a=a.width);var c= this._cacheCanvas;c.width=a;c.height=b;this.getTexture().handleLoadedTexture();this.setTextureRect(cc.rect(0,0,a,b),!1)}});cc.AnimationFrame=cc.Class.extend({_spriteFrame:null,_delayPerUnit:0,_userInfo:null,ctor:function(a,b,c){this._spriteFrame=a||null;this._delayPerUnit=b||0;this._userInfo=c||null},clone:function(){var a=new cc.AnimationFrame;a.initWithSpriteFrame(this._spriteFrame.clone(),this._delayPerUnit,this._userInfo);return a},copyWithZone:function(a){return cc.clone(this)},copy:function(a){a=new cc.AnimationFrame;a.initWithSpriteFrame(this._spriteFrame.clone(),this._delayPerUnit,this._userInfo);return a},initWithSpriteFrame:function(a, b,c){this._spriteFrame=a;this._delayPerUnit=b;this._userInfo=c;return!0},getSpriteFrame:function(){return this._spriteFrame},setSpriteFrame:function(a){this._spriteFrame=a},getDelayUnits:function(){return this._delayPerUnit},setDelayUnits:function(a){this._delayPerUnit=a},getUserInfo:function(){return this._userInfo},setUserInfo:function(a){this._userInfo=a}});cc.AnimationFrame.create=function(a,b,c){return new cc.AnimationFrame(a,b,c)}; cc.Animation=cc.Class.extend({_frames:null,_loops:0,_restoreOriginalFrame:!1,_duration:0,_delayPerUnit:0,_totalDelayUnits:0,ctor:function(a,b,c){this._frames=[];if(void 0===a)this.initWithSpriteFrames(null,0);else{var d=a[0];d&&(d instanceof cc.SpriteFrame?this.initWithSpriteFrames(a,b,c):d instanceof cc.AnimationFrame&&this.initWithAnimationFrames(a,b,c))}},getFrames:function(){return this._frames},setFrames:function(a){this._frames=a},addSpriteFrame:function(a){var b=new cc.AnimationFrame;b.initWithSpriteFrame(a, 1,null);this._frames.push(b);this._totalDelayUnits++},addSpriteFrameWithFile:function(a){a=cc.textureCache.addImage(a);var b=cc.rect(0,0,0,0);b.width=a.width;b.height=a.height;a=cc.SpriteFrame.create(a,b);this.addSpriteFrame(a)},addSpriteFrameWithTexture:function(a,b){var c=cc.SpriteFrame.create(a,b);this.addSpriteFrame(c)},initWithAnimationFrames:function(a,b,c){cc.arrayVerifyType(a,cc.AnimationFrame);this._delayPerUnit=b;this._loops=void 0===c?1:c;this._totalDelayUnits=0;b=this._frames;for(c=b.length= 0;ca.width&& cc.error(cc._LogInfos.RectWidth,a.url);g>a.height&&cc.error(cc._LogInfos.RectHeight,a.url)}this._rectInPixels=b;this._rect=cc.rectPixelsToPoints(b);this._offsetInPixels.x=d.x;this._offsetInPixels.y=d.y;cc._pointPixelsToPointsOut(d,this._offset);this._originalSizeInPixels.width=e.width;this._originalSizeInPixels.height=e.height;cc._sizePixelsToPointsOut(e,this._originalSize);this._rotated=c;return!0}});cc.SpriteFrame.create=function(a,b,c,d,e){return new cc.SpriteFrame(a,b,c,d,e)}; cc.SpriteFrame.createWithTexture=cc.SpriteFrame.create;cc.SpriteFrame._frameWithTextureForCanvas=function(a,b,c,d,e){var f=new cc.SpriteFrame;f._texture=a;f._rectInPixels=b;f._rect=cc.rectPixelsToPoints(b);f._offsetInPixels.x=d.x;f._offsetInPixels.y=d.y;cc._pointPixelsToPointsOut(f._offsetInPixels,f._offset);f._originalSizeInPixels.width=e.width;f._originalSizeInPixels.height=e.height;cc._sizePixelsToPointsOut(f._originalSizeInPixels,f._originalSize);f._rotated=c;return f};cc.spriteFrameCache={_CCNS_REG1:/^\s*\{\s*([\-]?\d+[.]?\d*)\s*,\s*([\-]?\d+[.]?\d*)\s*\}\s*$/,_CCNS_REG2:/^\s*\{\s*\{\s*([\-]?\d+[.]?\d*)\s*,\s*([\-]?\d+[.]?\d*)\s*\}\s*,\s*\{\s*([\-]?\d+[.]?\d*)\s*,\s*([\-]?\d+[.]?\d*)\s*\}\s*\}\s*$/,_spriteFrames:{},_spriteFramesAliases:{},_frameConfigCache:{},_rectFromString:function(a){a=this._CCNS_REG2.exec(a);return!a?cc.rect(0,0,0,0):cc.rect(parseFloat(a[1]),parseFloat(a[2]),parseFloat(a[3]),parseFloat(a[4]))},_pointFromString:function(a){a=this._CCNS_REG1.exec(a); return!a?cc.p(0,0):cc.p(parseFloat(a[1]),parseFloat(a[2]))},_sizeFromString:function(a){a=this._CCNS_REG1.exec(a);return!a?cc.size(0,0):cc.size(parseFloat(a[1]),parseFloat(a[2]))},_getFrameConfig:function(a){var b=cc.loader.getRes(a);cc.assert(b,cc._LogInfos.spriteFrameCache__getFrameConfig_2,a);cc.loader.release(a);if(b._inited)return this._frameConfigCache[a]=b;var c=b.frames,d=b.metadata||b.meta,b={},e={},f=0;d&&(f=d.format,f=1>=f.length?parseInt(f):f,e.image=d.textureFileName||d.textureFileName|| d.image);for(var g in c){var h=c[g];if(h){d={};if(0==f){d.rect=cc.rect(h.x,h.y,h.width,h.height);d.rotated=!1;d.offset=cc.p(h.offsetX,h.offsetY);var k=h.originalWidth,h=h.originalHeight;(!k||!h)&&cc.log(cc._LogInfos.spriteFrameCache__getFrameConfig);k=Math.abs(k);h=Math.abs(h);d.size=cc.size(k,h)}else if(1==f||2==f)d.rect=this._rectFromString(h.frame),d.rotated=h.rotated||!1,d.offset=this._pointFromString(h.offset),d.size=this._sizeFromString(h.sourceSize);else if(3==f){var k=this._sizeFromString(h.spriteSize), m=this._rectFromString(h.textureRect);k&&(m=cc.rect(m.x,m.y,k.width,k.height));d.rect=m;d.rotated=h.textureRotated||!1;d.offset=this._pointFromString(h.spriteOffset);d.size=this._sizeFromString(h.spriteSourceSize);d.aliases=h.aliases}else k=h.frame,m=h.sourceSize,g=h.filename||g,d.rect=cc.rect(k.x,k.y,k.w,k.h),d.rotated=h.rotated||!1,d.offset=cc.p(0,0),d.size=cc.size(m.w,m.h);b[g]=d}}return this._frameConfigCache[a]={_inited:!0,frames:b,meta:e}},addSpriteFrames:function(a,b){cc.assert(a,cc._LogInfos.spriteFrameCache_addSpriteFrames_2); var c=this._frameConfigCache[a]||cc.loader.getRes(a);if(c&&c.frames){var d=this._frameConfigCache[a]||this._getFrameConfig(a),c=d.frames,d=d.meta;b?b instanceof cc.Texture2D||("string"==typeof b?b=cc.textureCache.addImage(b):cc.assert(0,cc._LogInfos.spriteFrameCache_addSpriteFrames_3)):(d=cc.path.changeBasename(a,d.image||".png"),b=cc.textureCache.addImage(d));var d=this._spriteFramesAliases,e=this._spriteFrames,f;for(f in c){var g=c[f],h=e[f];if(!h){h=cc.SpriteFrame.create(b,g.rect,g.rotated,g.offset, g.size);if(g=g.aliases)for(var k=0,m=g.length;kcc.DIRECTOR_FPS_INTERVAL&&(this._SPFLabel.string=this._secondsPerFrame.toFixed(3),this._frameRate=this._frames/this._accumDt,this._accumDt=this._frames=0,this._FPSLabel.string=this._frameRate.toFixed(1),this._drawsLabel.string=(0|cc.g_NumberOfDraws).toString()),this._FPSLabel.visit(),this._SPFLabel.visit(),this._drawsLabel.visit()):this._createStatsLabel();cc.g_NumberOfDraws=0},isSendCleanupToScene:function(){return this._sendCleanupToScene},getRunningScene:function(){return this._runningScene}, getAnimationInterval:function(){return this._animationInterval},isDisplayStats:function(){return this._displayStats},setDisplayStats:function(a){this._displayStats=a},getSecondsPerFrame:function(){return this._secondsPerFrame},isNextDeltaTimeZero:function(){return this._nextDeltaTimeZero},isPaused:function(){return this._paused},getTotalFrames:function(){return this._totalFrames},popToRootScene:function(){this.popToSceneStackLevel(1)},popToSceneStackLevel:function(a){cc.assert(this._runningScene, cc._LogInfos.Director_popToSceneStackLevel_2);var b=this._scenesStack,c=b.length;if(0==c)this.end();else if(!(a>c)){for(;c>a;){var d=b.pop();d.running&&(d.onExitTransitionDidStart(),d.onExit());d.cleanup();c--}this._nextScene=b[b.length-1];this._sendCleanupToScene=!1}},getScheduler:function(){return this._scheduler},setScheduler:function(a){this._scheduler!=a&&(this._scheduler=a)},getActionManager:function(){return this._actionManager},setActionManager:function(a){this._actionManager!=a&&(this._actionManager= a)},getDeltaTime:function(){return this._deltaTime},_createStatsLabel:null,_calculateMPF:function(){this._secondsPerFrame=(Date.now()-this._lastUpdate)/1E3}});cc.Director.EVENT_PROJECTION_CHANGED="director_projection_changed";cc.Director.EVENT_AFTER_DRAW="director_after_draw";cc.Director.EVENT_AFTER_VISIT="director_after_visit";cc.Director.EVENT_AFTER_UPDATE="director_after_update"; cc.DisplayLinkDirector=cc.Director.extend({invalid:!1,startAnimation:function(){this._nextDeltaTimeZero=!0;this.invalid=!1},mainLoop:function(){this._purgeDirectorInNextLoop?(this._purgeDirectorInNextLoop=!1,this.purgeDirector()):this.invalid||this.drawScene()},stopAnimation:function(){this.invalid=!0},setAnimationInterval:function(a){this._animationInterval=a;this.invalid||(this.stopAnimation(),this.startAnimation())}});cc.Director.sharedDirector=null;cc.Director.firstUseDirector=!0; cc.Director._getInstance=function(){cc.Director.firstUseDirector&&(cc.Director.firstUseDirector=!1,cc.Director.sharedDirector=new cc.DisplayLinkDirector,cc.Director.sharedDirector.init());return cc.Director.sharedDirector};cc.defaultFPS=60;cc.Director.PROJECTION_2D=0;cc.Director.PROJECTION_3D=1;cc.Director.PROJECTION_CUSTOM=3;cc.Director.PROJECTION_DEFAULT=cc.Director.PROJECTION_3D; cc._renderType===cc._RENDER_TYPE_CANVAS?(_p=cc.Director.prototype,_p.setProjection=function(a){this._projection=a;cc.eventManager.dispatchEvent(this._eventProjectionChanged)},_p.setDepthTest=function(){},_p.setOpenGLView=function(a){this._winSizeInPoints.width=cc._canvas.width;this._winSizeInPoints.height=cc._canvas.height;this._openGLView=a||cc.view;cc.eventManager&&cc.eventManager.setEnabled(!0)},_p._clear=function(){var a=this._openGLView.getViewPortRect();cc._renderContext.clearRect(-a.x,a.y, a.width,-a.height)},_p._createStatsLabel=function(){var a=0,a=this._winSizeInPoints.width>this._winSizeInPoints.height?0|24*(this._winSizeInPoints.height/320):0|24*(this._winSizeInPoints.width/320);this._FPSLabel=cc.LabelTTF.create("000.0","Arial",a);this._SPFLabel=cc.LabelTTF.create("0.000","Arial",a);this._drawsLabel=cc.LabelTTF.create("0000","Arial",a);a=cc.DIRECTOR_STATS_POSITION;this._drawsLabel.setPosition(this._drawsLabel.width/2+a.x,5*this._drawsLabel.height/2+a.y);this._SPFLabel.setPosition(this._SPFLabel.width/ 2+a.x,3*this._SPFLabel.height/2+a.y);this._FPSLabel.setPosition(this._FPSLabel.width/2+a.x,this._FPSLabel.height/2+a.y)},_p.getVisibleSize=function(){return this.getWinSize()},_p.getVisibleOrigin=function(){return cc.p(0,0)}):(cc.Director._fpsImage=new Image,cc._addEventListener(cc.Director._fpsImage,"load",function(){cc.Director._fpsImageLoaded=!0}),cc._fpsImage&&(cc.Director._fpsImage.src=cc._fpsImage),cc.assert("function"===typeof cc._tmp.DirectorWebGL,cc._LogInfos.MissingFile,"CCDirectorWebGL.js"), cc._tmp.DirectorWebGL(),delete cc._tmp.DirectorWebGL);cc.PRIORITY_NON_SYSTEM=cc.PRIORITY_SYSTEM+1;cc.arrayVerifyType=function(a,b){if(a&&0=this._interval&&(b&&c&&this._doCallback(),this._elapsed=0):(this._useDelay?this._elapsed>=this._delay&&(b&&c&&this._doCallback(),this._elapsed-=this._delay,this._timesExecuted+= 1,this._useDelay=!1):this._elapsed>=this._interval&&(b&&c&&this._doCallback(),this._elapsed=0,this._timesExecuted+=1),this._timesExecuted>this._repeat&&cc.director.getScheduler().unscheduleCallbackForTarget(b,c))}}}); cc.Scheduler=cc.Class.extend({_timeScale:1,_updates:null,_hashForUpdates:null,_arrayForUpdates:null,_hashForTimers:null,_arrayForTimes:null,_currentTarget:null,_currentTargetSalvaged:!1,_updateHashLocked:!1,ctor:function(){this._timeScale=1;this._updates=[[],[],[]];this._hashForUpdates={};this._arrayForUpdates=[];this._hashForTimers={};this._arrayForTimers=[];this._currentTarget=null;this._updateHashLocked=this._currentTargetSalvaged=!1},_removeHashElement:function(a){delete this._hashForTimers[a.target.__instanceId]; cc.arrayRemoveObject(this._arrayForTimers,a);a.Timer=null;a.target=null},_removeUpdateFromHash:function(a){if(a=this._hashForUpdates[a.target.__instanceId])cc.arrayRemoveObject(a.list,a.entry),delete this._hashForUpdates[a.target.__instanceId],cc.arrayRemoveObject(this._arrayForUpdates,a),a.entry=null,a.target=null},_priorityIn:function(a,b,c,d){d=new cc.ListEntry(null,null,b,c,d,!1);if(a){for(var e=a.length-1,f=0;f<=e&&!(cb?d[0]=this._priorityIn(d[0],a,b,c):d[2]=this._priorityIn(d[2],a,b,c)}},unscheduleCallbackForTarget:function(a,b){if(!(null==a||null==b)){var c=this._hashForTimers[a.__instanceId];if(c)for(var d=c.timers,e=0,f=d.length;e=e&&c.timerIndex--;0==d.length&&(this._currentTarget==c?this._currentTargetSalvaged=!0:this._removeHashElement(c));break}}}},unscheduleUpdateForTarget:function(a){null!= a&&(a=this._hashForUpdates[a.__instanceId],null!=a&&(this._updateHashLocked?a.entry.markedForDeletion=!0:this._removeUpdateFromHash(a.entry)))},unscheduleAllCallbacksForTarget:function(a){if(null!=a){var b=this._hashForTimers[a.__instanceId];if(b){var c=b.timers;!b.currentTimerSalvaged&&0<=c.indexOf(b.currentTimer)&&(b.currentTimerSalvaged=!0);c.length=0;this._currentTarget==b?this._currentTargetSalvaged=!0:this._removeHashElement(b)}this.unscheduleUpdateForTarget(a)}},unscheduleAllCallbacks:function(){this.unscheduleAllCallbacksWithMinPriority(cc.Scheduler.PRIORITY_SYSTEM)}, unscheduleAllCallbacksWithMinPriority:function(a){for(var b=this._arrayForTimers,c=this._updates,d=0,e=b.length;dc&&1c&&100>n++;)f*=c/h,f|=0,g=d.substr(f),h=e-this._measure(g);for(n=0;hn++;)g&&(m=(k=cc.LabelTTF._wordRex.exec(g))?k[0].length:1,k=g),f+=m,g=d.substr(f),h=e-this._measure(g);f-=m;c=d.substr(0,f);if(cc.LabelTTF.wrapInspection&&cc.LabelTTF._symbolRex.test(k||g))e=cc.LabelTTF._lastWordRex.exec(c),f-=e?e[0].length:0,k=d.substr(f),c=d.substr(0,f);if(cc.LabelTTF._firsrEnglish.test(k)&&(e=cc.LabelTTF._lastEnglish.exec(c))&& c!==e[0])f-=e[0].length,k=d.substr(f),c=d.substr(0,f);a[b]=k||g;a.splice(b,0,c)}},_updateTTF:function(){var a=this._dimensions.width,b,c,d=this._lineWidths;d.length=0;this._isMultiLine=!1;this._measureConfig();if(0!==a){this._strings=this._string.split("\n");for(b=0;bb.x||0>b.y);a=this._unflippedOffsetPositionFromCenter; this._flippedX&&(a.x=-a.x);this._flippedY&&(a.y=-a.y);this._offsetPosition.x=a.x+(this._contentSize.width-this._rect.width)/2;this._offsetPosition.y=a.y+(this._contentSize.height-this._rect.height)/2;this._batchNode&&(this.dirty=!0)},_p=null):(cc.assert("function"===typeof cc._tmp.WebGLLabelTTF,cc._LogInfos.MissingFile,"LabelTTFWebGL.js"),cc._tmp.WebGLLabelTTF(),delete cc._tmp.WebGLLabelTTF);cc.assert("function"===typeof cc._tmp.PrototypeLabelTTF,cc._LogInfos.MissingFile,"LabelTTFPropertyDefine.js"); cc._tmp.PrototypeLabelTTF();delete cc._tmp.PrototypeLabelTTF;cc.LabelTTF._textAlign=["left","center","right"];cc.LabelTTF._textBaseline=["top","middle","bottom"];cc.LabelTTF.wrapInspection=!0;cc.LabelTTF._wordRex=/([a-zA-Z0-9\u00c4\u00d6\u00dc\u00e4\u00f6\u00fc\u00df\u00e9\u00e8\u00e7\u00e0\u00f9\u00ea\u00e2\u00ee\u00f4\u00fb]+|\S)/;cc.LabelTTF._symbolRex=/^[!,.:;}\]%\?>\u3001\u2018\u201c\u300b\uff1f\u3002\uff0c\uff01]/;cc.LabelTTF._lastWordRex=/([a-zA-Z0-9\u00c4\u00d6\u00dc\u00e4\u00f6\u00fc\u00df\u00e9\u00e8\u00e7\u00e0\u00f9\u00ea\u00e2\u00ee\u00f4\u00fb]+|\S)$/; cc.LabelTTF._lastEnglish=/[a-zA-Z0-9\u00c4\u00d6\u00dc\u00e4\u00f6\u00fc\u00df\u00e9\u00e8\u00e7\u00e0\u00f9\u00ea\u00e2\u00ee\u00f4\u00fb]+$/;cc.LabelTTF._firsrEnglish=/^[a-zA-Z0-9\u00c4\u00d6\u00dc\u00e4\u00f6\u00fc\u00df\u00e9\u00e8\u00e7\u00e0\u00f9\u00ea\u00e2\u00ee\u00f4\u00fb]/;cc.LabelTTF._fontStyleRE=/^(\d+)px\s+['"]?([\w\s\d]+)['"]?$/;cc.LabelTTF.create=function(a,b,c,d,e,f){return new cc.LabelTTF(a,b,c,d,e,f)};cc.LabelTTF.createWithFontDefinition=cc.LabelTTF.create; cc.LabelTTF._SHADER_PROGRAM=cc.USE_LA88_LABELS?cc.SHADER_POSITION_TEXTURECOLOR:cc.SHADER_POSITION_TEXTUREA8COLOR;cc.LabelTTF.__labelHeightDiv=cc.newElement("div");cc.LabelTTF.__labelHeightDiv.style.fontFamily="Arial";cc.LabelTTF.__labelHeightDiv.style.position="absolute";cc.LabelTTF.__labelHeightDiv.style.left="-100px";cc.LabelTTF.__labelHeightDiv.style.top="-100px";cc.LabelTTF.__labelHeightDiv.style.lineHeight="normal"; document.body?document.body.appendChild(cc.LabelTTF.__labelHeightDiv):cc._addEventListener(window,"load",function(){this.removeEventListener("load",arguments.callee,!1);document.body.appendChild(cc.LabelTTF.__labelHeightDiv)},!1); cc.LabelTTF.__getFontHeightByDiv=function(a,b){var c=cc.LabelTTF.__fontHeightCache[a+"."+b];if(0=a&&b.actionIndex--;0==b.actions.length&&(this._currentTarget==b?this._currentTargetSalvaged=!0:this._deleteHashElement(b))},_deleteHashElement:function(a){a&&(delete this._hashTargets[a.target.__instanceId],cc.arrayRemoveObject(this._arrayTargets,a),a.actions= null,a.target=null)},_actionAllocWithHashElement:function(a){null==a.actions&&(a.actions=[])},update:function(a){for(var b=this._arrayTargets,c,d=0;d=this._duration},_cloneDecoration:function(a){a._repeatForever=this._repeatForever;a._speed=this._speed;a._times=this._times;a._easeList=this._easeList;a._speedMethod=this._speedMethod;a._repeatMethod=this._repeatMethod},_reverseEaseList:function(a){if(this._easeList){a._easeList=[];for(var b=0;ba?a:1;this.update(0=a)return cc.log("The speed parameter error"),this;this._speedMethod=!0;this._speed*=a;return this},getSpeed:function(){return this._speed},setSpeed:function(a){this._speed=a;return this},repeat:function(a){a=Math.round(a);if(isNaN(a)||1>a)return cc.log("The repeat parameter error"),this;this._repeatMethod=!0;this._times*=a;return this},repeatForever:function(){this._repeatMethod=!0;this._times=this.MAX_VALUE;this._repeatForever=!0;return this}}); cc.actionInterval=function(a){return new cc.ActionInterval(a)};cc.ActionInterval.create=cc.actionInterval; cc.Sequence=cc.ActionInterval.extend({_actions:null,_split:null,_last:0,ctor:function(a){cc.ActionInterval.prototype.ctor.call(this);this._actions=[];var b=a instanceof Array?a:arguments,c=b.length-1;0<=c&&null==b[c]&&cc.log("parameters should not be ending with null in Javascript");if(0<=c){for(var d=b[0],e=1;e=e){for(;a>e&&this._totale?this._two=cc.Sequence._actionOneTwo(b,cc.delayTime(d-e)):dc&&(c+=360);this._startAngleX=b;this._diffAngleX=c;this._startAngleY=a.rotationY%360;a=this._dstAngleY-this._startAngleY;180a&&(a+=360);this._diffAngleY=a},reverse:function(){cc.log("cc.RotateTo.reverse(): it should be overridden in subclass.")},update:function(a){a=this._computeEaseTime(a);this.target&&(this.target.rotationX= this._startAngleX+this._diffAngleX*a,this.target.rotationY=this._startAngleY+this._diffAngleY*a)}});cc.rotateTo=function(a,b,c){return new cc.RotateTo(a,b,c)};cc.RotateTo.create=cc.rotateTo; cc.RotateBy=cc.ActionInterval.extend({_angleX:0,_startAngleX:0,_angleY:0,_startAngleY:0,ctor:function(a,b,c){cc.ActionInterval.prototype.ctor.call(this);void 0!==b&&this.initWithDuration(a,b,c)},initWithDuration:function(a,b,c){return cc.ActionInterval.prototype.initWithDuration.call(this,a)?(this._angleX=b||0,this._angleY=c||this._angleX,!0):!1},clone:function(){var a=new cc.RotateBy;this._cloneDecoration(a);a.initWithDuration(this._duration,this._angleX,this._angleY);return a},startWithTarget:function(a){cc.ActionInterval.prototype.startWithTarget.call(this, a);this._startAngleX=a.rotationX;this._startAngleY=a.rotationY},update:function(a){a=this._computeEaseTime(a);this.target&&(this.target.rotationX=this._startAngleX+this._angleX*a,this.target.rotationY=this._startAngleY+this._angleY*a)},reverse:function(){var a=cc.rotateBy(this._duration,-this._angleX,-this._angleY);this._cloneDecoration(a);this._reverseEaseList(a);return a}});cc.rotateBy=function(a,b,c){return new cc.RotateBy(a,b,c)};cc.RotateBy.create=cc.rotateBy; cc.MoveBy=cc.ActionInterval.extend({_positionDelta:null,_startPosition:null,_previousPosition:null,ctor:function(a,b,c){cc.ActionInterval.prototype.ctor.call(this);this._positionDelta=cc.p(0,0);this._startPosition=cc.p(0,0);this._previousPosition=cc.p(0,0);void 0!==b&&this.initWithDuration(a,b,c)},initWithDuration:function(a,b,c){return cc.ActionInterval.prototype.initWithDuration.call(this,a)?(void 0!==b.x&&(c=b.y,b=b.x),this._positionDelta.x=b,this._positionDelta.y=c,!0):!1},clone:function(){var a= new cc.MoveBy;this._cloneDecoration(a);a.initWithDuration(this._duration,this._positionDelta);return a},startWithTarget:function(a){cc.ActionInterval.prototype.startWithTarget.call(this,a);var b=a.getPositionX();a=a.getPositionY();this._previousPosition.x=b;this._previousPosition.y=a;this._startPosition.x=b;this._startPosition.y=a},update:function(a){a=this._computeEaseTime(a);if(this.target){var b=this._positionDelta.x*a;a*=this._positionDelta.y;var c=this._startPosition;if(cc.ENABLE_STACKABLE_ACTIONS){var d= this.target.getPositionX(),e=this.target.getPositionY(),f=this._previousPosition;c.x=c.x+d-f.x;c.y=c.y+e-f.y;b+=c.x;a+=c.y;f.x=b;f.y=a;this.target.setPosition(b,a)}else this.target.setPosition(c.x+b,c.y+a)}},reverse:function(){var a=cc.moveBy(this._duration,cc.p(-this._positionDelta.x,-this._positionDelta.y));this._cloneDecoration(a);this._reverseEaseList(a);return a}});cc.moveBy=function(a,b,c){return new cc.MoveBy(a,b,c)};cc.MoveBy.create=cc.moveBy; cc.MoveTo=cc.MoveBy.extend({_endPosition:null,ctor:function(a,b,c){cc.MoveBy.prototype.ctor.call(this);this._endPosition=cc.p(0,0);void 0!==b&&this.initWithDuration(a,b,c)},initWithDuration:function(a,b,c){return cc.MoveBy.prototype.initWithDuration.call(this,a,b,c)?(void 0!==b.x&&(c=b.y,b=b.x),this._endPosition.x=b,this._endPosition.y=c,!0):!1},clone:function(){var a=new cc.MoveTo;this._cloneDecoration(a);a.initWithDuration(this._duration,this._endPosition);return a},startWithTarget:function(a){cc.MoveBy.prototype.startWithTarget.call(this, a);this._positionDelta.x=this._endPosition.x-a.getPositionX();this._positionDelta.y=this._endPosition.y-a.getPositionY()}});cc.moveTo=function(a,b,c){return new cc.MoveTo(a,b,c)};cc.MoveTo.create=cc.moveTo; cc.SkewTo=cc.ActionInterval.extend({_skewX:0,_skewY:0,_startSkewX:0,_startSkewY:0,_endSkewX:0,_endSkewY:0,_deltaX:0,_deltaY:0,ctor:function(a,b,c){cc.ActionInterval.prototype.ctor.call(this);void 0!==c&&this.initWithDuration(a,b,c)},initWithDuration:function(a,b,c){var d=!1;cc.ActionInterval.prototype.initWithDuration.call(this,a)&&(this._endSkewX=b,this._endSkewY=c,d=!0);return d},clone:function(){var a=new cc.SkewTo;this._cloneDecoration(a);a.initWithDuration(this._duration,this._endSkewX,this._endSkewY); return a},startWithTarget:function(a){cc.ActionInterval.prototype.startWithTarget.call(this,a);this._startSkewX=a.skewX%180;this._deltaX=this._endSkewX-this._startSkewX;180this._deltaX&&(this._deltaX+=360);this._startSkewY=a.skewY%360;this._deltaY=this._endSkewY-this._startSkewY;180this._deltaY&&(this._deltaY+=360)},update:function(a){a=this._computeEaseTime(a);this.target.skewX=this._startSkewX+this._deltaX*a;this.target.skewY= this._startSkewY+this._deltaY*a}});cc.skewTo=function(a,b,c){return new cc.SkewTo(a,b,c)};cc.SkewTo.create=cc.skewTo; cc.SkewBy=cc.SkewTo.extend({ctor:function(a,b,c){cc.SkewTo.prototype.ctor.call(this);void 0!==c&&this.initWithDuration(a,b,c)},initWithDuration:function(a,b,c){var d=!1;cc.SkewTo.prototype.initWithDuration.call(this,a,b,c)&&(this._skewX=b,this._skewY=c,d=!0);return d},clone:function(){var a=new cc.SkewBy;this._cloneDecoration(a);a.initWithDuration(this._duration,this._skewX,this._skewY);return a},startWithTarget:function(a){cc.SkewTo.prototype.startWithTarget.call(this,a);this._deltaX=this._skewX; this._deltaY=this._skewY;this._endSkewX=this._startSkewX+this._deltaX;this._endSkewY=this._startSkewY+this._deltaY},reverse:function(){var a=cc.skewBy(this._duration,-this._skewX,-this._skewY);this._cloneDecoration(a);this._reverseEaseList(a);return a}});cc.skewBy=function(a,b,c){return new cc.SkewBy(a,b,c)};cc.SkewBy.create=cc.skewBy; cc.JumpBy=cc.ActionInterval.extend({_startPosition:null,_delta:null,_height:0,_jumps:0,_previousPosition:null,ctor:function(a,b,c,d,e){cc.ActionInterval.prototype.ctor.call(this);this._startPosition=cc.p(0,0);this._previousPosition=cc.p(0,0);this._delta=cc.p(0,0);void 0!==d&&this.initWithDuration(a,b,c,d,e)},initWithDuration:function(a,b,c,d,e){return cc.ActionInterval.prototype.initWithDuration.call(this,a)?(void 0===e&&(e=d,d=c,c=b.y,b=b.x),this._delta.x=b,this._delta.y=c,this._height=d,this._jumps= e,!0):!1},clone:function(){var a=new cc.JumpBy;this._cloneDecoration(a);a.initWithDuration(this._duration,this._delta,this._height,this._jumps);return a},startWithTarget:function(a){cc.ActionInterval.prototype.startWithTarget.call(this,a);var b=a.getPositionX();a=a.getPositionY();this._previousPosition.x=b;this._previousPosition.y=a;this._startPosition.x=b;this._startPosition.y=a},update:function(a){a=this._computeEaseTime(a);if(this.target){var b=a*this._jumps%1,b=4*this._height*b*(1-b),b=b+this._delta.y* a;a*=this._delta.x;var c=this._startPosition;if(cc.ENABLE_STACKABLE_ACTIONS){var d=this.target.getPositionX(),e=this.target.getPositionY(),f=this._previousPosition;c.x=c.x+d-f.x;c.y=c.y+e-f.y;a+=c.x;b+=c.y;f.x=a;f.y=b;this.target.setPosition(a,b)}else this.target.setPosition(c.x+a,c.y+b)}},reverse:function(){var a=cc.jumpBy(this._duration,cc.p(-this._delta.x,-this._delta.y),this._height,this._jumps);this._cloneDecoration(a);this._reverseEaseList(a);return a}}); cc.jumpBy=function(a,b,c,d,e){return new cc.JumpBy(a,b,c,d,e)};cc.JumpBy.create=cc.jumpBy; cc.JumpTo=cc.JumpBy.extend({_endPosition:null,ctor:function(a,b,c,d,e){cc.JumpBy.prototype.ctor.call(this);this._endPosition=cc.p(0,0);void 0!==d&&this.initWithDuration(a,b,c,d,e)},initWithDuration:function(a,b,c,d,e){return cc.JumpBy.prototype.initWithDuration.call(this,a,b,c,d,e)?(void 0===e&&(c=b.y,b=b.x),this._endPosition.x=b,this._endPosition.y=c,!0):!1},startWithTarget:function(a){cc.JumpBy.prototype.startWithTarget.call(this,a);this._delta.x=this._endPosition.x-this._startPosition.x;this._delta.y= this._endPosition.y-this._startPosition.y},clone:function(){var a=new cc.JumpTo;this._cloneDecoration(a);a.initWithDuration(this._duration,this._endPosition,this._height,this._jumps);return a}});cc.jumpTo=function(a,b,c,d,e){return new cc.JumpTo(a,b,c,d,e)};cc.JumpTo.create=cc.jumpTo;cc.bezierAt=function(a,b,c,d,e){return Math.pow(1-e,3)*a+3*e*Math.pow(1-e,2)*b+3*Math.pow(e,2)*(1-e)*c+Math.pow(e,3)*d}; cc.BezierBy=cc.ActionInterval.extend({_config:null,_startPosition:null,_previousPosition:null,ctor:function(a,b){cc.ActionInterval.prototype.ctor.call(this);this._config=[];this._startPosition=cc.p(0,0);this._previousPosition=cc.p(0,0);b&&this.initWithDuration(a,b)},initWithDuration:function(a,b){return cc.ActionInterval.prototype.initWithDuration.call(this,a)?(this._config=b,!0):!1},clone:function(){var a=new cc.BezierBy;this._cloneDecoration(a);for(var b=[],c=0;cb/2}},startWithTarget:function(a){cc.ActionInterval.prototype.startWithTarget.call(this,a);this._originalState=a.visible},stop:function(){this.target.visible=this._originalState;cc.ActionInterval.prototype.stop.call(this)},reverse:function(){var a=cc.blink(this._duration,this._times);this._cloneDecoration(a);this._reverseEaseList(a);return a}});cc.blink=function(a,b){return new cc.Blink(a,b)};cc.Blink.create=cc.blink; cc.FadeTo=cc.ActionInterval.extend({_toOpacity:0,_fromOpacity:0,ctor:function(a,b){cc.ActionInterval.prototype.ctor.call(this);void 0!==b&&this.initWithDuration(a,b)},initWithDuration:function(a,b){return cc.ActionInterval.prototype.initWithDuration.call(this,a)?(this._toOpacity=b,!0):!1},clone:function(){var a=new cc.FadeTo;this._cloneDecoration(a);a.initWithDuration(this._duration,this._toOpacity);return a},update:function(a){a=this._computeEaseTime(a);var b=void 0!==this._fromOpacity?this._fromOpacity: 255;this.target.opacity=b+(this._toOpacity-b)*a},startWithTarget:function(a){cc.ActionInterval.prototype.startWithTarget.call(this,a);this._fromOpacity=a.opacity}});cc.fadeTo=function(a,b){return new cc.FadeTo(a,b)};cc.FadeTo.create=cc.fadeTo; cc.FadeIn=cc.FadeTo.extend({_reverseAction:null,ctor:function(a){cc.FadeTo.prototype.ctor.call(this);a&&this.initWithDuration(a,255)},reverse:function(){var a=new cc.FadeOut;a.initWithDuration(this._duration,0);this._cloneDecoration(a);this._reverseEaseList(a);return a},clone:function(){var a=new cc.FadeIn;this._cloneDecoration(a);a.initWithDuration(this._duration,this._toOpacity);return a},startWithTarget:function(a){this._reverseAction&&(this._toOpacity=this._reverseAction._fromOpacity);cc.FadeTo.prototype.startWithTarget.call(this, a)}});cc.fadeIn=function(a){return new cc.FadeIn(a)};cc.FadeIn.create=cc.fadeIn;cc.FadeOut=cc.FadeTo.extend({ctor:function(a){cc.FadeTo.prototype.ctor.call(this);a&&this.initWithDuration(a,0)},reverse:function(){var a=new cc.FadeIn;a._reverseAction=this;a.initWithDuration(this._duration,255);this._cloneDecoration(a);this._reverseEaseList(a);return a},clone:function(){var a=new cc.FadeOut;this._cloneDecoration(a);a.initWithDuration(this._duration,this._toOpacity);return a}});cc.fadeOut=function(a){return new cc.FadeOut(a)}; cc.FadeOut.create=cc.fadeOut; cc.TintTo=cc.ActionInterval.extend({_to:null,_from:null,ctor:function(a,b,c,d){cc.ActionInterval.prototype.ctor.call(this);this._to=cc.color(0,0,0);this._from=cc.color(0,0,0);void 0!==d&&this.initWithDuration(a,b,c,d)},initWithDuration:function(a,b,c,d){return cc.ActionInterval.prototype.initWithDuration.call(this,a)?(this._to=cc.color(b,c,d),!0):!1},clone:function(){var a=new cc.TintTo;this._cloneDecoration(a);var b=this._to;a.initWithDuration(this._duration,b.r,b.g,b.b);return a},startWithTarget:function(a){cc.ActionInterval.prototype.startWithTarget.call(this, a);this._from=this.target.color},update:function(a){a=this._computeEaseTime(a);var b=this._from,c=this._to;b&&(this.target.color=cc.color(b.r+(c.r-b.r)*a,b.g+(c.g-b.g)*a,b.b+(c.b-b.b)*a))}});cc.tintTo=function(a,b,c,d){return new cc.TintTo(a,b,c,d)};cc.TintTo.create=cc.tintTo; cc.TintBy=cc.ActionInterval.extend({_deltaR:0,_deltaG:0,_deltaB:0,_fromR:0,_fromG:0,_fromB:0,ctor:function(a,b,c,d){cc.ActionInterval.prototype.ctor.call(this);void 0!==d&&this.initWithDuration(a,b,c,d)},initWithDuration:function(a,b,c,d){return cc.ActionInterval.prototype.initWithDuration.call(this,a)?(this._deltaR=b,this._deltaG=c,this._deltaB=d,!0):!1},clone:function(){var a=new cc.TintBy;this._cloneDecoration(a);a.initWithDuration(this._duration,this._deltaR,this._deltaG,this._deltaB);return a}, startWithTarget:function(a){cc.ActionInterval.prototype.startWithTarget.call(this,a);a=a.color;this._fromR=a.r;this._fromG=a.g;this._fromB=a.b},update:function(a){a=this._computeEaseTime(a);this.target.color=cc.color(this._fromR+this._deltaR*a,this._fromG+this._deltaG*a,this._fromB+this._deltaB*a)},reverse:function(){var a=cc.tintBy(this._duration,-this._deltaR,-this._deltaG,-this._deltaB);this._cloneDecoration(a);this._reverseEaseList(a);return a}}); cc.tintBy=function(a,b,c,d){return new cc.TintBy(a,b,c,d)};cc.TintBy.create=cc.tintBy;cc.DelayTime=cc.ActionInterval.extend({update:function(a){},reverse:function(){var a=cc.delayTime(this._duration);this._cloneDecoration(a);this._reverseEaseList(a);return a},clone:function(){var a=new cc.DelayTime;this._cloneDecoration(a);a.initWithDuration(this._duration);return a}});cc.delayTime=function(a){return new cc.DelayTime(a)};cc.DelayTime.create=cc.delayTime; cc.ReverseTime=cc.ActionInterval.extend({_other:null,ctor:function(a){cc.ActionInterval.prototype.ctor.call(this);this._other=null;a&&this.initWithAction(a)},initWithAction:function(a){if(!a)throw"cc.ReverseTime.initWithAction(): action must be non null";if(a==this._other)throw"cc.ReverseTime.initWithAction(): the action was already passed in.";return cc.ActionInterval.prototype.initWithDuration.call(this,a._duration)?(this._other=a,!0):!1},clone:function(){var a=new cc.ReverseTime;this._cloneDecoration(a); a.initWithAction(this._other.clone());return a},startWithTarget:function(a){cc.ActionInterval.prototype.startWithTarget.call(this,a);this._other.startWithTarget(a)},update:function(a){a=this._computeEaseTime(a);this._other&&this._other.update(1-a)},reverse:function(){return this._other.clone()},stop:function(){this._other.stop();cc.Action.prototype.stop.call(this)}});cc.reverseTime=function(a){return new cc.ReverseTime(a)};cc.ReverseTime.create=cc.reverseTime; cc.Animate=cc.ActionInterval.extend({_animation:null,_nextFrame:0,_origFrame:null,_executedLoops:0,_splitTimes:null,ctor:function(a){cc.ActionInterval.prototype.ctor.call(this);this._splitTimes=[];a&&this.initWithAnimation(a)},getAnimation:function(){return this._animation},setAnimation:function(a){this._animation=a},initWithAnimation:function(a){if(!a)throw"cc.Animate.initWithAnimation(): animation must be non-NULL";var b=a.getDuration();if(this.initWithDuration(b*a.getLoops())){this._nextFrame= 0;this.setAnimation(a);this._origFrame=null;this._executedLoops=0;var c=this._splitTimes,d=c.length=0,e=b/a.getTotalDelayUnits();a=a.getFrames();cc.arrayVerifyType(a,cc.AnimationFrame);for(var f=0;fa&&(a*=this._animation.getLoops(),(0|a)>this._executedLoops&&(this._nextFrame=0,this._executedLoops++),a%=1);for(var b=this._animation.getFrames(),c=b.length,d=this._splitTimes,e=this._nextFrame;eb?Math.PI-Math.asin(d/e):Math.asin(d/e);return{newRadius:c/cc.Camera.getZEye(),zenith:a,azimuth:b}},startWithTarget:function(a){cc.ActionInterval.prototype.startWithTarget.call(this, a);a=this.sphericalRadius();isNaN(this._radius)&&(this._radius=a.newRadius);isNaN(this._angleZ)&&(this._angleZ=cc.radiansToDegrees(a.zenith));isNaN(this._angleX)&&(this._angleX=cc.radiansToDegrees(a.azimuth));this._radZ=cc.degreesToRadians(this._angleZ);this._radX=cc.degreesToRadians(this._angleX)},clone:function(){var a=new cc.OrbitCamera;a.initWithDuration(this._duration,this._radius,this._deltaRadius,this._angleZ,this._deltaAngleZ,this._angleX,this._deltaAngleX);return a},update:function(a){a= this._computeEaseTime(a);var b=(this._radius+this._deltaRadius*a)*cc.Camera.getZEye(),c=this._radZ+this._radDeltaZ*a,d=this._radX+this._radDeltaX*a;a=Math.sin(c)*Math.cos(d)*b+this._centerXOrig;d=Math.sin(c)*Math.sin(d)*b+this._centerYOrig;b=Math.cos(c)*b+this._centerZOrig;this.target.getCamera().setEye(a,d,b)}});cc.orbitCamera=function(a,b,c,d,e,f,g){return new cc.OrbitCamera(a,b,c,d,e,f,g)};cc.OrbitCamera.create=cc.orbitCamera;cc.ActionEase=cc.ActionInterval.extend({_inner:null,ctor:function(a){cc.ActionInterval.prototype.ctor.call(this);a&&this.initWithAction(a)},initWithAction:function(a){if(!a)throw"cc.ActionEase.initWithAction(): action must be non nil";return this.initWithDuration(a.getDuration())?(this._inner=a,!0):!1},clone:function(){var a=new cc.ActionEase;a.initWithAction(this._inner.clone());return a},startWithTarget:function(a){cc.ActionInterval.prototype.startWithTarget.call(this,a);this._inner.startWithTarget(this.target)}, stop:function(){this._inner.stop();cc.ActionInterval.prototype.stop.call(this)},update:function(a){this._inner.update(a)},reverse:function(){return cc.ActionEase.create(this._inner.reverse())},getInnerAction:function(){return this._inner}});cc.actionEase=function(a){return new cc.ActionEase(a)};cc.ActionEase.create=cc.actionEase; cc.EaseRateAction=cc.ActionEase.extend({_rate:0,ctor:function(a,b){cc.ActionEase.prototype.ctor.call(this);void 0!==b&&this.initWithAction(a,b)},setRate:function(a){this._rate=a},getRate:function(){return this._rate},initWithAction:function(a,b){return cc.ActionEase.prototype.initWithAction.call(this,a)?(this._rate=b,!0):!1},clone:function(){var a=new cc.EaseRateAction;a.initWithAction(this._inner.clone(),this._rate);return a},reverse:function(){return cc.EaseRateAction.create(this._inner.reverse(), 1/this._rate)}});cc.easeRateAction=function(a,b){return new cc.EaseRateAction(a,b)};cc.EaseRateAction.create=cc.easeRateAction;cc.EaseIn=cc.EaseRateAction.extend({update:function(a){this._inner.update(Math.pow(a,this._rate))},reverse:function(){return cc.EaseIn.create(this._inner.reverse(),1/this._rate)},clone:function(){var a=new cc.EaseIn;a.initWithAction(this._inner.clone(),this._rate);return a}});cc.EaseIn.create=function(a,b){return new cc.EaseIn(a,b)}; cc.easeIn=function(a){return{_rate:a,easing:function(a){return Math.pow(a,this._rate)},reverse:function(){return cc.easeIn(1/this._rate)}}};cc.EaseOut=cc.EaseRateAction.extend({update:function(a){this._inner.update(Math.pow(a,1/this._rate))},reverse:function(){return cc.EaseOut.create(this._inner.reverse(),1/this._rate)},clone:function(){var a=new cc.EaseOut;a.initWithAction(this._inner.clone(),this._rate);return a}});cc.EaseOut.create=function(a,b){return new cc.EaseOut(a,b)}; cc.easeOut=function(a){return{_rate:a,easing:function(a){return Math.pow(a,1/this._rate)},reverse:function(){return cc.easeOut(1/this._rate)}}};cc.EaseInOut=cc.EaseRateAction.extend({update:function(a){a*=2;1>a?this._inner.update(0.5*Math.pow(a,this._rate)):this._inner.update(1-0.5*Math.pow(2-a,this._rate))},clone:function(){var a=new cc.EaseInOut;a.initWithAction(this._inner.clone(),this._rate);return a},reverse:function(){return cc.EaseInOut.create(this._inner.reverse(),this._rate)}}); cc.EaseInOut.create=function(a,b){return new cc.EaseInOut(a,b)};cc.easeInOut=function(a){return{_rate:a,easing:function(a){a*=2;return 1>a?0.5*Math.pow(a,this._rate):1-0.5*Math.pow(2-a,this._rate)},reverse:function(){return cc.easeInOut(this._rate)}}}; cc.EaseExponentialIn=cc.ActionEase.extend({update:function(a){this._inner.update(0===a?0:Math.pow(2,10*(a-1)))},reverse:function(){return cc.EaseExponentialOut.create(this._inner.reverse())},clone:function(){var a=new cc.EaseExponentialIn;a.initWithAction(this._inner.clone());return a}});cc.EaseExponentialIn.create=function(a){return new cc.EaseExponentialIn(a)};cc._easeExponentialInObj={easing:function(a){return 0===a?0:Math.pow(2,10*(a-1))},reverse:function(){return cc._easeExponentialOutObj}}; cc.easeExponentialIn=function(){return cc._easeExponentialInObj};cc.EaseExponentialOut=cc.ActionEase.extend({update:function(a){this._inner.update(1==a?1:-Math.pow(2,-10*a)+1)},reverse:function(){return cc.EaseExponentialIn.create(this._inner.reverse())},clone:function(){var a=new cc.EaseExponentialOut;a.initWithAction(this._inner.clone());return a}});cc.EaseExponentialOut.create=function(a){return new cc.EaseExponentialOut(a)}; cc._easeExponentialOutObj={easing:function(a){return 1==a?1:-Math.pow(2,-10*a)+1},reverse:function(){return cc._easeExponentialInObj}};cc.easeExponentialOut=function(){return cc._easeExponentialOutObj}; cc.EaseExponentialInOut=cc.ActionEase.extend({update:function(a){1!=a&&0!==a&&(a*=2,a=1>a?0.5*Math.pow(2,10*(a-1)):0.5*(-Math.pow(2,-10*(a-1))+2));this._inner.update(a)},reverse:function(){return cc.EaseExponentialInOut.create(this._inner.reverse())},clone:function(){var a=new cc.EaseExponentialInOut;a.initWithAction(this._inner.clone());return a}});cc.EaseExponentialInOut.create=function(a){return new cc.EaseExponentialInOut(a)}; cc._easeExponentialInOutObj={easing:function(a){return 1!==a&&0!==a?(a*=2,1>a?0.5*Math.pow(2,10*(a-1)):0.5*(-Math.pow(2,-10*(a-1))+2)):a},reverse:function(){return cc._easeExponentialInOutObj}};cc.easeExponentialInOut=function(){return cc._easeExponentialInOutObj}; cc.EaseSineIn=cc.ActionEase.extend({update:function(a){a=0===a||1===a?a:-1*Math.cos(a*Math.PI/2)+1;this._inner.update(a)},reverse:function(){return cc.EaseSineOut.create(this._inner.reverse())},clone:function(){var a=new cc.EaseSineIn;a.initWithAction(this._inner.clone());return a}});cc.EaseSineIn.create=function(a){return new cc.EaseSineIn(a)};cc._easeSineInObj={easing:function(a){return 0===a||1===a?a:-1*Math.cos(a*Math.PI/2)+1},reverse:function(){return cc._easeSineOutObj}};cc.easeSineIn=function(){return cc._easeSineInObj}; cc.EaseSineOut=cc.ActionEase.extend({update:function(a){a=0===a||1===a?a:Math.sin(a*Math.PI/2);this._inner.update(a)},reverse:function(){return cc.EaseSineIn.create(this._inner.reverse())},clone:function(){var a=new cc.EaseSineOut;a.initWithAction(this._inner.clone());return a}});cc.EaseSineOut.create=function(a){return new cc.EaseSineOut(a)};cc._easeSineOutObj={easing:function(a){return 0===a||1==a?a:Math.sin(a*Math.PI/2)},reverse:function(){return cc._easeSineInObj}};cc.easeSineOut=function(){return cc._easeSineOutObj}; cc.EaseSineInOut=cc.ActionEase.extend({update:function(a){a=0===a||1===a?a:-0.5*(Math.cos(Math.PI*a)-1);this._inner.update(a)},clone:function(){var a=new cc.EaseSineInOut;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseSineInOut.create(this._inner.reverse())}});cc.EaseSineInOut.create=function(a){return new cc.EaseSineInOut(a)};cc._easeSineInOutObj={easing:function(a){return 0===a||1===a?a:-0.5*(Math.cos(Math.PI*a)-1)},reverse:function(){return cc._easeSineInOutObj}}; cc.easeSineInOut=function(){return cc._easeSineInOutObj}; cc.EaseElastic=cc.ActionEase.extend({_period:0.3,ctor:function(a,b){cc.ActionEase.prototype.ctor.call(this);a&&this.initWithAction(a,b)},getPeriod:function(){return this._period},setPeriod:function(a){this._period=a},initWithAction:function(a,b){cc.ActionEase.prototype.initWithAction.call(this,a);this._period=null==b?0.3:b;return!0},reverse:function(){cc.log("cc.EaseElastic.reverse(): it should be overridden in subclass.");return null},clone:function(){var a=new cc.EaseElastic;a.initWithAction(this._inner.clone(), this._period);return a}});cc.EaseElastic.create=function(a,b){return new cc.EaseElastic(a,b)};cc.EaseElasticIn=cc.EaseElastic.extend({update:function(a){var b=0;0===a||1===a?b=a:(b=this._period/4,a-=1,b=-Math.pow(2,10*a)*Math.sin(2*(a-b)*Math.PI/this._period));this._inner.update(b)},reverse:function(){return cc.EaseElasticOut.create(this._inner.reverse(),this._period)},clone:function(){var a=new cc.EaseElasticIn;a.initWithAction(this._inner.clone(),this._period);return a}}); cc.EaseElasticIn.create=function(a,b){return new cc.EaseElasticIn(a,b)};cc._easeElasticInObj={easing:function(a){if(0===a||1===a)return a;a-=1;return-Math.pow(2,10*a)*Math.sin(2*(a-0.075)*Math.PI/0.3)},reverse:function(){return cc._easeElasticOutObj}};cc.easeElasticIn=function(a){return a&&0.3!==a?{_period:a,easing:function(a){if(0===a||1===a)return a;a-=1;return-Math.pow(2,10*a)*Math.sin(2*(a-this._period/4)*Math.PI/this._period)},reverse:function(){return cc.easeElasticOut(this._period)}}:cc._easeElasticInObj}; cc.EaseElasticOut=cc.EaseElastic.extend({update:function(a){var b=0;0===a||1==a?b=a:(b=this._period/4,b=Math.pow(2,-10*a)*Math.sin(2*(a-b)*Math.PI/this._period)+1);this._inner.update(b)},reverse:function(){return cc.EaseElasticIn.create(this._inner.reverse(),this._period)},clone:function(){var a=new cc.EaseElasticOut;a.initWithAction(this._inner.clone(),this._period);return a}});cc.EaseElasticOut.create=function(a,b){return new cc.EaseElasticOut(a,b)}; cc._easeElasticOutObj={easing:function(a){return 0===a||1===a?a:Math.pow(2,-10*a)*Math.sin(2*(a-0.075)*Math.PI/0.3)+1},reverse:function(){return cc._easeElasticInObj}};cc.easeElasticOut=function(a){return a&&0.3!==a?{_period:a,easing:function(a){return 0===a||1===a?a:Math.pow(2,-10*a)*Math.sin(2*(a-this._period/4)*Math.PI/this._period)+1},reverse:function(){return cc.easeElasticIn(this._period)}}:cc._easeElasticOutObj}; cc.EaseElasticInOut=cc.EaseElastic.extend({update:function(a){var b=0,b=this._period;if(0===a||1==a)b=a;else{b||(b=this._period=0.3*1.5);var c=b/4;a=2*a-1;b=0>a?-0.5*Math.pow(2,10*a)*Math.sin(2*(a-c)*Math.PI/b):0.5*Math.pow(2,-10*a)*Math.sin(2*(a-c)*Math.PI/b)+1}this._inner.update(b)},reverse:function(){return cc.EaseElasticInOut.create(this._inner.reverse(),this._period)},clone:function(){var a=new cc.EaseElasticInOut;a.initWithAction(this._inner.clone(),this._period);return a}}); cc.EaseElasticInOut.create=function(a,b){return new cc.EaseElasticInOut(a,b)};cc.easeElasticInOut=function(a){return{_period:a||0.3,easing:function(a){var c=0,c=this._period;if(0===a||1===a)c=a;else{c||(c=this._period=0.3*1.5);var d=c/4;a=2*a-1;c=0>a?-0.5*Math.pow(2,10*a)*Math.sin(2*(a-d)*Math.PI/c):0.5*Math.pow(2,-10*a)*Math.sin(2*(a-d)*Math.PI/c)+1}return c},reverse:function(){return cc.easeElasticInOut(this._period)}}}; cc.EaseBounce=cc.ActionEase.extend({bounceTime:function(a){if(a<1/2.75)return 7.5625*a*a;if(a<2/2.75)return a-=1.5/2.75,7.5625*a*a+0.75;if(a<2.5/2.75)return a-=2.25/2.75,7.5625*a*a+0.9375;a-=2.625/2.75;return 7.5625*a*a+0.984375},clone:function(){var a=new cc.EaseBounce;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseBounce.create(this._inner.reverse())}});cc.EaseBounce.create=function(a){return new cc.EaseBounce(a)}; cc.EaseBounceIn=cc.EaseBounce.extend({update:function(a){a=1-this.bounceTime(1-a);this._inner.update(a)},reverse:function(){return cc.EaseBounceOut.create(this._inner.reverse())},clone:function(){var a=new cc.EaseBounceIn;a.initWithAction(this._inner.clone());return a}});cc.EaseBounceIn.create=function(a){return new cc.EaseBounceIn(a)}; cc._bounceTime=function(a){if(a<1/2.75)return 7.5625*a*a;if(a<2/2.75)return a-=1.5/2.75,7.5625*a*a+0.75;if(a<2.5/2.75)return a-=2.25/2.75,7.5625*a*a+0.9375;a-=2.625/2.75;return 7.5625*a*a+0.984375};cc._easeBounceInObj={easing:function(a){return 1-cc._bounceTime(1-a)},reverse:function(){return cc._easeBounceOutObj}};cc.easeBounceIn=function(){return cc._easeBounceInObj}; cc.EaseBounceOut=cc.EaseBounce.extend({update:function(a){a=this.bounceTime(a);this._inner.update(a)},reverse:function(){return cc.EaseBounceIn.create(this._inner.reverse())},clone:function(){var a=new cc.EaseBounceOut;a.initWithAction(this._inner.clone());return a}});cc.EaseBounceOut.create=function(a){return new cc.EaseBounceOut(a)};cc._easeBounceOutObj={easing:function(a){return cc._bounceTime(a)},reverse:function(){return cc._easeBounceInObj}};cc.easeBounceOut=function(){return cc._easeBounceOutObj}; cc.EaseBounceInOut=cc.EaseBounce.extend({update:function(a){var b=0,b=0.5>a?0.5*(1-this.bounceTime(1-2*a)):0.5*this.bounceTime(2*a-1)+0.5;this._inner.update(b)},clone:function(){var a=new cc.EaseBounceInOut;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseBounceInOut.create(this._inner.reverse())}});cc.EaseBounceInOut.create=function(a){return new cc.EaseBounceInOut(a)}; cc._easeBounceInOutObj={easing:function(a){return a=0.5>a?0.5*(1-cc._bounceTime(1-2*a)):0.5*cc._bounceTime(2*a-1)+0.5},reverse:function(){return cc._easeBounceInOutObj}};cc.easeBounceInOut=function(){return cc._easeBounceInOutObj};cc.EaseBackIn=cc.ActionEase.extend({update:function(a){this._inner.update(0===a||1==a?a:a*a*(2.70158*a-1.70158))},reverse:function(){return cc.EaseBackOut.create(this._inner.reverse())},clone:function(){var a=new cc.EaseBackIn;a.initWithAction(this._inner.clone());return a}}); cc.EaseBackIn.create=function(a){return new cc.EaseBackIn(a)};cc._easeBackInObj={easing:function(a){return 0===a||1===a?a:a*a*(2.70158*a-1.70158)},reverse:function(){return cc._easeBackOutObj}};cc.easeBackIn=function(){return cc._easeBackInObj}; cc.EaseBackOut=cc.ActionEase.extend({update:function(a){a-=1;this._inner.update(a*a*(2.70158*a+1.70158)+1)},reverse:function(){return cc.EaseBackIn.create(this._inner.reverse())},clone:function(){var a=new cc.EaseBackOut;a.initWithAction(this._inner.clone());return a}});cc.EaseBackOut.create=function(a){return new cc.EaseBackOut(a)};cc._easeBackOutObj={easing:function(a){a-=1;return a*a*(2.70158*a+1.70158)+1},reverse:function(){return cc._easeBackInObj}};cc.easeBackOut=function(){return cc._easeBackOutObj}; cc.EaseBackInOut=cc.ActionEase.extend({update:function(a){a*=2;1>a?this._inner.update(a*a*(3.5949095*a-2.5949095)/2):(a-=2,this._inner.update(a*a*(3.5949095*a+2.5949095)/2+1))},clone:function(){var a=new cc.EaseBackInOut;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseBackInOut.create(this._inner.reverse())}});cc.EaseBackInOut.create=function(a){return new cc.EaseBackInOut(a)}; cc._easeBackInOutObj={easing:function(a){a*=2;if(1>a)return a*a*(3.5949095*a-2.5949095)/2;a-=2;return a*a*(3.5949095*a+2.5949095)/2+1},reverse:function(){return cc._easeBackInOutObj}};cc.easeBackInOut=function(){return cc._easeBackInOutObj}; cc.EaseBezierAction=cc.ActionEase.extend({_p0:null,_p1:null,_p2:null,_p3:null,ctor:function(a){cc.ActionEase.prototype.ctor.call(this,a)},_updateTime:function(a,b,c,d,e){return Math.pow(1-e,3)*a+3*e*Math.pow(1-e,2)*b+3*Math.pow(e,2)*(1-e)*c+Math.pow(e,3)*d},update:function(a){a=this._updateTime(this._p0,this._p1,this._p2,this._p3,a);this._inner.update(a)},clone:function(){var a=new cc.EaseBezierAction;a.initWithAction(this._inner.clone());a.setBezierParamer(this._p0,this._p1,this._p2,this._p3);return a}, reverse:function(){var a=cc.EaseBezierAction.create(this._inner.reverse());a.setBezierParamer(this._p3,this._p2,this._p1,this._p0);return a},setBezierParamer:function(a,b,c,d){this._p0=a||0;this._p1=b||0;this._p2=c||0;this._p3=d||0}});cc.EaseBezierAction.create=function(a){return new cc.EaseBezierAction(a)};cc.easeBezierAction=function(a,b,c,d){return{easing:function(e){return cc.EaseBezierAction.prototype._updateTime(a,b,c,d,e)},reverse:function(){return cc.easeBezierAction(d,c,b,a)}}}; cc.EaseQuadraticActionIn=cc.ActionEase.extend({_updateTime:function(a){return Math.pow(a,2)},update:function(a){this._inner.update(this._updateTime(a))},clone:function(){var a=new cc.EaseQuadraticActionIn;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseQuadraticActionIn.create(this._inner.reverse())}});cc.EaseQuadraticActionIn.create=function(a){return new cc.EaseQuadraticActionIn(a)}; cc._easeQuadraticActionIn={easing:cc.EaseQuadraticActionIn.prototype._updateTime,reverse:function(){return cc._easeQuadraticActionIn}};cc.easeQuadraticActionIn=function(){return cc._easeQuadraticActionIn};cc.EaseQuadraticActionOut=cc.ActionEase.extend({_updateTime:function(a){return-a*(a-2)},update:function(a){this._inner.update(this._updateTime(a))},clone:function(){var a=new cc.EaseQuadraticActionOut;a.initWithAction();return a},reverse:function(){return cc.EaseQuadraticActionOut.create(this._inner.reverse())}}); cc.EaseQuadraticActionOut.create=function(a){return new cc.EaseQuadraticActionOut(a)};cc._easeQuadraticActionOut={easing:cc.EaseQuadraticActionOut.prototype._updateTime,reverse:function(){return cc._easeQuadraticActionOut}};cc.easeQuadraticActionOut=function(){return cc._easeQuadraticActionOut}; cc.EaseQuadraticActionInOut=cc.ActionEase.extend({_updateTime:function(a){var b=a;a*=2;1>a?b=0.5*a*a:(--a,b=-0.5*(a*(a-2)-1));return b},update:function(a){this._inner.update(this._updateTime(a))},clone:function(){var a=new cc.EaseQuadraticActionInOut;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseQuadraticActionInOut.create(this._inner.reverse())}});cc.EaseQuadraticActionInOut.create=function(a){return new cc.EaseQuadraticActionInOut(a)}; cc._easeQuadraticActionInOut={easing:cc.EaseQuadraticActionInOut.prototype._updateTime,reverse:function(){return cc._easeQuadraticActionInOut}};cc.easeQuadraticActionInOut=function(){return cc._easeQuadraticActionInOut};cc.EaseQuarticActionIn=cc.ActionEase.extend({_updateTime:function(a){return a*a*a*a},update:function(a){this._inner.update(this._updateTime(a))},clone:function(){var a=new cc.EaseQuarticActionIn;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseQuarticActionIn.create(this._inner.reverse())}}); cc.EaseQuarticActionIn.create=function(a){return new cc.EaseQuarticActionIn(a)};cc._easeQuarticActionIn={easing:cc.EaseQuarticActionIn.prototype._updateTime,reverse:function(){return cc._easeQuarticActionIn}};cc.easeQuarticActionIn=function(){return cc._easeQuarticActionIn}; cc.EaseQuarticActionOut=cc.ActionEase.extend({_updateTime:function(a){a-=1;return-(a*a*a*a-1)},update:function(a){this._inner.update(this._updateTime(a))},clone:function(){var a=new cc.EaseQuarticActionOut;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseQuarticActionOut.create(this._inner.reverse())}});cc.EaseQuarticActionOut.create=function(a){return new cc.EaseQuarticActionOut(a)};cc._easeQuarticActionOut={easing:cc.EaseQuarticActionOut.prototype._updateTime,reverse:function(){return cc._easeQuarticActionOut}}; cc.easeQuarticActionOut=function(){return cc._easeQuarticActionOut};cc.EaseQuarticActionInOut=cc.ActionEase.extend({_updateTime:function(a){a*=2;if(1>a)return 0.5*a*a*a*a;a-=2;return-0.5*(a*a*a*a-2)},update:function(a){this._inner.update(this._updateTime(a))},clone:function(){var a=new cc.EaseQuarticActionInOut;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseQuarticActionInOut.create(this._inner.reverse())}});cc.EaseQuarticActionInOut.create=function(a){return new cc.EaseQuarticActionInOut(a)}; cc._easeQuarticActionInOut={easing:cc.EaseQuarticActionInOut.prototype._updateTime,reverse:function(){return cc._easeQuarticActionInOut}};cc.easeQuarticActionInOut=function(){return cc._easeQuarticActionInOut};cc.EaseQuinticActionIn=cc.ActionEase.extend({_updateTime:function(a){return a*a*a*a*a},update:function(a){this._inner.update(this._updateTime(a))},clone:function(){var a=new cc.EaseQuinticActionIn;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseQuinticActionIn.create(this._inner.reverse())}}); cc.EaseQuinticActionIn.create=function(a){return new cc.EaseQuinticActionIn(a)};cc._easeQuinticActionIn={easing:cc.EaseQuinticActionIn.prototype._updateTime,reverse:function(){return cc._easeQuinticActionIn}};cc.easeQuinticActionIn=function(){return cc._easeQuinticActionIn}; cc.EaseQuinticActionOut=cc.ActionEase.extend({_updateTime:function(a){a-=1;return a*a*a*a*a+1},update:function(a){this._inner.update(this._updateTime(a))},clone:function(){var a=new cc.EaseQuinticActionOut;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseQuinticActionOut.create(this._inner.reverse())}});cc.EaseQuinticActionOut.create=function(a){return new cc.EaseQuinticActionOut(a)};cc._easeQuinticActionOut={easing:cc.EaseQuinticActionOut.prototype._updateTime,reverse:function(){return cc._easeQuinticActionOut}}; cc.easeQuinticActionOut=function(){return cc._easeQuinticActionOut};cc.EaseQuinticActionInOut=cc.ActionEase.extend({_updateTime:function(a){a*=2;if(1>a)return 0.5*a*a*a*a*a;a-=2;return 0.5*(a*a*a*a*a+2)},update:function(a){this._inner.update(this._updateTime(a))},clone:function(){var a=new cc.EaseQuinticActionInOut;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseQuinticActionInOut.create(this._inner.reverse())}});cc.EaseQuinticActionInOut.create=function(a){return new cc.EaseQuinticActionInOut(a)}; cc._easeQuinticActionInOut={easing:cc.EaseQuinticActionInOut.prototype._updateTime,reverse:function(){return cc._easeQuinticActionInOut}};cc.easeQuinticActionInOut=function(){return cc._easeQuinticActionInOut};cc.EaseCircleActionIn=cc.ActionEase.extend({_updateTime:function(a){return-1*(Math.sqrt(1-a*a)-1)},update:function(a){this._inner.update(this._updateTime(a))},clone:function(){var a=new cc.EaseCircleActionIn;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseCircleActionIn.create(this._inner.reverse())}}); cc.EaseCircleActionIn.create=function(a){return new cc.EaseCircleActionIn(a)};cc._easeCircleActionIn={easing:cc.EaseCircleActionIn.prototype._updateTime,reverse:function(){return cc._easeCircleActionIn}};cc.easeCircleActionIn=function(){return cc._easeCircleActionIn}; cc.EaseCircleActionOut=cc.ActionEase.extend({_updateTime:function(a){a-=1;return Math.sqrt(1-a*a)},update:function(a){this._inner.update(this._updateTime(a))},clone:function(){var a=new cc.EaseCircleActionOut;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseCircleActionOut.create(this._inner.reverse())}});cc.EaseCircleActionOut.create=function(a){return new cc.EaseCircleActionOut(a)};cc._easeCircleActionOut={easing:cc.EaseCircleActionOut.prototype._updateTime,reverse:function(){return cc._easeCircleActionOut}}; cc.easeCircleActionOut=function(){return cc._easeCircleActionOut};cc.EaseCircleActionInOut=cc.ActionEase.extend({_updateTime:function(a){a*=2;if(1>a)return-0.5*(Math.sqrt(1-a*a)-1);a-=2;return 0.5*(Math.sqrt(1-a*a)+1)},update:function(a){this._inner.update(this._updateTime(a))},clone:function(){var a=new cc.EaseCircleActionInOut;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseCircleActionInOut.create(this._inner.reverse())}});cc.EaseCircleActionInOut.create=function(a){return new cc.EaseCircleActionInOut(a)}; cc._easeCircleActionInOut={easing:cc.EaseCircleActionInOut.prototype._updateTime,reverse:function(){return cc._easeCircleActionInOut}};cc.easeCircleActionInOut=function(){return cc._easeCircleActionInOut};cc.EaseCubicActionIn=cc.ActionEase.extend({_updateTime:function(a){return a*a*a},update:function(a){this._inner.update(this._updateTime(a))},clone:function(){var a=new cc.EaseCubicActionIn;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseCubicActionIn.create(this._inner.reverse())}}); cc.EaseCubicActionIn.create=function(a){return new cc.EaseCubicActionIn(a)};cc._easeCubicActionIn={easing:cc.EaseCubicActionIn.prototype._updateTime,reverse:function(){return cc._easeCubicActionIn}};cc.easeCubicActionIn=function(){return cc._easeCubicActionIn}; cc.EaseCubicActionOut=cc.ActionEase.extend({_updateTime:function(a){a-=1;return a*a*a+1},update:function(a){this._inner.update(this._updateTime(a))},clone:function(){var a=new cc.EaseCubicActionOut;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseCubicActionOut.create(this._inner.reverse())}});cc.EaseCubicActionOut.create=function(a){return new cc.EaseCubicActionOut(a)};cc._easeCubicActionOut={easing:cc.EaseCubicActionOut.prototype._updateTime,reverse:function(){return cc._easeCubicActionOut}}; cc.easeCubicActionOut=function(){return cc._easeCubicActionOut};cc.EaseCubicActionInOut=cc.ActionEase.extend({_updateTime:function(a){a*=2;if(1>a)return 0.5*a*a*a;a-=2;return 0.5*(a*a*a+2)},update:function(a){this._inner.update(this._updateTime(a))},clone:function(){var a=new cc.EaseCubicActionInOut;a.initWithAction(this._inner.clone());return a},reverse:function(){return cc.EaseCubicActionInOut.create(this._inner.reverse())}});cc.EaseCubicActionInOut.create=function(a){return new cc.EaseCubicActionInOut(a)}; cc._easeCubicActionInOut={easing:cc.EaseCubicActionInOut.prototype._updateTime,reverse:function(){return cc._easeCubicActionInOut}};cc.easeCubicActionInOut=function(){return cc._easeCubicActionInOut};cc.cardinalSplineAt=function(a,b,c,d,e,f){var g=f*f,h=g*f,k=(1-e)/2;e=k*(-h+2*g-f);var l=k*(-h+g)+(2*h-3*g+1);f=k*(h-2*g+f)+(-2*h+3*g);g=k*(h-g);return cc.p(a.x*e+b.x*l+c.x*f+d.x*g,a.y*e+b.y*l+c.y*f+d.y*g)};cc.reverseControlPoints=function(a){for(var b=[],c=a.length-1;0<=c;c--)b.push(cc.p(a[c].x,a[c].y));return b};cc.copyControlPoints=function(a){for(var b=[],c=0;c