window.__require=function e(r,t,n){function c(o,a){if(!t[o]){if(!r[o]){var u=o.split("/");if(u=u[u.length-1],!r[u]){var d="function"==typeof __require&&__require;if(!a&&d)return d(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+o+"'")}}var p=t[o]={exports:{}};r[o][0].call(p.exports,function(e){return c(r[o][1][e]||e)},p,p.exports,e,r,t,n)}return t[o].exports}for(var i="function"==typeof __require&&__require,o=0;o<n.length;o++)c(n[o]);return c}({Home:[function(e,r,t){"use strict";cc._RF.push(r,"24d006uysBPPL1WfuFgiflf","Home"),Object.defineProperty(t,"__esModule",{value:!0});var n=cc._decorator,c=n.ccclass,i=n.property,o=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.camera=null,r.targetsp=null,r.image=null,r.renderTexture=null,r.curr=0,r}return __extends(r,e),r.prototype.start=function(){},r.prototype.onBtnClick=function(){var e=this;cc.loader.loadRes("1_"+this.curr.toFixed(),cc.SpriteFrame,function(r,t){r?cc.error(r):(e.image.spriteFrame=t,e.scheduleOnce(function(){e.camera.targetTexture&&e.camera.targetTexture.destroy(),e.renderTexture=new cc.RenderTexture,e.renderTexture.packable=!1,e.renderTexture.initWithSize(e.image.node.width,e.image.node.height,cc.gfx.RB_FMT_S8),e.camera.targetTexture=e.renderTexture,e.scheduleOnce(function(){e.camera.render(e.image.node);var r=e.renderTexture.readPixels(),t=new cc.RenderTexture;t.packable=!1,t.initWithSize(580,670),t.initWithData(Uint8Array.from(r),cc.Texture2D.PixelFormat.RGBA8888,580,670),e.targetsp.spriteFrame=new cc.SpriteFrame(t)})}))}),this.curr+=1,this.curr=Math.round(this.curr%3)},__decorate([i(cc.Camera)],r.prototype,"camera",void 0),__decorate([i(cc.Sprite)],r.prototype,"targetsp",void 0),__decorate([i(cc.Sprite)],r.prototype,"image",void 0),r=__decorate([c],r)}(cc.Component);t.default=o,cc._RF.pop()},{}]},{},["Home"]);