第一次提交
This commit is contained in:
commit
8121362a03
4412 files changed
+1091845
No files matched your search
@@ -0,0 +1,4 @@
|
||||
var egret;!function(e){var t;!function(t){var i="egret.BitmapData";e.registerClass(HTMLImageElement,i),e.registerClass(HTMLCanvasElement,i),e.registerClass(HTMLVideoElement,i)}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){function t(t){return t.hashCode=t.$hashCode=e.$hashCount++,t}e.$toBitmapData=t}(egret||(egret={}));var egret;!function(e){var t;!function(t){var i=function(){function e(){}var t=(__define,e);t.prototype;return e.call=function(e,t){},e.addCallback=function(e,t){},e}();t.WebExternalInterface=i,e.registerClass(i,"egret.web.WebExternalInterface",["egret.ExternalInterface"]),e.ExternalInterface=i}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var i;!function(i){function r(e){return window.localStorage.getItem(e)}function n(t,i){try{return window.localStorage.setItem(t,i),!0}catch(r){return e.$warn(1047,t,i),!1}}function a(e){window.localStorage.removeItem(e)}function s(){window.localStorage.clear()}t.getItem=r,t.setItem=n,t.removeItem=a,t.clear=s}(i=t.web||(t.web={}))}(t=e.localStorage||(e.localStorage={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var i=function(i){function r(){i.call(this),this.loaded=!1}__extends(r,i);var n=__define,a=r,s=a.prototype;return n(s,"length",function(){if(this.originAudio)return this.originAudio.duration;throw new Error("sound not loaded!")}),s.load=function(t){function i(){a(),h.indexOf("firefox")>=0&&(o.pause(),o.muted=!1),s.loaded=!0,s.dispatchEventWith(e.Event.COMPLETE)}function n(){a(),s.dispatchEventWith(e.IOErrorEvent.IO_ERROR)}function a(){o.removeEventListener("canplaythrough",i),o.removeEventListener("error",n)}var s=this;this.url=t;var o=new Audio(t);o.addEventListener("canplaythrough",i),o.addEventListener("error",n);var h=navigator.userAgent.toLowerCase();h.indexOf("firefox")>=0&&(o.autoplay=!0,o.muted=!0),o.load(),this.originAudio=o,r.$recycle(this.url,o)},s.play=function(i,n){i=+i||0,n=+n||0;var a=r.$pop(this.url);null==a&&(a=this.originAudio.cloneNode()),a.autoplay=!0;var s=new t.HtmlSoundChannel(a);return s.$url=this.url,s.$loops=n,s.$startTime=i,s.$play(),e.sys.$pushSoundChannel(s),s},s.close=function(){0==this.loaded&&this.originAudio&&(this.originAudio.src=""),this.originAudio&&(this.originAudio=null),r.$clear(this.url)},r.$clear=function(e){var t=r.audios[e];t&&(t.length=0)},r.$pop=function(e){var t=r.audios[e];return t&&t.length>0?t.pop():null},r.$recycle=function(e,t){var i=r.audios[e];null==r.audios[e]&&(i=r.audios[e]=[]),i.push(t)},r.MUSIC="music",r.EFFECT="effect",r.audios={},r}(e.EventDispatcher);t.HtmlSound=i,e.registerClass(i,"egret.web.HtmlSound",["egret.Sound"])}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var i=function(i){function r(t){var r=this;i.call(this),this.$startTime=0,this.audio=null,this.isStopped=!1,this.canPlay=function(){r.audio.removeEventListener("canplay",r.canPlay);try{r.audio.currentTime=r.$startTime}catch(e){}finally{r.audio.play()}},this.onPlayEnd=function(){return 1==r.$loops?(r.stop(),void r.dispatchEventWith(e.Event.SOUND_COMPLETE)):(r.$loops>0&&r.$loops--,void r.$play())},t.addEventListener("ended",this.onPlayEnd),this.audio=t}__extends(r,i);var n=__define,a=r,s=a.prototype;return s.$play=function(){if(this.isStopped)return void e.$error(1036);try{this.audio.currentTime=this.$startTime}catch(t){return void this.audio.addEventListener("canplay",this.canPlay)}this.audio.play()},s.stop=function(){if(this.audio){this.isStopped||e.sys.$popSoundChannel(this),this.isStopped=!0;var i=this.audio;i.pause(),i.removeEventListener("ended",this.onPlayEnd),this.audio=null,t.HtmlSound.$recycle(this.$url,i)}},n(s,"volume",function(){return this.audio?this.audio.volume:1},function(t){return this.isStopped?void e.$error(1036):void(this.audio&&(this.audio.volume=t))}),n(s,"position",function(){return this.audio?this.audio.currentTime:0}),r}(e.EventDispatcher);t.HtmlSoundChannel=i,e.registerClass(i,"egret.web.HtmlSoundChannel",["egret.SoundChannel","egret.IEventDispatcher"])}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var i=function(i){function r(){i.call(this),this.loaded=!1}__extends(r,i);var n=__define,a=r,s=a.prototype;return s.load=function(i){var r=this;this.url=i,QZAppExternal.preloadSound(function(t){0==t.code?(r.loaded=!0,r.dispatchEventWith(e.Event.COMPLETE)):r.dispatchEventWith(e.IOErrorEvent.IO_ERROR)},{bid:-1,url:t.Html5Capatibility._QQRootPath+i,refresh:1})},n(s,"length",function(){throw new Error("qq sound not supported!")}),s.play=function(i,r){i=+i||0,r=+r||0;var n=new t.QQSoundChannel;return n.$url=this.url,n.$loops=r,n.$type=this.type,n.$startTime=i,n.$play(),e.sys.$pushSoundChannel(n),n},s.close=function(){},r.MUSIC="music",r.EFFECT="effect",r}(e.EventDispatcher);t.QQSound=i,e.registerClass(i,"egret.web.QQSound",["egret.Sound"])}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var i=function(t){function i(){var i=this;t.Line truncated
|
||||
}else r.width!=e&&(r.width=e),r.height!=t&&(r.height=t);this.clear()},a.resizeTo=function(e,t,n,a){r||(r=i());var s=(this.context,this.surface),o=r,h=o.getContext("2d");r=s,this.context=h,this.surface=o,o.width=Math.max(e,257),o.height=Math.max(t,257),h.setTransform(1,0,0,1,0,0),h.drawImage(s,n,a),s.height=1,s.width=1},a.setDirtyRegionPolicy=function(e){},a.beginClip=function(e,t,i){t=+t||0,i=+i||0;var r=this.context;r.save(),r.beginPath(),r.setTransform(1,0,0,1,t,i);for(var n=e.length,a=0;n>a;a++){var s=e[a];r.clearRect(s.minX,s.minY,s.width,s.height),r.rect(s.minX,s.minY,s.width,s.height)}r.clip()},a.endClip=function(){this.context.restore()},a.getPixels=function(e,t,i,r){return void 0===i&&(i=1),void 0===r&&(r=1),this.context.getImageData(e,t,i,r).data},a.toDataURL=function(e,t){return this.surface.toDataURL(e,t)},a.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.surface.width,this.surface.height)},a.destroy=function(){this.surface.width=this.surface.height=0},e}();t.CanvasRenderBuffer=n,e.registerClass(n,"egret.web.CanvasRenderBuffer",["egret.sys.RenderBuffer"])}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var i=function(t){function i(i,r){var n=this;t.call(this),this.onTouchBegin=function(e){var t=n.getLocation(e);n.touch.onTouchBegin(t.x,t.y,e.identifier)},this.onTouchMove=function(e){var t=n.getLocation(e);n.touch.onTouchMove(t.x,t.y,e.identifier)},this.onTouchEnd=function(e){var t=n.getLocation(e);n.touch.onTouchEnd(t.x,t.y,e.identifier)},this.scaleX=1,this.scaleY=1,this.rotation=0,this.canvas=r,this.touch=new e.sys.TouchHandler(i),this.addListeners()}__extends(i,t);var r=(__define,i),n=r.prototype;return n.addListeners=function(){var t=this;window.navigator.msPointerEnabled?(this.canvas.addEventListener("MSPointerDown",function(e){e.identifier=e.pointerId,t.onTouchBegin(e),t.prevent(e)},!1),this.canvas.addEventListener("MSPointerMove",function(e){e.identifier=e.pointerId,t.onTouchMove(e),t.prevent(e)},!1),this.canvas.addEventListener("MSPointerUp",function(e){e.identifier=e.pointerId,t.onTouchEnd(e),t.prevent(e)},!1)):(e.Capabilities.$isMobile||this.addMouseListener(),this.addTouchListener())},n.addMouseListener=function(){this.canvas.addEventListener("mousedown",this.onTouchBegin),this.canvas.addEventListener("mousemove",this.onTouchMove),this.canvas.addEventListener("mouseup",this.onTouchEnd)},n.addTouchListener=function(){var e=this;this.canvas.addEventListener("touchstart",function(t){for(var i=t.changedTouches.length,r=0;i>r;r++)e.onTouchBegin(t.changedTouches[r]);e.prevent(t)},!1),this.canvas.addEventListener("touchmove",function(t){for(var i=t.changedTouches.length,r=0;i>r;r++)e.onTouchMove(t.changedTouches[r]);e.prevent(t)},!1),this.canvas.addEventListener("touchend",function(t){for(var i=t.changedTouches.length,r=0;i>r;r++)e.onTouchEnd(t.changedTouches[r]);e.prevent(t)},!1),this.canvas.addEventListener("touchcancel",function(t){for(var i=t.changedTouches.length,r=0;i>r;r++)e.onTouchEnd(t.changedTouches[r]);e.prevent(t)},!1)},n.prevent=function(e){e.stopPropagation(),1==e.isScroll||this.canvas.userTyping||e.preventDefault()},n.getLocation=function(t){t.identifier=+t.identifier||0;var i=document.documentElement,r=this.canvas.getBoundingClientRect(),n=r.left+window.pageXOffset-i.clientLeft,a=r.top+window.pageYOffset-i.clientTop,s=t.pageX-n,o=s,h=t.pageY-a,l=h;return 90==this.rotation?(o=h,l=r.width-s):-90==this.rotation&&(o=r.height-h,l=s),o/=this.scaleX,l/=this.scaleY,e.$TempPoint.setTo(Math.round(o),Math.round(l))},n.updateScaleMode=function(e,t,i){this.scaleX=e,this.scaleY=t,this.rotation=i},n.$updateMaxTouches=function(){this.touch.$initMaxTouches()},i}(e.HashObject);t.WebTouchHandler=i,e.registerClass(i,"egret.web.WebTouchHandler")}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var i=function(t){function i(e){t.call(this),this.isActivate=!0,this.stage=e,this.registerListener()}__extends(i,t);var r=(__define,i),n=r.prototype;return n.registerListener=function(){var t=this,i=function(){t.isActivate&&(t.isActivate=!1,t.stage.dispatchEvent(new e.Event(e.Event.DEACTIVATE)))},r=function(){t.isActivate||(t.isActivate=!0,t.stage.dispatchEvent(new e.Event(e.Event.ACTIVATE)))},n=function(){document[a]?i():r()};window.addEventListener("focus",r,!1),window.addEventListener("blur",i,!1);var a,s;"undefined"!=typeof document.hidden?(a="hidden",s="visibilitychange"):"undefined"!=typeof document.mozHidden?(a="mozHidden",s="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(a="msHidden",s="msvisibilitychange"):"undefined"!=typeof document.webkitHidden?(a="webkitHidden",s="webkitvisibilitychange"):"undefined"!=typeof document.oHidden&&(a="oHidden",s="ovisibilitychange"),"onpageshow"in window&&"onpagehide"in window&&(window.addEventListener("pageshow",r,!1),window.addEventListener("pagehide",i,!1)),a&&s&&document.addEventListener(s,n,!1);var o=navigator.userAgent,h=/micromessenger/gLine truncated
|
||||
}__extends(t,e);var i=(__define,t),r=i.prototype;return r.setBlur=function(e,t){var i=this.uniforms.blur;(i.value.x!=e||i.value.y!=t)&&(i.value.x=e,i.value.y=t,i.dirty=!0)},r.setTextureSize=function(e,t){var i=this.uniforms.uTextureSize;(e!=i.value.x||t!=i.value.y)&&(i.value.x=e,i.value.y=t,i.dirty=!0)},t}(t.TextureShader);t.BlurShader=i,e.registerClass(i,"egret.web.BlurShader")}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var i=function(e){function t(){e.apply(this,arguments),this.fragmentSrc="precision mediump float;\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nuniform mat4 matrix;\nuniform vec4 colorAdd;\nuniform sampler2D uSampler;\nvoid main(void) {\nvec4 texColor = texture2D(uSampler, vTextureCoord);\nif(texColor.a > 0.) {texColor = vec4(texColor.rgb / texColor.a, texColor.a);\n}vec4 locColor = clamp(texColor * matrix + colorAdd, 0., 1.);\ngl_FragColor = vColor * vec4(locColor.rgb * locColor.a, locColor.a);\n}",this.uniforms={projectionVector:{type:"2f",value:{x:0,y:0},dirty:!0},matrix:{type:"mat4",value:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],dirty:!0},colorAdd:{type:"4f",value:{x:0,y:0,z:0,w:0},dirty:!0}}}__extends(t,e);var i=(__define,t),r=i.prototype;return r.setMatrix=function(e){var t=this.uniforms.matrix;(t.value[0]!=e[0]||t.value[0]!=e[0]||t.value[1]!=e[1]||t.value[2]!=e[2]||t.value[3]!=e[3]||t.value[4]!=e[5]||t.value[5]!=e[6]||t.value[6]!=e[7]||t.value[7]!=e[8]||t.value[8]!=e[10]||t.value[9]!=e[11]||t.value[10]!=e[12]||t.value[11]!=e[13]||t.value[12]!=e[15]||t.value[13]!=e[16]||t.value[14]!=e[17]||t.value[15]!=e[18])&&(t.value[0]=e[0],t.value[1]=e[1],t.value[2]=e[2],t.value[3]=e[3],t.value[4]=e[5],t.value[5]=e[6],t.value[6]=e[7],t.value[7]=e[8],t.value[8]=e[10],t.value[9]=e[11],t.value[10]=e[12],t.value[11]=e[13],t.value[12]=e[15],t.value[13]=e[16],t.value[14]=e[17],t.value[15]=e[18],t.dirty=!0);var i=this.uniforms.colorAdd;(i.value.x!=e[4]/255||i.value.y!=e[9]/255||i.value.z!=e[14]/255||i.value.w!=e[19]/255)&&(i.value.x=e[4]/255,i.value.y=e[9]/255,i.value.z=e[14]/255,i.value.w=e[19]/255,i.dirty=!0)},t}(t.TextureShader);t.ColorTransformShader=i,e.registerClass(i,"egret.web.ColorTransformShader")}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var i=function(e){function t(){e.apply(this,arguments),this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","uniform sampler2D uSampler;","uniform float distance;","uniform float angle;","uniform vec4 color;","uniform float alpha;","uniform float blurX;","uniform float blurY;","uniform float strength;","uniform float inner;","uniform float knockout;","uniform float hideObject;","uniform vec2 uTextureSize;vec2 px = vec2(1.0 / uTextureSize.x, 1.0 / uTextureSize.y);","float random(vec3 scale, float seed)","{","return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);","}","void main(void) {","const float linearSamplingTimes = 7.0;","const float circleSamplingTimes = 12.0;","vec4 ownColor = texture2D(uSampler, vTextureCoord);","vec4 curColor;","float totalAlpha = 0.0;","float maxTotalAlpha = 0.0;","float curDistanceX = 0.0;","float curDistanceY = 0.0;","float offsetX = distance * cos(angle) * px.x;","float offsetY = distance * sin(angle) * px.y;","const float PI = 3.14159265358979323846264;","float cosAngle;","float sinAngle;","float offset = PI * 2.0 / circleSamplingTimes * random(vec3(12.9898, 78.233, 151.7182), 0.0);","float stepX = blurX * px.x / linearSamplingTimes;","float stepY = blurY * px.y / linearSamplingTimes;","for (float a = 0.0; a <= PI * 2.0; a += PI * 2.0 / circleSamplingTimes) {","cosAngle = cos(a + offset);","sinAngle = sin(a + offset);","for (float i = 1.0; i <= linearSamplingTimes; i++) {","curDistanceX = i * stepX * cosAngle;","curDistanceY = i * stepY * sinAngle;","curColor = texture2D(uSampler, vec2(vTextureCoord.x + curDistanceX - offsetX, vTextureCoord.y + curDistanceY + offsetY));","totalAlpha += (linearSamplingTimes - i) * curColor.a;","maxTotalAlpha += (linearSamplingTimes - i);","}","}","ownColor.a = max(ownColor.a, 0.0001);","ownColor.rgb = ownColor.rgb / ownColor.a;","float outerGlowAlpha = (totalAlpha / maxTotalAlpha) * strength * alpha * (1. - inner) * max(min(hideObject, knockout), 1. - ownColor.a);","float innerGlowAlpha = ((maxTotalAlpha - totalAlpha) / maxTotalAlpha) * strength * alpha * inner * ownColor.a;","ownColor.a = max(ownColor.a * knockout * (1. - hideObject), 0.0001);","vec3 mix1 = mix(ownColor.rgb, color.rgb, innerGlowAlpha / (innerGlowAlpha + ownColor.a));","vec3 mix2 = mix(mix1, color.rgb, outerGlowAlpha / (innerGlowAlpha + ownColor.a + outerGlowAlpha));","float resultAlpha = min(ownColor.a + outerGlowAlpha + innerGlowAlpha, 1.);","gl_FragColor = vec4(mix2 * resultAlpha, resultAlpha);","}"].join("\n"),this.uniforms={projectionVector:{type:"2f",value:{x:0,y:0},dirty:!0},distance:{type:"1f",value:15,dirty:!0},angle:{type:"1f",value:1,dirty:!0},color:{type:"4f",value:{x:1,y:0,z:0,w:0},dirty:!0},alLine truncated
|
||||
for(var n=0;r>n;n++){var a=e[n];this.context.clearRect(a.minX,a.minY,a.width,a.height)}if(r>0){if(this.$hasScissor||1!=r)this.scissorEnabled=!1;else{var a=e[0];e=e.slice(1);var s=a.minX+t,o=a.minY+i,h=a.width,l=a.height;this.context.enableScissor(s,-o-l+this.height,h,l),this.scissorEnabled=!0}e.length>0?(this.context.pushMask(e),this.maskPushed=!0):this.maskPushed=!1,this.offsetX=t,this.offsetY=i}else this.maskPushed=!1;this.context.popBuffer()},o.endClip=function(){(this.maskPushed||this.scissorEnabled)&&(this.context.pushBuffer(this),this.maskPushed&&(this.setTransform(1,0,0,1,this.offsetX,this.offsetY),this.context.popMask()),this.scissorEnabled&&this.context.disableScissor(),this.context.popBuffer())},o.getPixels=function(e,t,i,r){void 0===i&&(i=1),void 0===r&&(r=1);var n=new Uint8Array(4*i*r),a=this.rootRenderTarget.useFrameBuffer;this.rootRenderTarget.useFrameBuffer=!0,this.rootRenderTarget.activate(),this.context.getPixels(e,t,i,r,n),this.rootRenderTarget.useFrameBuffer=a,this.rootRenderTarget.activate();for(var s=new Uint8Array(4*i*r),o=0;r>o;o++)for(var h=0;i>h;h++)s[4*(i*(r-o-1)+h)]=n[4*(i*o+h)],s[4*(i*(r-o-1)+h)+1]=n[4*(i*o+h)+1],s[4*(i*(r-o-1)+h)+2]=n[4*(i*o+h)+2],s[4*(i*(r-o-1)+h)+3]=n[4*(i*o+h)+3];return s},o.toDataURL=function(e,t){return this.context.surface.toDataURL(e,t)},o.destroy=function(){this.context.destroy()},o.onRenderFinish=function(){this.$drawCalls=0,this.root&&(!this._dirtyRegionPolicy&&this.dirtyRegionPolicy&&this.drawSurfaceToFrameBuffer(0,0,this.rootRenderTarget.width,this.rootRenderTarget.height,0,0,this.rootRenderTarget.width,this.rootRenderTarget.height,!0),this._dirtyRegionPolicy&&this.drawFrameBufferToSurface(0,0,this.rootRenderTarget.width,this.rootRenderTarget.height,0,0,this.rootRenderTarget.width,this.rootRenderTarget.height),this._dirtyRegionPolicy=this.dirtyRegionPolicy)},o.drawFrameBufferToSurface=function(e,t,i,r,n,a,s,o,h){void 0===h&&(h=!1),this.rootRenderTarget.useFrameBuffer=!1,this.rootRenderTarget.activate(),this.context.disableStencilTest(),this.context.disableScissorTest(),this.setTransform(1,0,0,1,0,0),this.globalAlpha=1,this.context.setGlobalCompositeOperation("source-over"),h&&this.context.clear(),this.context.drawImage(this.rootRenderTarget,e,t,i,r,n,a,s,o,i,r),this.context.$drawWebGL(),this.rootRenderTarget.useFrameBuffer=!0,this.rootRenderTarget.activate(),this.restoreStencil(),this.restoreScissor()},o.drawSurfaceToFrameBuffer=function(e,t,i,r,n,a,s,o,h){void 0===h&&(h=!1),this.rootRenderTarget.useFrameBuffer=!0,this.rootRenderTarget.activate(),this.context.disableStencilTest(),this.context.disableScissorTest(),this.setTransform(1,0,0,1,0,0),this.globalAlpha=1,this.context.setGlobalCompositeOperation("source-over"),h&&this.context.clear(),this.context.drawImage(this.context.surface,e,t,i,r,n,a,s,o,i,r),this.context.$drawWebGL(),this.rootRenderTarget.useFrameBuffer=!1,this.rootRenderTarget.activate(),this.restoreStencil(),this.restoreScissor()},o.clear=function(){this.context.clear()},o.setTransform=function(e,t,i,r,n,a){var s=this.globalMatrix;s.a=e,s.b=t,s.c=i,s.d=r,s.tx=n,s.ty=a},o.transform=function(e,t,i,r,n,a){var s=this.globalMatrix,o=s.a,h=s.b,l=s.c,u=s.d;(1!=e||0!=t||0!=i||1!=r)&&(s.a=e*o+t*l,s.b=e*h+t*u,s.c=i*o+r*l,s.d=i*h+r*u),s.tx=n*o+a*l+s.tx,s.ty=n*h+a*u+s.ty},o.translate=function(e,t){var i=this.globalMatrix;i.tx+=e,i.ty+=t},o.saveTransform=function(){var e=this.globalMatrix,t=this.savedGlobalMatrix;t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.tx=e.tx,t.ty=e.ty},o.restoreTransform=function(){var e=this.globalMatrix,t=this.savedGlobalMatrix;e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.tx=t.tx,e.ty=t.ty},n.create=function(e,t){var i=r.pop();if(i){i.resize(e,t);var a=i.globalMatrix;a.a=1,a.b=0,a.c=0,a.d=1,a.tx=0,a.ty=0}else i=new n(e,t),i.$computeDrawCall=!1;return i},n.release=function(e){r.push(e)},n}(e.HashObject);t.WebGLRenderBuffer=i,e.registerClass(i,"egret.web.WebGLRenderBuffer",["egret.sys.RenderBuffer"]);var r=[]}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var i=["source-over","lighter","destination-out"],r="source-over",n=[],a=function(){function a(){this.nestLevel=0}var s=(__define,a),o=s.prototype;return o.render=function(e,t,i,r,a){this.nestLevel++;var s=t,o=s.context,h=a?e:null;o.pushBuffer(s),this.drawDisplayObject(e,s,r,i,null,null,h),o.$drawWebGL();var l=s.$drawCalls;if(s.onRenderFinish(),o.popBuffer(),this.nestLevel--,0===this.nestLevel){n.length>6&&(n.length=6);for(var u=n.length,c=0;u>c;c++)n[c].resize(0,0)}return l},o.drawDisplayObject=function(t,i,r,n,a,s,o){var h,l=0;if(a&&!o?(a.isDirty&&(l+=a.drawToSurface()),h=a.$renderNode):h=t.$getRenderNode(),h){if(r){var u=h.renderRegion;if(s&&!s.intersects(u))h.needRedraw=!1;else if(!h.needRedraw)for(var c=r.length,d=0;c>d;d++)if(u.intersects(r[d])){h.needRedraw=!0;break}}else h.needRedraw=!0;if(h.needRedraw){l++;var f=void 0,p=void 0;o?(f=t.$getConcatenatedAlphaAt(o,t.$getConcatenatedAlpha()),p=e.Matrix.create().copyFrom(t.$getConcatenatedMatrix()),t.$getLine truncated
|
||||
Reference in new issue
Block a user