egret页面之间如何传值 this. router 传值addChild(new test);打开test这个组件的时候怎么传一个参数过去

Egret 矢量绘图、遮罩、碰撞检测
时间: 23:29:02
&&&& 阅读:253
&&&& 评论:
&&&& 收藏:0
标签:&&&&&&&&&&&&&&&&&&&&&&&&&&&矢量绘图:
1. 为矢量绘图绘制外边 - graphics.lineStype()
private createGameScene():void
console.log("Runtime start.");
var myShape:egret.Shape = new egret.Shape();
myShape.graphics.lineStyle(10, 0x00ff00, 1);
myShape.graphics.beginFill(0xff0000, 1);
myShape.graphics.drawRect(0,0,100,200);
myShape.graphics.endFill();
this.addChild(myShape);
console.log("Runtime end.");
2. 清空一个显示对象的绘图 - graphics.clear()
3. 绘制圆形 - graphics.drawCircle(0, 0, 50)
4. 画直线:
private createGameScene():void
var myShape:egret.Shape = new egret.Shape();
myShape.graphics.lineStyle(5, 0x00ff00, 1);
myShape.graphics.moveTo(50, 10);
//将画笔移动到起点位置
myShape.graphics.lineTo(100, 20);
//从起点位置划线到终点
myShape.graphics.endFill();
this.addChild(myShape);
5. 贝塞尔曲线:
private createGameScene():void
var myShape:egret.Shape = new egret.Shape();
myShape.graphics.lineStyle(5, 0x00ff00, 1);
myShape.graphics.moveTo(50, 200);
//将画笔移动到起点位置
myShape.graphics.curveTo(150, 50, 250, 200);
//指定起始移动方向的交汇点坐标,与终点坐标后进行画线
myShape.graphics.endFill();
this.addChild(myShape);
6. 绘制圆弧:
private createGameScene():void
var myShape:egret.Shape = new egret.Shape();
myShape.graphics.lineStyle(5, 0x00ff00, 1);
myShape.graphics.beginFill(0x1122cc);
//圆心坐标、半径、起始弧度、终止弧度,填充的区域是圆弧+圆弧两端点的连接所包含的区域
myShape.graphics.drawArc(200,200,100,Math.PI/3, Math.PI);
myShape.graphics.endFill();
this.addChild(myShape);
7. 值得注意的是:graphic 可以用来绘制多个图形,不用一个 graphic 对应一个图形。
1. 矩形遮罩:
private createGameScene():void
var shp: egret.Shape = new egret.Shape();
shp.graphics.beginFill(0xff0000);
shp.graphics.drawRect(0,0,100,100);
shp.graphics.endFill();
this.addChild(shp);
var shp2: egret.Shape = new egret.Shape();
shp2.graphics.beginFill(0x00ff00);
shp2.graphics.drawCircle(0,0,20);
shp2.graphics.endFill();
this.addChild(shp2);
shp2.x = 20;
shp2.y = 20;
var rect: egret.Rectangle = new egret.Rectangle(20,20,30,50);
//参数指定的区域是遮罩不遮挡的区域
shp.mask =
2. 对象遮罩:可以用一个对象当成另一个对象的遮罩
square.mask =
//像这样直接指定即可
private createGameScene():void {
var infoTest = new egret.TextField();
infoTest.y = 200;
infoTest.text = "碰撞结果";
this.addChild(infoTest);
//显示一个文本以展示测试结果
var shp:egret.Shape = new egret.Shape();
shp.graphics.beginFill(0xff0000);
shp.graphics.drawRect(0, 0, 120, 120);
shp.graphics.endFill();
this.addChild(shp);
console.log(shp.width);
//shp 的 width 与 height 与显示对线的内容相关,这里是 120
console.log(shp.height);
var testPoint = new egret.Shape();
testPoint.graphics.beginFill(0x000000);
testPoint.graphics.drawRect(100, 100, 5, 5);
//标记一个黑色的边界点
testPoint.graphics.endFill();
this.addChild(testPoint);
var isHit:boolean = shp.hitTestPoint(110, 110); //结论:是否碰撞与 shp.graphics 相关,而与 shp.width/height 无关
infoTest.text = "碰撞结果" + isH
//就算已经 addchild,可以直接修改文本, 结果是 true
shp.graphics.clear();
//如果不clear, 重新 drawRect 不会生效
shp.graphics.beginFill(0xff0000);
shp.graphics.drawRect(0, 0, 100, 100);
shp.graphics.endFill();
var isHit:boolean = shp.hitTestPoint(110, 110);
infoTest.text = "碰撞结果" + isH
//结果是 false
  值得注意的是,精确坐标的碰撞检测是非常消耗性能的,尽量少用。
&标签:&&&&&&&&&&&&&&&&&&&&&&&&&&&原文:/Daniel-Liang/p/5929334.html
教程昨日排行
&&国之画&&&& &&&&&&
&& &&&&&&&&&&&&&&
鲁ICP备号-4
打开技术之扣,分享程序人生!当前位置:
【教程】Egret中关于绘图API的使用方法与技巧:绘制曲线
发布时间:&&
文章分类:&&
绘制曲线需要一点点技巧,因为曲线的绘制不会像直线这么容易理解。 Egret中提供的曲线绘制是一个二次贝塞尔曲线,绘图方法为 Graphics 中的 curveTo 。 执行绘图时,我们先需要使用 moveTo 指定曲线的起始点,然后使用 curveTo 指定曲线的控制点和终点。下图是一张二次贝塞尔曲线的结构图。我们在 curveTo 中设置的四个参数中,前两个参数是设置图中 P1 点的位置。后两个参数是设置 P2 点的位置。 在程序进行绘图时,起绘制过程如图:我们来看一下具体示例代码:1 class GraphicsTest extends egret.DisplayObjectContainer2 {3
public constructor()4
this.addEventListener(egret.Event.ADDED_TO_STAGE,this.onAddToStage,this);7
private onAddToStage(event:egret.Event)10
var shp:egret.Shape = new egret.Shape();12
shp.graphics.lineStyle( 2, 0x00ff00 );13
shp.graphics.moveTo( 50, 50);14
shp.graphics.curveTo( 100,100, 200,50);15
shp.graphics.endFill();16
this.addChild( shp );17
}18 }编译后运行,效果如图:本文作者:A闪微信扫描二维码关注“html5游戏中心”吧,我们将每日为您提供精彩的内容和好玩的小游戏哦! ————关注html5游戏中心————*如果你喜欢小5请把小5介绍给你的小伙伴也认识吧!*如果你喜欢这个订阅号,请查找html5游戏中心关注*点击右上角,查看公众号-查看历史消息! </p
本文永久链接:/category/other/266160.html
声明:本文转载于网络,由网友提交收录,文章内容为原作者独立观点,不代表本站立场!如需收录/删除,请联系本站小编 QQ:
最新文章:文章推荐:
热门推荐热门文章
本周热门文章推荐
猜你喜欢最新文章/ egretproject
项目语言:HTML
权限:read-only(如需更高权限请先加入项目)
egretproject/
Index: game.min.js
===================================================================
--- game.min.js (revision 0)
+++ game.min.js (revision 45)
@@ -0,0 +1,2 @@
+!function(t){var e=function(t){function e(e,i,r){t.call(this),this._name=e,this._frame=0|i,r&&(this._end=0|r)}__extends(e,t);var i=__define,r=e,s=r.return i(s,&name&,function(){return this._name}),i(s,&frame&,function(){return this._frame}),i(s,&end&,function(){return this._end}),s.clone=function(){return new e(this._name,this._frame,this._end)},e}(t.EventDispatcher);t.FrameLabel=e,t.registerClass(e,&egret.FrameLabel&)}(egret||(egret={}));!function(t){var e=function(e){function i(i){e.call(this),this.$bitmapData=null,this.offsetPoint=t.Point.create(0,0),this.$movieClipData=null,this.frames=null,this.$totalFrames=0,this.frameLabels=null,this.$frameLabelStart=0,this.$frameLabelEnd=0,this.frameEvents=null,this.frameIntervalTime=0,this.$eventPool=null,this.$isPlaying=!1,this.isStopped=!0,this.playTimes=0,this.$currentFrameNum=0,this.$nextFrameNum=0,this.displayedKeyFrameNum=0,this.passedTime=0,this.lastTime=0,this.$smoothing=t.Bitmap.defaultSmoothing,this.$renderRegion=new t.sys.Region,this.setMovieClipData(i)}__extends(i,e);var r=__define,s=i,n=s.return r(n,&smoothing&,function(){return this.$smoothing},function(t){t=!!t,t!=this.$smoothing&&(this.$smoothing=t,this.$invalidate())}),n.$init=function(){this.$reset();var t=this.$movieClipDt&&t.$isDataValid()&&(this.frames=t.frames,this.$totalFrames=t.numFrames,this.frameLabels=t.labels,this.frameEvents=t.events,this.frameIntervalTime=1e3/t.frameRate,this._initFrame())},n.$reset=function(){this.frames=null,this.playTimes=0,this.$isPlaying=!1,this.setIsStopped(!0),this.$currentFrameNum=0,this.$nextFrameNum=1,this.displayedKeyFrameNum=0,this.passedTime=0,this.$eventPool=[]},n._initFrame=function(){this.$movieClipData.$isTextureValid()&&(this.advanceFrame(),this.constructFrame())},n.$render=function(t){var e=this.$bitmapDif(e){t.imageSmoothingEnabled=this.$var i=Math.round(this.offsetPoint.x),r=Math.round(this.offsetPoint.y),s=e._bitmapWidth,n=e._bitmapHeight,o=Math.round(e.$getScaleBitmapWidth()),a=Math.round(e.$getScaleBitmapHeight());t.drawImage(e._bitmapData,e._bitmapX,e._bitmapY,s,n,i,r,o,a)}},n.$measureContentBounds=function(t){var e=this.$bitmapDif(e){var i=this.offsetPoint.x,r=this.offsetPoint.y,s=e.$getTextureWidth(),n=e.$getTextureHeight();t.setTo(i,r,s,n)}else t.setEmpty()},n.$onAddToStage=function(t,i){e.prototype.$onAddToStage.call(this,t,i),this.$isPlaying&&this.$totalFrames&1&&this.setIsStopped(!1)},n.$onRemoveFromStage=function(){e.prototype.$onRemoveFromStage.call(this),this.setIsStopped(!0)},n.getFrameLabelByName=function(t,e){void 0===e&&(e=!1),e&&(t=t.toLowerCase());var i=this.frameLif(i)for(var r=null,s=0;s&i.s++)if(r=i[s],e?r.name.toLowerCase()==t:r.name==t)return null},n.getFrameStartEnd=function(t){var e=this.frameLif(e)for(var i=null,r=0;r&e.r++)if(i=e[r],t==i.name){this.$frameLabelStart=i.frame,this.$frameLabelEnd=i.break}},n.getFrameLabelByFrame=function(t){var e=this.frameLif(e)for(var i=null,r=0;r&e.r++)if(i=e[r],i.frame==t)return null},n.getFrameLabelForFrame=function(t){var e=null,i=null,r=this.frameLif(r)for(var s=0;s&r.s++){if(i=r[s],i.frame&t)e=i}return e},n.play=function(t){void 0===t&&(t=0),this.$isPlaying=!0,this.setPlayTimes(t),this.$totalFrames&1&&this.$stage&&this.setIsStopped(!1)},n.stop=function(){this.$isPlaying=!1,this.setIsStopped(!0)},n.prevFrame=function(){this.gotoAndStop(this.$currentFrameNum-1)},n.nextFrame=function(){this.gotoAndStop(this.$currentFrameNum+1)},n.gotoAndPlay=function(e,i){void 0===i&&(i=0),(0==arguments.length||arguments.length&2)&&t.$error(1022,&MovieClip.gotoAndPlay()&),&string&==typeof e?this.getFrameStartEnd(e):(this.$frameLabelStart=0,this.$frameLabelEnd=0),this.play(i),this.gotoFrame(e)},n.gotoAndStop=function(e){1!=arguments.length&&t.$error(1022,&MovieClip.gotoAndStop()&),this.stop(),this.gotoFrame(e)},n.gotoFrame=function(e){&string&==typeof e?i=this.getFrameLabelByName(e).frame:(i=parseInt(e+&&,10),i!=e&&t.$error(1022,&Frame Label Not Found&)),1&i?i=1:i&this.$totalFrames&&(i=this.$totalFrames),i!=this.$nextFrameNum&&(this.$nextFrameNum=i,this.advanceFrame(),this.constructFrame(),this.handlePendingEvent())},n.advanceTime=function(e){var i=this,r=e-i.lastTi.lastTime=e;var s=i.frameIntervalTime,n=i.passedTime+r;i.passedTime=n%s;var o=n/s;if(1&o)return!1;for(o&=1;){if(o--,i.$nextFrameNum++,a=this.frameEvents[i.$nextFrameNum],a&&&&!=a&&t.MovieClipEvent.dispatchMovieClipEvent(i,t.MovieClipEvent.FRAME_LABEL,a),i.$nextFrameNum&i.$totalFrames||i.$frameLabelStart&0&&i.$nextFrameNum&i.$frameLabelEnd)if(-1==i.playTimes)i.$eventPool.push(t.Event.LOOP_COMPLETE),i.$nextFrameNum=1;else{if(i.playTimes--,!(i.playTimes&0)){i.$nextFrameNum=i.$totalFrames,i.$eventPool.push(PLETE),i.stop();break}i.$eventPool.push(t.Event.LOOP_COMPLETE),i.$nextFrameNum=1}i.$currentFrameNum==i.$frameLabelEnd&&(i.$nextFrameNum=i.$frameLabelStart),i.advanceFrame()}return i.constructFrame(),i.handlePendingEvent(),!1},n.advanceFrame=function(){this.$currentFrameNum=this.$nextFrameNum},n.constructFrame=function(){var t=this.$currentFrameNthis.displayedKeyFrameNum!=t&&(this.$bitmapData=this.$movieClipData.getTextureByFrame(t),this.$movieClipData.$getOffsetByFrame(t,this.offsetPoint),this.$invalidateContentBounds(),this.displayedKeyFrameNum=t)},n.handlePendingEvent=function(){if(0!=this.$eventPool.length){this.$eventPool.reverse();for(var e=this.$eventPool,i=e.length,r=!1,s=!1,n=0;i&n;n++){var o=e.pop();o==t.Event.LOOP_COMPLETE?s=!0:o==PLETE?r=!0:this.dispatchEventWith(o)}s&&this.dispatchEventWith(t.Event.LOOP_COMPLETE),r&&this.dispatchEventWith(PLETE)}},r(n,&totalFrames&,function(){return this.$totalFrames}),r(n,&currentFrame&,function(){return this.$currentFrameNum}),r(n,&currentFrameLabel&,function(){var t=this.getFrameLabelByFrame(this.$currentFrameNum);return t&&t.name}),r(n,&currentLabel&,function(){var t=this.getFrameLabelForFrame(this.$currentFrameNum);return t?t.name:null}),r(n,&frameRate&,function(){return this.$movieClipData.frameRate},function(t){t!=this.$movieClipData.frameRate&&(this.$movieClipData.frameRate=t,this.frameIntervalTime=1e3/this.$movieClipData.frameRate)}),r(n,&isPlaying&,function(){return this.$isPlaying}),r(n,&movieClipData&,function(){return this.$movieClipData},function(t){this.setMovieClipData(t)}),n.setMovieClipData=function(t){this.$movieClipData!=t&&(this.$movieClipData=t,this.$init())},n.setPlayTimes=function(t){(0&t||t&=1)&&(this.playTimes=0&t?-1:Math.floor(t))},n.setIsStopped=function(e){this.isStopped!=e&&(this.isStopped=e,e?(this.playTimes=0,t.sys.$ticker.$stopTick(this.advanceTime,this)):(this.playTimes=0==this.playTimes?1:this.playTimes,this.lastTime=t.getTimer(),t.sys.$ticker.$startTick(this.advanceTime,this)))},i}(t.DisplayObject);t.MovieClip=e,t.registerClass(e,&egret.MovieClip&)}(egret||(egret={}));!function(t){var e=function(e){function i(){e.call(this),this.$mcData=null,this.numFrames=1,this.frames=[],this.labels=null,this.events=[],this.frameRate=0,this.textureData=null,this.spriteSheet=null}__extends(i,e);var r=__define,s=i,n=s.return n.$init=function(t,e,i){this.textureData=e,this.spriteSheet=i,this.setMCData(t)},n.getKeyFrameData=function(t){var e=this.frames[t-1];return e.frame&&(e=this.frames[e.frame-1]),e},n.getTextureByFrame=function(t){var e=this.getKeyFrameData(t);if(e.res){var i=this.getTextureByResName(e.res);return i}return null},n.$getOffsetByFrame=function(t,e){var i=this.getKeyFrameData(t);i.res&&e.setTo(0|i.x,0|i.y)},n.getTextureByResName=function(t){var e=this.spriteSheet.getTexture(t);if(!e){var i=this.textureData[t];e=this.spriteSheet.createTexture(t,i.x,i.y,i.w,i.h)}return e},n.$isDataValid=function(){return this.frames.length&0},n.$isTextureValid=function(){return null!=this.textureData&&null!=this.spriteSheet},n.$fillMCData=function(t){this.frameRate=t.frameRate||24,this.fillFramesData(t.frames),this.fillFrameLabelsData(t.labels),this.fillFrameEventsData(t.events)},n.fillFramesData=function(t){for(var e,i=this.frames,r=t?t.length:0,s=0;r&s;s++){var n=t[s];if(i.push(n),n.duration){var o=parseInt(n.duration);if(o&1){e=i.for(var a=1;o&a;a++)i.push({frame:e})}}}this.numFrames=i.length},n.fillFrameLabelsData=function(e){if(e){var i=e.if(i&0){this.labels=[];for(var r=0;i&r;r++){var s=e[r];this.labels.push(new t.FrameLabel(s.name,s.frame,s.end))}}}},n.fillFrameEventsData=function(t){if(t){var e=t.if(e&0){this.events=[];for(var i=0;e&i;i++){var r=t[i];this.events[r.frame]=r.name}}}},r(n,&mcData&,function(){return this.$mcData},function(t){this.setMCData(t)}),n.setMCData=function(t){this.$mcData!=t&&(this.$mcData=t,t&&this.$fillMCData(t))},i}(t.HashObject);t.MovieClipData=e,t.registerClass(e,&egret.MovieClipData&)}(egret||(egret={}));!function(t){var e=function(e){function i(t,i){e.call(this),this.enableCache=!0,this.$mcDataCache={},this.$mcDataSet=t,this.setTexture(i)}__extends(i,e);var r=__define,s=i,n=s.return n.clearCache=function(){this.$mcDataCache={}},n.generateMovieClipData=function(e){if(void 0===e&&(e=&&),&&==e&&this.$mcDataSet)for(e in this.$mcDataSet.mc)if(&&==e)var i=this.findFromCache(e,this.$mcDataCache);return i||(i=new t.MovieClipData,this.fillData(e,i,this.$mcDataCache)),i},n.findFromCache=function(t,e){return this.enableCache&&e[t]?e[t]:null},n.fillData=function(t,e,i){if(this.$mcDataSet){var r=this.$mcDataSet.mc[t];r&&(e.$init(r,this.$mcDataSet.res,this.$spriteSheet),this.enableCache&&(i[t]=e))}},r(n,&mcDataSet&,function(){return this.$mcDataSet},function(t){this.$mcDataSet=t}),r(n,&texture&,void 0,function(t){this.setTexture(t)}),r(n,&spriteSheet&,function(){return this.$spriteSheet}),n.setTexture=function(e){this.$spriteSheet=e?new t.SpriteSheet(e):null},i}(t.EventDispatcher);t.MovieClipDataFactory=e,t.registerClass(e,&egret.MovieClipDataFactory&)}(egret||(egret={}));!function(t){var e=function(e){function i(t,i,r,s){void 0===i&&(i=!1),void 0===r&&(r=!1),void 0===s&&(s=null),e.call(this,t,i,r),this.frameLabel=null,this.frameLabel=s}__extends(i,e);var r=(__define,i);r.return i.dispatchMovieClipEvent=function(e,r,s){void 0===s&&(s=null);var n=t.Event.create(i,r);n.frameLabel=s;var o=e.dispatchEvent(n);return t.Event.release(n),o},i.FRAME_LABEL=&frame_label&,i}(t.Event);t.MovieClipEvent=e,t.registerClass(e,&egret.MovieClipEvent&)}(egret||(egret={}));!function(t){var e=function(){function e(){t.$error(1014)}var i=(__define,e);i.return e.get=function(t){return-1&t&&(t=-1),t&1&&(t=1),function(e){return 0==t?e:0&t?e*(e*-t+1+t):e*((2-e)*t+(1-t))}},e.getPowOut=function(t){return function(e){return 1-Math.pow(1-e,t)}},e.quintOut=e.getPowOut(5),e.quartOut=e.getPowOut(4),e}();t.ScrollEase=e,t.registerClass(e,&egret.ScrollEase&);var i=function(e){function i(t,i,r){e.call(this),this._target=null,this._useTicks=!1,this.ignoreGlobalPause=!1,this.loop=!1,this.pluginData=null,this._steps=null,this._actions=null,this.paused=!1,this.duration=0,this._prevPos=-1,this.position=null,this._prevPosition=0,this._stepPosition=0,this.passive=!1,this.initialize(t,i,r)}__extends(i,e);var r=(__define,i),s=r.return i.get=function(t,e,r,s){return void 0===e&&(e=null),void 0===r&&(r=null),void 0===s&&(s=!1),s&&i.removeTweens(t),new i(t,e,r)},i.removeTweens=function(t){if(t.tween_count){for(var e=i._tweens,r=e.length-1;r&=0;r--)e[r]._target==t&&(e[r].paused=!0,e.splice(r,1));t.tween_count=0}},i.tick=function(t,e){void 0===e&&(e=!1);var r=t-i._lastTi._lastTime=t;for(var s=i._tweens.concat(),n=s.length-1;n&=0;n--){var o=s[n];e&&!o.ignoreGlobalPause||o.paused||o.tick(o._useTicks?1:r)}return!1},i._register=function(e,r){var s=e._target,n=i._if(r)s&&(s.tween_count=s.tween_count&0?s.tween_count+1:1),n.push(e),i._inited||(i._lastTime=t.getTimer(),t.sys.$ticker.$startTick(i.tick,null),i._inited=!0);else{s&&s.tween_count--;for(var o=n.o--;)if(n[o]==e)return void n.splice(o,1)}},s.initialize=function(t,e,r){this._target=t,e&&(this._useTicks=e.useTicks,this.ignoreGlobalPause=e.ignoreGlobalPause,this.loop=e.loop,e.onChange&&this.addEventListener(&change&,e.onChange,e.onChangeObj),e.override&&i.removeTweens(t)),this.pluginData=r||{},this._curQueueProps={},this._initQueueProps={},this._steps=[],this._actions=[],e&&e.paused?this.paused=!0:i._register(this,!0),e&&null!=e.position&&this.setPosition(e.position)},s.setPosition=function(t,e){void 0===e&&(e=1),0&t&&(t=0);var i=t,r=!1;if(i&=this.duration&&(this.loop?i%=this.duration:(i=this.duration,r=!0)),i==this._prevPos)var s=this._prevPif(this.position=this._prevPos=i,this._prevPosition=t,this._target)if(r)this._updateTargetProps(null,1);else if(this._steps.length&0){for(var n=0,o=this._steps.o&n&&!(this._steps[n].t&i);n++);var a=this._steps[n-1];this._updateTargetProps(a,(this._stepPosition=i-a.t)/a.d)}return r&&this.setPaused(!0),0!=e&&this._actions.length&0&&(this._useTicks?this._runActions(i,i):1==e&&s&i?(s!=this.duration&&this._runActions(s,this.duration),this._runActions(0,i,!0)):this._runActions(s,i)),this.dispatchEventWith(&change&),r},s._runActions=function(t,e,i){void 0===i&&(i=!1);var r=t,s=e,n=-1,o=this._actions.length,a=1;for(t&e&&(r=e,s=t,n=o,o=a=-1);(n+=a)!=o;){var h=this._actions[n],l=h.t;(l==s||l&r&&s&l||i&&l==t)&&h.f.apply(h.o,h.p)}},s._updateTargetProps=function(t,e){var r,s,n,o,a,h;if(t||1!=e){if(this.passive=!!t.v,this.passive)t.e&&(e=t.e(e,0,1,1)),r=t.p0,s=t.p1}else this.passive=!1,r=s=this._curQueuePfor(var l in this._initQueueProps){null==(o=r[l])&&(r[l]=o=this._initQueueProps[l]),null==(a=s[l])&&(s[l]=a=o),n=o==a||0==e||1==e||&number&!=typeof o?1==e?a:o:o+(a-o)*e;var c=!1;if(h=i._plugins[l])for(var u=0,_=h._&u;u++){var p=h[u].tween(this,l,n,r,s,e,!!t&&r==s,!t);p==i.IGNORE?c=!0:n=p}c||(this._target[l]=n)}},s.setPaused=function(t){return this.paused=t,i._register(this,!t),this},s._cloneProps=function(t){var e={};for(var i in t)e[i]=t[i];return e},s._addStep=function(t){return t.d&0&&(this._steps.push(t),t.t=this.duration,this.duration+=t.d),this},s._appendQueueProps=function(t){var e,r,s,n,o;for(var a in t)if(void 0===this._initQueueProps[a]){if(r=this._target[a],e=i._plugins[a])for(s=0,n=e.n&s;s++)r=e[s].init(this,a,r);this._initQueueProps[a]=this._curQueueProps[a]=void 0===r?null:r}else r=this._curQueueProps[a];for(var a in t){if(r=this._curQueueProps[a],e=i._plugins[a])for(o=o||{},s=0,n=e.n&s;s++)e[s].step&&e[s].step(this,a,r,t[a],o);this._curQueueProps[a]=t[a]}return o&&this._appendQueueProps(o),this._curQueueProps},s._addAction=function(t){return t.t=this.duration,this._actions.push(t),this},s.to=function(t,e,i){return void 0===i&&(i=void 0),(isNaN(e)||0&e)&&(e=0),this._addStep({d:e||0,p0:this._cloneProps(this._curQueueProps),e:i,p1:this._cloneProps(this._appendQueueProps(t))})},s.call=function(t,e,i){return void 0===e&&(e=void 0),void 0===i&&(i=void 0),this._addAction({f:t,p:i?i:[],o:e?e:this._target})},s.tick=function(t){this.paused||this.setPosition(this._prevPosition+t)},i._tweens=[],i.IGNORE={},i._plugins={},i._inited=!1,i._lastTime=0,i}(t.EventDispatcher);t.ScrollTween=i,t.registerClass(i,&egret.ScrollTween&)}(egret||(egret={}));!function(t){var e=function(e){function i(i){void 0===i&&(i=null),e.call(this),this.scrollBeginThreshold=10,this.scrollSpeed=1,this._content=null,this.delayTouchBeginEvent=null,this.touchBeginTimer=null,this.touchEnabled=!0,this._ScrV_Props_=new t.ScrollViewProperties,i&&this.setContent(i)}__extends(i,e);var r=__define,s=i,n=s.return r(n,&bounces&,function(){return this._ScrV_Props_._bounces},function(t){this._ScrV_Props_._bounces=!!t}),n.setContent=function(t){this._content!==t&&(this.removeContent(),t&&(this._content=t,e.prototype.addChild.call(this,t),this._addEvents()))},n.removeContent=function(){this._content&&(this._removeEvents(),e.prototype.removeChildAt.call(this,0)),this._content=null},r(n,&verticalScrollPolicy&,function(){return this._ScrV_Props_._verticalScrollPolicy},function(t){t!=this._ScrV_Props_._verticalScrollPolicy&&(this._ScrV_Props_._verticalScrollPolicy=t)}),r(n,&horizontalScrollPolicy&,function(){return this._ScrV_Props_._horizontalScrollPolicy},function(t){t!=this._ScrV_Props_._horizontalScrollPolicy&&(this._ScrV_Props_._horizontalScrollPolicy=t)}),r(n,&scrollLeft&,function(){return this._ScrV_Props_._scrollLeft},function(t){t!=this._ScrV_Props_._scrollLeft&&(this._ScrV_Props_._scrollLeft=t,this._validatePosition(!1,!0),this._updateContentPosition())}),r(n,&scrollTop&,function(){return this._ScrV_Props_._scrollTop},function(t){t!=this._ScrV_Props_._scrollTop&&(this._ScrV_Props_._scrollTop=t,this._validatePosition(!0,!1),this._updateContentPosition())}),n.setScrollPosition=function(t,e,i){if(void 0===i&&(i=!1),(!i||0!=t||0!=e)&&(i||this._ScrV_Props_._scrollTop!=t||this._ScrV_Props_._scrollLeft!=e)){var r=this._ScrV_Props_._scrollTop,s=this._ScrV_Props_._scrollLif(i){var n=this.getMaxScrollLeft(),o=this.getMaxScrollTop();(0&=r||r&=o)&&(t/=2),(0&=s||s&=n)&&(e/=2);var a=r+t,h=s+e,l=this._ScrV_Props_._l||((0&=a||a&=o)&&(a=Math.max(0,Math.min(a,o))),(0&=h||h&=n)&&(h=Math.max(0,Math.min(h,n)))),this._ScrV_Props_._scrollTop=a,this._ScrV_Props_._scrollLeft=h}else this._ScrV_Props_._scrollTop=t,this._ScrV_Props_._scrollLeft=e;this._validatePosition(!0,!0),this._updateContentPosition()}},n._validatePosition=function(t,e){if(void 0===t&&(t=!1),void 0===e&&(e=!1),t){var i=this.height,r=this._getContentHeight();this._ScrV_Props_._scrollTop=Math.max(this._ScrV_Props_._scrollTop,(0-i)/2),this._ScrV_Props_._scrollTop=Math.min(this._ScrV_Props_._scrollTop,r&i?r-i/2:i/2)}if(e){var s=this.width,n=this._getContentWidth();this._ScrV_Props_._scrollLeft=Math.max(this._ScrV_Props_._scrollLeft,(0-s)/2),this._ScrV_Props_._scrollLeft=Math.min(this._ScrV_Props_._scrollLeft,n&s?n-s/2:s/2)}},n.$setWidth=function(t){if(this.$getExplicitWidth()==t)return!1;var i=e.prototype.$setWidth.call(this,t);return this._updateContentPosition(),i},n.$setHeight=function(t){if(this.$getExplicitHeight()==t)return!1;e.prototype.$setHeight.call(this,t);return this._updateContentPosition(),!0},n._updateContentPosition=function(){var e=this.height,i=this.this.scrollRect=new t.Rectangle(Math.round(this._ScrV_Props_._scrollLeft),Math.round(this._ScrV_Props_._scrollTop),i,e),this.dispatchEvent(new t.Event(t.Event.CHANGE))},n._checkScrollPolicy=function(){var t=this._ScrV_Props_._horizontalScrollPolicy,e=this.__checkScrollPolicy(t,this._getContentWidth(),this.width);this._ScrV_Props_._hCanScroll=e;var i=this._ScrV_Props_._verticalScrollPolicy,r=this.__checkScrollPolicy(i,this._getContentHeight(),this.height);return this._ScrV_Props_._vCanScroll=r,e||r},n.__checkScrollPolicy=function(t,e,i){return&on&==t?!0:&off&==t?!1:e&i},n._addEvents=function(){this.addEventListener(t.TouchEvent.TOUCH_BEGIN,this._onTouchBegin,this),this.addEventListener(t.TouchEvent.TOUCH_BEGIN,this._onTouchBeginCapture,this,!0),this.addEventListener(t.TouchEvent.TOUCH_END,this._onTouchEndCapture,this,!0)},n._removeEvents=function(){this.removeEventListener(t.TouchEvent.TOUCH_BEGIN,this._onTouchBegin,this),this.removeEventListener(t.TouchEvent.TOUCH_BEGIN,this._onTouchBeginCapture,this,!0),this.removeEventListener(t.TouchEvent.TOUCH_END,this._onTouchEndCapture,this,!0)},n._onTouchBegin=function(e){if(!e.$isDefaultPrevented){var i=this._checkScrollPolicy();i&&(this._ScrV_Props_._touchStartPosition.x=e.stageX,this._ScrV_Props_._touchStartPosition.y=e.stageY,(this._ScrV_Props_._isHTweenPlaying||this._ScrV_Props_._isVTweenPlaying)&&this._onScrollFinished(),this._tempStage=this.stage,this._tempStage.addEventListener(t.TouchEvent.TOUCH_MOVE,this._onTouchMove,this),this._tempStage.addEventListener(t.TouchEvent.TOUCH_END,this._onTouchEnd,this),this._tempStage.addEventListener(t.TouchEvent.LEAVE_STAGE,this._onTouchEnd,this),this.addEventListener(t.Event.ENTER_FRAME,this._onEnterFrame,this),this._logTouchEvent(e),e.preventDefault())}},n._onTouchBeginCapture=function(e){var i=this._checkScrollPolicy();if(i){for(var r=e.r!=){if(&_checkScrollPolicy&in r&&(i=r._checkScrollPolicy()))r=r.parent}e.stopPropagation();var s=this.cloneTouchEvent(e);this.delayTouchBeginEvent=s,this.touchBeginTimer||(this.touchBeginTimer=new t.Timer(100,1),this.touchBeginTimer.addEventListener(t.TimerEvent.TIMER_COMPLETE,this._onTouchBeginTimer,this)),this.touchBeginTimer.start(),this._onTouchBegin(e)}},n._onTouchEndCapture=function(e){var i=if(this.delayTouchBeginEvent){this._onTouchBeginTimer(),e.stopPropagation();var r=this.cloneTouchEvent(e);t.callLater(function(){i.stage&&i.dispatchPropagationEvent(r)},this)}},n._onTouchBeginTimer=function(){this.touchBeginTimer.stop();var t=this.delayTouchBeginEthis.delayTouchBeginEvent=null,this.stage&&this.dispatchPropagationEvent(t)},n.dispatchPropagationEvent=function(e){for(var i=e.$target,r=this.$getPropagationList(i),s=r.length,n=.5*r.length,o=-1,a=0;s&a;a++)if(r[a]===this._content){o=a;break}r.splice(0,o+1),n-=o+1,this.$dispatchPropagationEvent(e,r,n),t.Event.release(e)},n._onTouchMove=function(t){if(this._ScrV_Props_._lastTouchPosition.x!=t.stageX||this._ScrV_Props_._lastTouchPosition.y!=t.stageY){if(!this._ScrV_Props_._scrollStarted){var e=t.stageX-this._ScrV_Props_._touchStartPosition.x,i=t.stageY-this._ScrV_Props_._touchStartPosition.y,r=Math.sqrt(e*e+i*i);if(r&this.scrollBeginThreshold)return void this._logTouchEvent(t)}this._ScrV_Props_._scrollStarted=!0,this.delayTouchBeginEvent&&(this.delayTouchBeginEvent=null,this.touchBeginTimer.stop()),this.touchChildren=!1;var s=this._getPointChange(t);this.setScrollPosition(s.y,s.x,!0),this._calcVelocitys(t),this._logTouchEvent(t)}},n._onTouchEnd=function(e){this.touchChildren=!0,this._ScrV_Props_._scrollStarted=!1,this._tempStage.removeEventListener(t.TouchEvent.TOUCH_MOVE,this._onTouchMove,this),this._tempStage.removeEventListener(t.TouchEvent.TOUCH_END,this._onTouchEnd,this),this._tempStage.removeEventListener(t.TouchEvent.LEAVE_STAGE,this._onTouchEnd,this),this.removeEventListener(t.Event.ENTER_FRAME,this._onEnterFrame,this),this._moveAfterTouchEnd()},n._onEnterFrame=function(e){var i=t.getTimer();i-this._ScrV_Props_._lastTouchTime&100&&i-this._ScrV_Props_._lastTouchTime&300&&this._calcVelocitys(this._ScrV_Props_._lastTouchEvent)},n._logTouchEvent=function(e){this._ScrV_Props_._lastTouchPosition.x=e.stageX,this._ScrV_Props_._lastTouchPosition.y=e.stageY,this._ScrV_Props_._lastTouchEvent=this.cloneTouchEvent(e),this._ScrV_Props_._lastTouchTime=t.getTimer()},n._getPointChange=function(t){return{x:this._ScrV_Props_._hCanScroll===!1?0:this._ScrV_Props_._lastTouchPosition.x-t.stageX,y:this._ScrV_Props_._vCanScroll===!1?0:this._ScrV_Props_._lastTouchPosition.y-t.stageY}},n._calcVelocitys=function(e){var i=t.getTimer();if(0==this._ScrV_Props_._lastTouchTime)return void(this._ScrV_Props_._lastTouchTime=i);var r=this._getPointChange(e),s=i-this._ScrV_Props_._lastTouchTr.x/=s,r.y/=s,this._ScrV_Props_._velocitys.push(r),this._ScrV_Props_._velocitys.length&5&&this._ScrV_Props_._velocitys.shift(),this._ScrV_Props_._lastTouchPosition.x=e.stageX,this._ScrV_Props_._lastTouchPosition.y=e.stageY},n._getContentWidth=function(){return this._content.$getExplicitWidth()||this._content.width},n._getContentHeight=function(){return this._content.$getExplicitHeight()||this._content.height},n.getMaxScrollLeft=function(){var t=this._getContentWidth()-this.return Math.max(0,t)},n.getMaxScrollTop=function(){var t=this._getContentHeight()-this.return Math.max(0,t)},n._moveAfterTouchEnd=function(){if(0!=this._ScrV_Props_._velocitys.length){for(var t={x:0,y:0},e=0,r=0;r&this._ScrV_Props_._velocitys.r++){var s=this._ScrV_Props_._velocitys[r],n=i.weight[r];t.x+=s.x*n,t.y+=s.y*n,e+=n}this._ScrV_Props_._velocitys.length=0,this.scrollSpeed&=0&&(this.scrollSpeed=1);var o=t.x/e*this.scrollSpeed,a=t.y/e*this.scrollSpeed,h=Math.abs(o),l=Math.abs(a),c=this.getMaxScrollLeft(),u=this.getMaxScrollTop(),_=h&.02?this.getAnimationDatas(o,this._ScrV_Props_._scrollLeft,c):{position:this._ScrV_Props_._scrollLeft,duration:1},p=l&.02?this.getAnimationDatas(a,this._ScrV_Props_._scrollTop,u):{position:this._ScrV_Props_._scrollTop,duration:1};this.setScrollLeft(_.position,_.duration),this.setScrollTop(p.position,p.duration)}},n.onTweenFinished=function(t){t==this._ScrV_Props_._vScrollTween&&(this._ScrV_Props_._isVTweenPlaying=!1),t==this._ScrV_Props_._hScrollTween&&(this._ScrV_Props_._isHTweenPlaying=!1),0==this._ScrV_Props_._isHTweenPlaying&&0==this._ScrV_Props_._isVTweenPlaying&&this._onScrollFinished()},n._onScrollStarted=function(){},n._onScrollFinished=function(){t.ScrollTween.removeTweens(this),this._ScrV_Props_._hScrollTween=null,this._ScrV_Props_._vScrollTween=null,this._ScrV_Props_._isHTweenPlaying=!1,this._ScrV_Props_._isVTweenPlaying=!1,this.dispatchEvent(new t.Event(PLETE))},n.setScrollTop=function(e,i){void 0===i&&(i=0);var r=Math.min(this.getMaxScrollTop(),Math.max(e,0));if(0==i)return void(this.scrollTop=r);0==this._ScrV_Props_._bounces&&(e=r);var s=t.ScrollTween.get(this).to({scrollTop:e},i,t.ScrollEase.quartOut);r!=e&&s.to({scrollTop:r},300,t.ScrollEase.quintOut),this._ScrV_Props_._isVTweenPlaying=!0,this._ScrV_Props_._vScrollTween=s,s.call(this.onTweenFinished,this,[s]),this._ScrV_Props_._isHTweenPlaying||this._onScrollStarted()},n.setScrollLeft=function(e,i){void 0===i&&(i=0);var r=Math.min(this.getMaxScrollLeft(),Math.max(e,0));if(0==i)return void(this.scrollLeft=r);0==this._ScrV_Props_._bounces&&(e=r);var s=t.ScrollTween.get(this).to({scrollLeft:e},i,t.ScrollEase.quartOut);r!=e&&s.to({scrollLeft:r},300,t.ScrollEase.quintOut),this._ScrV_Props_._isHTweenPlaying=!0,this._ScrV_Props_._hScrollTween=s,s.call(this.onTweenFinished,this,[s]),this._ScrV_Props_._isVTweenPlaying||this._onScrollStarted()},n.getAnimationDatas=function(t,e,i){var r=Math.abs(t),s=.95,n=0,o=.998,a=.02,h=e+500*t;if(0&h||h&i)for(h=e;Math.abs(t)!=1/0&&Math.abs(t)&a;)h+=t,t*=0&h||h&i?o*s:o,n++;else n=500*-Math.log(a/r);var l={position:Math.min(i+50,Math.max(h,-50)),duration:n};return l},n.cloneTouchEvent=function(e){var i=new t.TouchEvent(e.type,e.bubbles,e.cancelable);return i.touchPointID=e.touchPointID,i.$stageX=e.stageX,i.$stageY=e.stageY,i.touchDown=e.touchDown,i.$isDefaultPrevented=!1,i.$target=e.target,i},n.throwNotSupportedError=function(){t.$error(1023)},n.addChild=function(t){return this.throwNotSupportedError(),null},n.addChildAt=function(t,e){return this.throwNotSupportedError(),null},n.removeChild=function(t){return this.throwNotSupportedError(),null},n.removeChildAt=function(t){return this.throwNotSupportedError(),null},n.setChildIndex=function(t,e){this.throwNotSupportedError()},n.swapChildren=function(t,e){this.throwNotSupportedError()},n.swapChildrenAt=function(t,e){this.throwNotSupportedError()},i.weight=[1,1.33,1.66,2,2.33],i}(t.DisplayObjectContainer);t.ScrollView=e,t.registerClass(e,&egret.ScrollView&)}(egret||(egret={}));!function(t){var e=function(){function e(){this._verticalScrollPolicy=&auto&,this._horizontalScrollPolicy=&auto&,this._scrollLeft=0,this._scrollTop=0,this._hCanScroll=!1,this._vCanScroll=!1,this._lastTouchPosition=new t.Point(0,0),this._touchStartPosition=new t.Point(0,0),this._scrollStarted=!1,this._lastTouchTime=0,this._lastTouchEvent=null,this._velocitys=[],this._isHTweenPlaying=!1,this._isVTweenPlaying=!1,this._hScrollTween=null,this._vScrollTween=null,this._bounces=!0}var i=(__define,e);i.return e}();t.ScrollViewProperties=e,t.registerClass(e,&egret.ScrollViewProperties&)}(egret||(egret={}));!function(t){function e(e){var i=e.return-1==i.indexOf(&?&)&&e.method==t.URLRequestMethod.GET&&e.data&&e.data instanceof t.URLVariables&&(i=i+&?&+e.data.toString()),i}t.$getUrl=e}(egret||(egret={}));!function(t){var e=function(e){function i(i){void 0===i&&(i=null),e.call(this),this.dataFormat=t.URLLoaderDataFormat.TEXT,this.data=null,this._request=null,this._status=-1,i&&this.load(i)}__extends(i,e);var r=(__define,i),s=r.return s.load=function(e){this._request=e,this.data=null,t.NetContext.getNetContext().proceed(this)},s.__recycle=function(){this._request=null,this.data=null},i}(t.EventDispatcher);t.URLLoader=e,t.registerClass(e,&egret.URLLoader&)}(egret||(egret={}));!function(t){var e=function(){function t(){}var e=(__define,t);e.return t.BINARY=&binary&,t.TEXT=&text&,t.VARIABLES=&variables&,t.TEXTURE=&texture&,t.SOUND=&sound&,t}();t.URLLoaderDataFormat=e,t.registerClass(e,&egret.URLLoaderDataFormat&)}(egret||(egret={}));!function(t){var e=function(e){function i(i){void 0===i&&(i=null),e.call(this),this.data=null,this.method=t.URLRequestMethod.GET,this.url=&&,this.requestHeaders=[],this.url=i}__extends(i,e);var r=(__define,i);r.return i}(t.HashObject);t.URLRequest=e,t.registerClass(e,&egret.URLRequest&)}(egret||(egret={}));!function(t){var e=function(){function t(t,e){this.name=&&,this.value=&&,this.name=t,this.value=e}var e=(__define,t);e.return t}();t.URLRequestHeader=e,t.registerClass(e,&egret.URLRequestHeader&)}(egret||(egret={}));!function(t){var e=function(){function t(){}var e=(__define,t);e.return t.GET=&get&,t.POST=&post&,t}();t.URLRequestMethod=e,t.registerClass(e,&egret.URLRequestMethod&)}(egret||(egret={}));!function(t){var e=function(t){function e(e){void 0===e&&(e=null),t.call(this),this.variables=null,null!==e&&this.decode(e)}__extends(e,t);var i=(__define,e),r=i.return r.decode=function(t){this.variables||(this.variables={}),t=t.split(&+&).join(& &);for(var e,i=/[?&]?([^=]+)=([^&]*)/g;e=i.exec(t);){var r=decodeURIComponent(e[1]),s=decodeURIComponent(e[2]);if(r in this.variables!=0){var n=this.variables[r];n instanceof Array?n.push(s):this.variables[r]=[n,s]}else this.variables[r]=s}},r.toString=function(){if(!this.variables)return&&;var t=this.variables,e=[];for(var i in t)e.push(this.encodeValue(i,t[i]));return e.join(&&&)},r.encodeValue=function(t,e){return e instanceof Array?this.encodeArray(t,e):encodeURIComponent(t)+&=&+encodeURIComponent(e)},r.encodeArray=function(t,e){return t?0==e.length?encodeURIComponent(t)+&=&:e.map(function(e){return encodeURIComponent(t)+&=&+encodeURIComponent(e)}).join(&&&):&&},e}(t.HashObject);t.URLVariables=e,t.registerClass(e,&egret.URLVariables&)}(egret||(egret={}));!function(t){var e=function(e){function i(){e.call(this),this._timeScale=1,this._paused=!1,this._callIndex=-1,this._lastTime=0,this.callBackList=[],null!=i.instance,t.sys.$ticker.$startTick(this.update,this),this._lastTime=t.getTimer()}__extends(i,e);var r=(__define,i),s=r.return s.update=function(t){var e=t-this._lastTif(this._lastTime=t,this._paused)return!1;var i=e*this._timeSfor(this._callList=this.callBackList.concat(),this._callIndex=0;this._callIndex&this._callList.this._callIndex++){var r=this._callList[this._callIndex];r.listener.call(r.thisObject,i)}return this._callIndex=-1,this._callList=null,!1},s.register=function(t,e,i){void 0===i&&(i=0),this.$insertEventBin(this.callBackList,&&,t,e,!1,i,!1)},s.unregister=function(t,e){this.$removeEventBin(this.callBackList,t,e)},s.setTimeScale=function(t){this._timeScale=t},s.getTimeScale=function(){return this._timeScale},s.pause=function(){this._paused=!0},s.resume=function(){this._paused=!1},i.getInstance=function(){return null==i.instance&&(i.instance=new i),i.instance},i}(t.EventDispatcher);t.Ticker=e,t.registerClass(e,&egret.Ticker&)}(egret||(egret={}));!function(t){var e=function(e){function i(){e.call(this)}__extends(i,e);var r=__define,s=i,n=s.return r(n,&stage&,function(){return t.sys.$TempStage}),r(i,&runtimeType&,function(){return t.$warn(1041),i._runtimeType}),n.run=function(){},r(i,&instance&,function(){return null==i._instance&&(i._instance=new i),i._instance
+}),i.deviceType=null,i.DEVICE_PC=&web&,i.DEVICE_MOBILE=&native&,i.RUNTIME_HTML5=&runtimeHtml5&,i.RUNTIME_NATIVE=&runtimeNative&,i}(t.EventDispatcher);t.MainContext=e,t.registerClass(e,&egret.MainContext&)}(egret||(egret={}));var testDeviceType1=function(){if(!this.navigator)return!0;var t=navigator.userAgent.toLowerCase();return-1!=t.indexOf(&mobile&)||-1!=t.indexOf(&android&)},testRuntimeType1=function(){return this.navigator?!0:!1};egret.MainContext.deviceType=testDeviceType1()?egret.MainContext.DEVICE_MOBILE:egret.MainContext.DEVICE_PC,egret.MainContext._runtimeType=testRuntimeType1()?egret.MainContext.RUNTIME_HTML5:egret.MainContext.RUNTIME_NATIVE,delete testDeviceType1,delete testRuntimeType1;!function(t){var e=function(e){function i(t){void 0===t&&(t=300),e.call(this),this.objectPool=[],this._length=0,1&t&&(t=1),this.autoDisposeTime=t,this.frameCount=0}__extends(i,e);var r=__define,s=i,n=s.return i.$init=function(){t.sys.$ticker.$startTick(i.onUpdate,i)},i.onUpdate=function(t){for(var e=i._callBackList,r=e.length-1;r&=0;r--)e[r].$checkFrame();return!1},n.$checkFrame=function(){this.frameCount--,this.frameCount&=0&&this.dispose()},r(n,&length&,function(){return this._length}),n.push=function(t){var e=this.objectP-1==e.indexOf(t)&&(e.push(t),t.__recycle&&t.__recycle(),this._length++,0==this.frameCount&&(this.frameCount=this.autoDisposeTime,i._callBackList.push(this)))},n.pop=function(){return 0==this._length?null:(this._length--,this.objectPool.pop())},n.dispose=function(){this._length&0&&(this.objectPool=[],this._length=0),this.frameCount=0;var t=i._callBackList,e=t.indexOf(this);-1!=e&&t.splice(e,1)},i._callBackList=[],i}(t.HashObject);t.Recycler=e,t.registerClass(e,&egret.Recycler&),e.$init()}(egret||(egret={}));!function(t){function e(e,i,h){for(var l=[],c=3;c&arguments.c++)l[c-3]=arguments[c];var u={listener:e,thisObject:i,delay:h,originDelay:h,params:l};return o++,1==o&&(a=t.getTimer(),t.sys.$ticker.$startTick(r,null)),n++,s[n]=u,n}function i(e){s[e]&&(o--,delete s[e],0==o&&t.sys.$ticker.$stopTick(r,null))}function r(t){var e=t-a;a=t;for(var i in s){var r=s[i];r.delay-=e,r.delay&=0&&(r.delay=r.originDelay,r.listener.apply(r.thisObject,r.params))}return!1}var s={},n=0,o=0,a=0;t.setInterval=e,t.clearInterval=i}(egret||(egret={}));!function(t){function e(e,i,h){for(var l=[],c=3;c&arguments.c++)l[c-3]=arguments[c];var u={listener:e,thisObject:i,delay:h,params:l};return o++,1==o&&t.sys.$ticker&&(a=t.getTimer(),t.sys.$ticker.$startTick(r,null)),n++,s[n]=u,n}function i(e){s[e]&&(o--,delete s[e],0==o&&t.sys.$ticker&&t.sys.$ticker.$stopTick(r,null))}function r(t){var e=t-a;a=t;for(var r in s){var n=s[r];n.delay-=e,n.delay&=0&&(n.listener.apply(n.thisObject,n.params),i(r))}return!1}var s={},n=0,o=0,a=0;t.setTimeout=e,t.clearTimeout=i}(egret||(egret={}));
\ No newline at end of file
Index: game.native.js
===================================================================
--- game.native.js (revision 0)
+++ game.native.js (revision 45)
@@ -0,0 +1,166 @@
+//////////////////////////////////////////////////////////////////////////////////////
Copyright (c) , Egret Technology Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Egret nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS &AS IS& AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//////////////////////////////////////////////////////////////////////////////////////
+(function (egret) {
(function (native) {
* @private
var NativeNetContext = (function (_super) {
__extends(NativeNetContext, _super);
function NativeNetContext() {
_super.call(this);
this.urlData = {};
var d = __define,c=NativeNetContext,p=c.
* @method egret.HTML5NetContext#proceed
* @param loader {URLLoader}
p.proceed = function (loader) {
var self =
if (loader.dataFormat == egret.URLLoaderDataFormat.TEXTURE) {
self.loadTexture(loader);
if (loader.dataFormat == egret.URLLoaderDataFormat.SOUND) {
self.loadSound(loader);
var request = loader._
var virtualUrl = self.getVirtualUrl(egret.$getUrl(request));
var httpRequest = new egret.HttpRequest();
httpRequest.open(virtualUrl, request.method == egret.URLRequestMethod.POST ? egret.HttpMethod.POST : egret.HttpMethod.GET);
var length = request.requestHeaders.
for (var i = 0; i & i++) {
var urlRequestHeader = request.requestHeaders[i];
httpRequest.setRequestHeader(urlRequestHeader.name, urlRequestHeader.value);
httpRequest.addEventListener(PLETE, function () {
loader.data = httpRequest.
egret.Event.dispatchEvent(loader, PLETE);
httpRequest.addEventListener(egret.IOErrorEvent.IO_ERROR, function () {
egret.IOErrorEvent.dispatchIOErrorEvent(loader);
httpRequest.responseType = loader.dataFormat == egret.URLLoaderDataFormat.BINARY ? egret.HttpResponseType.ARRAY_BUFFER : egret.HttpResponseType.TEXT;
httpRequest.send(request.data);
p.loadSound = function (loader) {
var self =
var virtualUrl = this.getVirtualUrl(loader._request.url);
var sound = new egret.Sound();
sound.addEventListener(PLETE, onLoadComplete, self);
sound.addEventListener(egret.IOErrorEvent.IO_ERROR, onError, self);
sound.addEventListener(egret.ProgressEvent.PROGRESS, onPostProgress, self);
sound.load(virtualUrl);
function onPostProgress(event) {
loader.dispatchEvent(event);
function onError(event) {
removeListeners();
loader.dispatchEvent(event);
function onLoadComplete(e) {
removeListeners();
loader.data =
egret.$callAsync(function () {
loader.dispatchEventWith(PLETE);
function removeListeners() {
sound.removeEventListener(PLETE, onLoadComplete, self);
sound.removeEventListener(egret.IOErrorEvent.IO_ERROR, onError, self);
sound.removeEventListener(egret.ProgressEvent.PROGRESS, onPostProgress, self);
p.loadTexture = function (loader) {
var self =
var request = loader._
var virtualUrl = self.getVirtualUrl(request.url);
var imageLoader = new egret.ImageLoader();
imageLoader.addEventListener(PLETE, onLoadComplete, self);
imageLoader.addEventListener(egret.IOErrorEvent.IO_ERROR, onError, self);
imageLoader.addEventListener(egret.ProgressEvent.PROGRESS, onPostProgress, self);
imageLoader.load(virtualUrl);
function onPostProgress(event) {
loader.dispatchEvent(event);
function onError(event) {
removeListeners();
loader.dispatchEvent(event);
function onLoadComplete(e) {
removeListeners();
var bitmapData = imageLoader.
//bitmapData.setAttribute(&bitmapSrc&, virtualUrl);
var texture = new egret.Texture();
texture._setBitmapData(bitmapData);
loader.data =
egret.$callAsync(function () {
loader.dispatchEventWith(PLETE);
function removeListeners() {
imageLoader.removeEventListener(PLETE, onLoadComplete, self);
imageLoader.removeEventListener(egret.IOErrorEvent.IO_ERROR, onError, self);
imageLoader.removeEventListener(egret.ProgressEvent.PROGRESS, onPostProgress, self);
* 是否是网络地址
* @param url
* @returns {boolean}
p.isNetUrl = function (url) {
return url.indexOf(&http://&) != -1 || url.indexOf(&HTTP://&) != -1;
* 获取虚拟url
* @param url
* @returns {string}
p.getVirtualUrl = function (url) {
NativeNetContext.getNetContext = function () {
if (NativeNetContext._instance == null) {
NativeNetContext._instance = new NativeNetContext();
return NativeNetContext._
NativeNetContext.__use_asyn = egret_native.readFileAsync == null ? false :
return NativeNetC
})(egret.HashObject);
native.NativeNetContext = NativeNetC
egret.registerClass(NativeNetContext,&#39;egret.native.NativeNetContext&#39;,[&egret.NetContext&]);
egret.NetContext = NativeNetC
})(native = egret.native || (egret.native = {}));
+})(egret || (egret = {}));
Index: game.native.min.js
===================================================================
--- game.native.min.js (revision 0)
+++ game.native.min.js (revision 45)
@@ -0,0 +1 @@
+!function(e){!function(t){var n=function(t){function n(){t.call(this),this.urlData={}}__extends(n,t);var r=(__define,n),a=r.return a.proceed=function(t){var n=if(t.dataFormat==e.URLLoaderDataFormat.TEXTURE)return void n.loadTexture(t);if(t.dataFormat==e.URLLoaderDataFormat.SOUND)return void n.loadSound(t);var r=t._request,a=n.getVirtualUrl(e.$getUrl(r)),i=new e.HttpRi.open(a,r.method==e.URLRequestMethod.POST?e.HttpMethod.POST:e.HttpMethod.GET);for(var o=r.requestHeaders.length,E=0;o&E;E++){var s=r.requestHeaders[E];i.setRequestHeader(s.name,s.value)}i.addEventListener(PLETE,function(){t.data=i.response,e.Event.dispatchEvent(t,PLETE)},this),i.addEventListener(e.IOErrorEvent.IO_ERROR,function(){e.IOErrorEvent.dispatchIOErrorEvent(t)},this),i.responseType=t.dataFormat==e.URLLoaderDataFormat.BINARY?e.HttpResponseType.ARRAY_BUFFER:e.HttpResponseType.TEXT,i.send(r.data)},a.loadSound=function(t){function n(e){t.dispatchEvent(e)}function r(e){i(),t.dispatchEvent(e)}function a(n){i(),t.data=s,e.$callAsync(function(){t.dispatchEventWith(PLETE)},o)}function i(){s.removeEventListener(PLETE,a,o),s.removeEventListener(e.IOErrorEvent.IO_ERROR,r,o),s.removeEventListener(e.ProgressEvent.PROGRESS,n,o)}var o=this,E=this.getVirtualUrl(t._request.url),s=new e.Ss.addEventListener(PLETE,a,o),s.addEventListener(e.IOErrorEvent.IO_ERROR,r,o),s.addEventListener(e.ProgressEvent.PROGRESS,n,o),s.load(E)},a.loadTexture=function(t){function n(e){t.dispatchEvent(e)}function r(e){i(),t.dispatchEvent(e)}function a(n){i();var r=v.data,a=new e.Ta._setBitmapData(r),t.data=a,e.$callAsync(function(){t.dispatchEventWith(PLETE)},o)}function i(){v.removeEventListener(PLETE,a,o),v.removeEventListener(e.IOErrorEvent.IO_ERROR,r,o),v.removeEventListener(e.ProgressEvent.PROGRESS,n,o)}var o=this,E=t._request,s=o.getVirtualUrl(E.url),v=new e.ImageLv.addEventListener(PLETE,a,o),v.addEventListener(e.IOErrorEvent.IO_ERROR,r,o),v.addEventListener(e.ProgressEvent.PROGRESS,n,o),v.load(s)},a.isNetUrl=function(e){return-1!=e.indexOf(&http://&)||-1!=e.indexOf(&HTTP://&)},a.getVirtualUrl=function(e){return e},n.getNetContext=function(){return null==n._instance&&(n._instance=new n),n._instance},n.__use_asyn=null==egret_native.readFileAsync?!1:!0,n}(e.HashObject);t.NativeNetContext=n,e.registerClass(n,&egret.native.NativeNetContext&,[&egret.NetContext&]),e.NetContext=n}(t=e[&native&]||(e[&native&]={}))}(egret||(egret={}));
\ No newline at end of file
Index: game.d.ts
===================================================================
--- game.d.ts (revision 0)
+++ game.d.ts (revision 45)
@@ -0,0 +1,2530 @@
+declare module egret {
* @version Egret 2.4
* @platform Web,Native
* @private
class FrameLabel extends EventDispatcher {
* @private
* @private
* @private
* @version Egret 2.4
* @platform Web,Native
constructor(name: string, frame: number, end?: number);
* @language en_US
* Frame number
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
* @version Egret 2.4
* @platform Web,Native
* @language en_US
* Frame serial number of the label
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
* 标签所在帧序号
* @version Egret 2.4
* @platform Web,Native
* @language en_US
* Frame serial number, the end of the label
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
* 标签对应的结束帧序号
* @version Egret 2.4
* @platform Web,Native
* @language en_US
* Duplicate the current frame label object
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
* 复制当前帧标签对象
* @version Egret 2.4
* @platform Web,Native
clone(): FrameL
+declare module egret {
* @language en_US
* @version Egret 2.4
* @platform Web,Native
* @includeExample extension/game/display/MovieClip.ts
* @language zh_CN
* 影片剪辑,可以通过影片剪辑播放序列帧动画。MovieClip 类从以下类继承而来:DisplayObject 和 EventDispatcher。不同于 DisplayObject 对象,MovieClip 对象拥有一个时间轴。
* @extends egret.DisplayObject
* @event PLETE 动画播放完成。
* @event egret.Event.LOOP_COMPLETE 动画循环播放完成。
* @see /cn/docs/page/596 MovieClip序列帧动画
* @version Egret 2.4
* @platform Web,Native
* @includeExample extension/game/display/MovieClip.ts
class MovieClip extends DisplayObject {
$bitmapData: T
private offsetP
$movieClipData: MovieClipD
* @private
* @private
$totalFrames:
* @version Egret 2.4
* @platform Web,Native
* @private
frameLabels: any[];
* @private
$frameLabelStart:
* @private
$frameLabelEnd:
* @version Egret 2.4
* @platform Web,Native
* @private
frameEvents: any[];
* @private
private frameIntervalT
* @private
$eventPool: string[];
$isPlaying:
* @private
private isS
* @private
private playT
* @private
$currentFrameNum:
* @private
$nextFrameNum:
* @private
private displayedKeyFrameN
* @private
private passedT
* 创建新的 MovieClip 实例。创建 MovieClip 之后,调用舞台上的显示对象容器的addElement方法。
* @param movieClipData {movieClipData} 被引用的 movieClipData 对象
* @version Egret 2.4
* @platform Web,Native
constructor(movieClipData?: MovieClipData);
* @private
$smoothing:
* @language en_US
* Whether or not is smoothed when scaled.
* @version Egret 3.0
* @platform Web
* @language zh_CN
* 控制在缩放时是否进行平滑处理。
* @version Egret 3.0
* @platform Web
smoothing:
* @private
* @private
* @private
private _initFrame();
* @private
$render(context: sys.RenderContext):
* @private
$measureContentBounds(bounds: Rectangle):
* @private
* @param stage
* @param nestLevel
$onAddToStage(stage: Stage, nestLevel: number):
* @private
$onRemoveFromStage():
* @private
* 返回帧标签为指定字符串的FrameLabel对象
* @param labelName {string} 帧标签名
* @param ignoreCase {boolean} 是否忽略大小写,可选参数,默认false
* @returns {egret.FrameLabel} FrameLabel对象
private getFrameLabelByName(labelName, ignoreCase?);
* @private
* 根据帧标签,设置开始和结束的帧数
* @param labelName {string} 帧标签名
private getFrameStartEnd(labelName);
* @private
* 返回指定序号的帧的FrameLabel对象
* @param frame {number} 帧序号
* @returns {egret.FrameLabel} FrameLabel对象
private getFrameLabelByFrame(frame);
* @private
* 返回指定序号的帧对应的FrameLabel对象,如果当前帧没有标签,则返回前面最近的有标签的帧的FrameLabel对象
* @method egret.MovieClip#getFrameLabelForFrame
* @param frame {number} 帧序号
* @returns {egret.FrameLabel} FrameLabel对象
private getFrameLabelForFrame(frame);
* 继续播放当前动画
* @param playTimes {number} 播放次数。 参数为整数,可选参数,&=1:设定播放次数,&0:循环播放,默认值 0:不改变播放次数(MovieClip初始播放次数设置为1),
* @version Egret 2.4
* @platform Web,Native
play(playTimes?: number):
* 暂停播放动画
* @version Egret 2.4
* @platform Web,Native
* 将播放头移到前一帧并停止
* @version Egret 2.4
* @platform Web,Native
prevFrame():
* 跳到后一帧并停止
* @version Egret 2.4
* @platform Web,Native
nextFrame():
* 将播放头移到指定帧并播放
* @param frame {any} 指定帧的帧号或帧标签
* @param playTimes {number} 播放次数。 参数为整数,可选参数,&=1:设定播放次数,&0:循环播放,默认值 0:不改变播放次数,
* @version Egret 2.4
* @platform Web,Native
gotoAndPlay(frame: any, playTimes?: number):
* 将播放头移到指定帧并停止
* @param frame {any} 指定帧的帧号或帧标签
* @version Egret 2.4
* @platform Web,Native
gotoAndStop(frame: any):
* @private
* @param frame
private gotoFrame(frame);
* @private
private lastT
* @private
* @param advancedTime
* @returns
private advanceTime(timeStamp);
* @private
private advanceFrame();
* @private
private constructFrame();
* @private
private handlePendingEvent();
* MovieClip 实例中帧的总数
* @version Egret 2.4
* @platform Web,Native
totalFrames:
* MovieClip 实例当前播放的帧的序号
* @version Egret 2.4
* @platform Web,Native
currentFrame:
* MovieClip 实例当前播放的帧的标签。如果当前帧没有标签,则 currentFrameLabel返回null。
* @version Egret 2.4
* @platform Web,Native
currentFrameLabel:
* 当前播放的帧对应的标签,如果当前帧没有标签,则currentLabel返回包含标签的先前帧的标签。如果当前帧和先前帧都不包含标签,currentLabel返回null。
* @version Egret 2.4
* @platform Web,Native
currentLabel:
* MovieClip 实例的帧频
* @version Egret 2.4
* @platform Web,Native
frameRate:
* MovieClip 实例当前是否正在播放
* @version Egret 2.4
* @platform Web,Native
isPlaying:
* @version Egret 2.4
* @platform Web,Native
* MovieClip数据源
movieClipData: MovieClipD
* @private
* @param value
private setMovieClipData(value);
* @private
* @param value
private setPlayTimes(value);
* @private
* @param value
private setIsStopped(value);
+declare module egret {
* @classdesc 使用 MovieClipData 类,您可以创建 MovieClip 对象和处理 MovieClip 对象的数据。MovieClipData 一般由MovieClipDataFactory生成
* @see /cn/docs/page/596 MovieClip序列帧动画
* @version Egret 2.4
* @platform Web,Native
class MovieClipData extends HashObject {
* @private
* MovieClip数据
* @version Egret 2.4
* @platform Web,Native
numFrames:
* 帧数据列表
* @version Egret 2.4
* @platform Web,Native
frames: any[];
* 帧标签列表
* @version Egret 2.4
* @platform Web,Native
labels: any[];
* 帧事件列表
* @version Egret 2.4
* @platform Web,Native
events: any[];
* @version Egret 2.4
* @platform Web,Native
frameRate:
* 纹理数据
* @version Egret 2.4
* @platform Web,Native
textureData:
* @version Egret 2.4
* @platform Web,Native
spriteSheet: SpriteS
* 创建一个 egret.MovieClipData 对象
* @version Egret 2.4
* @platform Web,Native
constructor();
* @private
* @param mcData
* @param textureData
* @param spriteSheet
$init(mcData: any, textureData: any, spriteSheet: SpriteSheet):
* 根据指定帧序号获取该帧对应的关键帧数据
* @param frame {number} 帧序号
* @returns {any} 帧数据对象
* @version Egret 2.4
* @platform Web,Native
getKeyFrameData(frame: number):
* 根据指定帧序号获取该帧对应的Texture对象
* @param frame {number} 帧序号
* @returns {egret.Texture} Texture对象
* @version Egret 2.4
* @platform Web,Native
getTextureByFrame(frame: number): T
$getOffsetByFrame(frame: number, point: Point):
* @private
* @param resName
* @returns
private getTextureByResName(resName);
* @private
* @returns
$isDataValid():
* @private
* @returns
$isTextureValid():
* @private
* @param mcData
$fillMCData(mcData: any):
* @private
* @param framesData
private fillFramesData(framesData);
* @private
* @param frameLabelsData
private fillFrameLabelsData(frameLabelsData);
* @private
* @param frameEventsData
private fillFrameEventsData(frameEventsData);
* @version Egret 2.4
* @platform Web,Native
* MovieClip数据源
mcData: MovieClipD
* @private
* @param value
private setMCData(value);
+declare module egret {
* @classdesc 使用 MovieClipDataFactory 类,可以生成 MovieClipData 对象用于创建MovieClip
* @see http://docs.egret-labs.org/post/manual/displaycon/movieclip.html MovieClip序列帧动画
* @version Egret 2.4
* @platform Web,Native
class MovieClipDataFactory extends EventDispatcher {
* 是否开启缓存
* @version Egret 2.4
* @platform Web,Native
enableCache:
* @private
$mcDataSet:
* @private
$spriteSheet: SpriteS
* @private
$mcDataCache:
* 创建一个 egret.MovieClipDataFactory 对象
* @param movieClipDataSet {any} MovieClip数据集,该数据集必须由Egret官方工具生成
* @param texture {Texture} 纹理
* @version Egret 2.4
* @platform Web,Native
constructor(movieClipDataSet?: any, texture?: Texture);
* 清空缓存
* @version Egret 2.4
* @platform Web,Native
clearCache():
* 根据名字生成一个MovieClipData实例。可以用于创建MovieClip。
* @param movieClipName {string} MovieClip名字. 可选参数,默认为&&, 相当于取第一个MovieClip数据
* @returns {MovieClipData} 生成的MovieClipData对象
* @version Egret 2.4
* @platform Web,Native
generateMovieClipData(movieClipName?: string): MovieClipD
* @private
* @param movieClipName
* @param cache
* @returns
private findFromCache(movieClipName, cache);
* @private
* @param movieClipName
* @param movieClip
* @param cache
private fillData(movieClipName, movieClip, cache);
* MovieClip数据集
* @version Egret 2.4
* @platform Web,Native
mcDataSet:
* MovieClip需要使用的纹理图
texture: T
* 由纹理图生成的精灵表
* @version Egret 2.4
* @platform Web,Native
spriteSheet: SpriteS
* @private
* @param value
private setTexture(value);
+declare module egret {
* @language en_US
* When the movieClip&#39;s current frame have a frameLabel, dispatches MovieClipEvent object. FrameLabel Event type: MovieClipEvent.FRAME_LABEL
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
* 当动画的当前帧有事件,将调度 MovieClipEvent 对象。帧事件类型 MovieClipEvent.FRAME_LABEL.
* @version Egret 2.4
* @platform Web,Native
class MovieClipEvent extends Event {
* @language en_US
* TextEvent create an object that contains information about movieClip events.
* @param type Type of event, you can access the MovieClipEvent.type.
* @param bubbles Determines whether the Event object participates in the bubbling stage of the event flow. The default value is false.
* @param cancelable Determine whether the Event object can be canceled. The default value is false.
* @param frameLabel When the current frame have a frameLabel, the event listeners can access this information through the frameLabel property.
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
* 创建一个 MovieClipEvent 对象,其中包含有关帧事件的信息。
* @param type 事件的类型,可以作为 MovieClipEvent.type 访问。
* @param bubbles 确定 Event 对象是否参与事件流的冒泡阶段。默认值为 false。
* @param cancelable 确定是否可以取消 Event 对象。默认值为 false。
* @param frameLabel 动画上的帧事件。事件侦听器可以通过 frameLabel 属性访问此信息。
* @version Egret 2.4
* @platform Web,Native
constructor(type: string, bubbles?: boolean, cancelable?: boolean, frameLabel?: string);
* @language en_US
* Dispatched whenever the current frame have a frameLabel.
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
* 动画的当前帧上有事件时调度
* @version Egret 2.4
* @platform Web,Native
static FRAME_LABEL:
* @language en_US
* In MovieClipEvent.FRAME_LABEL event, event corresponding string.
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
* 在 MovieClipEvent.FRAME_LABEL 事件中,event对应的字符串。
* @version Egret 2.4
* @platform Web,Native
frameLabel:
* @language en_US
* EventDispatcher object using the specified event object thrown MovieClipEvent. The objects will be thrown in the object cache pool for the next round robin.
* @param type
The type of the event, accessible as Event.type.
* @param bubbles
Determines whether the Event object participates in the bubbling stage of the event flow. The default value is false.
* @param frameLabel
MovieClipEvent object frameLabel
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
* 使用指定的EventDispatcher对象来抛出 MovieClipEvent 事件对象。抛出的对象将会缓存在对象池上,供下次循环复用。
* @param target 派发事件目标
* @param type
* @param frameLabel
MovieClipEvent 对象的 frameLabel 赋值
* @version Egret 2.4
* @platform Web,Native
static dispatchMovieClipEvent(target: IEventDispatcher, type: string, frameLabel?: string):
+declare module egret {
* @private
class ScrollEase {
* @version Egret 2.4
* @platform Web,Native
constructor();
* @param amount
* @returns
* @version Egret 2.4
* @platform Web,Native
static get(amount: any): F
* @version Egret 2.4
* @platform Web,Native
static quintOut: F
* @param pow
* @returns
* @version Egret 2.4
* @platform Web,Native
static getPowOut(pow: any): F
* @version Egret 2.4
* @platform Web,Native
static quartOut: F
* @language en_US
* ScrollTween is the animation easing class of Egret
* @see http://docs.egret-labs.org/post/manual/anim/tween.html Tween缓动动画
* @version Egret 2.4
* @platform Web,Native
* @includeExample egret/tween/ScrollTween.ts
* @private
* @language zh_CN
* Tween是Egret的动画缓动类
* @see http://docs.egret-labs.org/post/manual/anim/tween.html ScrollTween ease animation
* @version Egret 2.4
* @platform Web,Native
* @includeExample egret/tween/ScrollTween.ts
* @private
class ScrollTween extends EventDispatcher {
* @private
private static _
* @private
private static IGNORE;
* @private
private static _
* @private
private static _
* @private
* @private
private _useT
* @private
private ignoreGlobalP
* @private
* @private
private pluginD
* @private
private _curQueueP
* @private
private _initQueueP
* @private
* @private
* @private
* @private
* @private
private _prevP
* @private
* @private
private _prevP
* @private
private _stepP
* @private
* @language en_US
* Activate an object and add a ScrollTween animation to the object
* @param target {any} The object to be activated
* @param props {any} Parameters, support loop onChange onChangeObj
* @param pluginData {any} Write realized
* @param override {boolean} Whether to remove the object before adding a tween, the default value false
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
* 激活一个对象,对其添加 ScrollTween 动画
* @param target {any} 要激活 ScrollTween 的对象
* @param props {any} 参数,支持loop(循环播放) onChange(变化函数) onChangeObj(变化函数作用域)
* @param pluginData {any} 暂未实现
* @param override {boolean} 是否移除对象之前添加的tween,默认值false
* @version Egret 2.4
* @platform Web,Native
static get(target: any, props?: any, pluginData?: any, override?: boolean): ScrollT
* @language en_US
* Delete all ScrollTween animations from an object
* @param target The object whose ScrollTween to be deleted
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
* 删除一个对象上的全部 ScrollTween 动画
* @param target
需要移除 ScrollTween 的对象
* @version Egret 2.4
* @platform Web,Native
static removeTweens(target: any):
* @private
* @param delta
* @param paused
private static tick(timeStamp, paused?);
private static _lastT
* @private
* @param tween
* @param value
private static _register(tween, value);
* 创建一个 egret.ScrollTween 对象
* @private
* @version Egret 2.4
* @platform Web,Native
constructor(target: any, props: any, pluginData: any);
* @private
* @param target
* @param props
* @param pluginData
private initialize(target, props, pluginData);
* @private
* @param value
* @param actionsMode
* @returns
private setPosition(value, actionsMode?);
* @private
* @param startPos
* @param endPos
* @param includeStart
private _runActions(startPos, endPos, includeStart?);
* @private
* @param step
* @param ratio
private _updateTargetProps(step, ratio);
* @language en_US
* Whether setting is paused
* @param value {boolean} Whether to pause
* @returns ScrollTween object itself
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
* 设置是否暂停
* @param value {boolean} 是否暂停
* @returns Tween对象本身
* @version Egret 2.4
* @platform Web,Native
setPaused(value: boolean): ScrollT
* @private
* @param props
* @returns
private _cloneProps(props);
* @private
* @param o
* @returns
private _addStep(o);
* @private
* @param o
* @returns
private _appendQueueProps(o);
* @private
* @param o
* @returns
private _addAction(o);
* @language en_US
* Modify the property of the specified display object to a specified value
* @param props {Object} Property set of an object
* @param duration {number} Duration
* @param ease {egret.ScrollEase} Easing algorithm
* @returns {egret.ScrollTween} ScrollTween object itself
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
* 将指定显示对象的属性修改为指定值
* @param props {Object} 对象的属性集合
* @param duration {number} 持续时间
* @param ease {egret.ScrollEase} 缓动算法
* @returns {egret.ScrollTween} Tween对象本身
* @version Egret 2.4
* @platform Web,Native
to(props: any, duration?: number, ease?: Function): ScrollT
* @language en_US
* Execute callback function
* @param callback {Function} Callback method
* @param thisObj {any} this action scope of the callback method
* @param params {Array&any&} Parameter of the callback method
* @returns {egret.ScrollTween} ScrollTween object itself
* @version Egret 2.4
* @platform Web,Native
* @language zh_CN
* 执行回调函数
* @param callback {Function} 回调方法
* @param thisObj {any} 回调方法this作用域
* @param params {Array&any&} 回调方法参数
* @returns {egret.ScrollTween} Tween对象本身
* @version Egret 2.4
* @platform Web,Native
call(callback: Function, thisObj?: any, params?: Array&any&): ScrollT
* @method egret.ScrollTween#tick
* @param delta {number}
* @private
* @version Egret 2.4
* @platform Web,Native
tick(delta: number):
+declare module egret {
* @language en

我要回帖

更多关于 this.children 的传值 的文章

 

随机推荐