mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-01-15 07:21:07 +00:00
1 line
6.4 KiB
Plaintext
1 line
6.4 KiB
Plaintext
{"version":3,"sources":["assets/left-area.ts","assets/main.ts"],"names":["_a","cc","_decorator","ccclass","property","LeftArea","_super","__extends","_this","apply","this","arguments","home","multiMaterial","multiBatcher","charMode","highDPI","spineBatch","spineSkin","mainArea","tick","prototype","start","map","Map","bundle","path","initBtns","switchPage","get","_loop_1","node","route","on","toggle","isChecked","_b","__values","_c","next","done","_d","__read","value","cur","destroyAllChildren","assetManager","loadBundle","err","load","Prefab","prefab","addChild","instantiate","__decorate","Node","Component","exports","default","Main","version","string","sp","Label","labelRetinaScale","charAtlasAutoBatchCount","macro","CLEANUP_IMAGE_CACHE","dynamicAtlasManager","maxFrameSize"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAM,IAAAA,KAAAC,GAAAC,YAAAC,UAAAH,GAAAG,SAAAC,WAAAJ,GAAAI;IAGN,IAAAC,WAAA,SAAAC;MAAsCC,UAAAF,UAAAC;MAAtC,SAAAD;QAAA,IAAAG,QAAA,SAAAF,UAAAA,OAAAG,MAAAC,MAAAC,cAAAD;QAGIF,MAAAI,OAAA;QAGAJ,MAAAK,gBAAA;QAGAL,MAAAM,eAAA;QAGAN,MAAAO,WAAA;QAGAP,MAAAQ,UAAA;QAGAR,MAAAS,aAAA;QAGAT,MAAAU,YAAA;QAGAV,MAAAW,WAAA;QAEAX,MAAAY,OAAA;;;MAKAf,SAAAgB,UAAAC,QAAA;QACIZ,KAAAa,MAAA,IAAAC,IAAA,EAEI,EAAAd,KAAAE,MAAA;UACIa,QAAA;UACAC,MAAA;aAGJ,EAAAhB,KAAAG,eAAA;UACIY,QAAA;UACAC,MAAA;aAGJ,EAAAhB,KAAAI,cAAA;UACIW,QAAA;UACAC,MAAA;aAGJ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A,qBAAA;MAG7BiC,WAAA,EADClD,SAAAH,GAAAsD,SACwBlD,SAAAgB,WAAA,iBAAA;MAGzBiC,WAAA,EADClD,SAAAH,GAAAsD,SACuBlD,SAAAgB,WAAA,gBAAA;MAGxBiC,WAAA,EADClD,SAAAH,GAAAsD,SAC0BlD,SAAAgB,WAAA,mBAAA;MAG3BiC,WAAA,EADClD,SAAAH,GAAAsD,SACyBlD,SAAAgB,WAAA,kBAAA;MAG1BiC,WAAA,EADClD,SAAAH,GAAAsD,SACwBlD,SAAAgB,WAAA,iBAAA;MAxBRhB,WAAAiD,WAAA,EADpBnD,WACoBE;MA2GrB,OAAAA;KA3GA,CAAAJ,GAAAuD;IAAqBC,QAAAC,UAAArD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICHf,IAAAL,KAAAC,GAAAC,YAAAC,UAAAH,GAAAG,SAAAC,WAAAJ,GAAAI;IAGN,IAAAuD,OAAA,SAAArD;MAAkCC,UAAAoD,MAAArD;MAAlC,SAAAqD;QAAA,IAAAnD,QAAA,SAAAF,UAAAA,OAAAG,MAAAC,MAAAC,cAAAD;QAGIF,MAAAoD,UAAA;;;MAGUD,KAAAtC,UAAAC,QAAA;QACNZ,KAAAkD,QAAAC,SAAA,eAAA5D,GAAA6D,GAAAF,UAAA;;MAJJN,WAAA,EADClD,SAAAH,GAAA8D,UACwBJ,KAAAtC,WAAA,gBAAA;MAHRsC,OAAAL,WAAA,EADpBnD,WACoBwD;MAUrB,OAAAA;KAVA,CAAA1D,GAAAuD;IAAqBC,QAAAC,UAAAC;IAarB1D,GAAA6D,GAAAE,mBAAA;IACA/D,GAAA6D,GAAAG,0BAAA;IACAhE,GAAAiE,MAAAC,sBAAA;IACAlE,GAAAmE,oBAAAC,eAAA","sourcesContent":["const { ccclass, property } = cc._decorator;\n\n@ccclass\nexport default class LeftArea extends cc.Component {\n\n @property(cc.Node)\n home: cc.Node = null;\n\n @property(cc.Node)\n multiMaterial: cc.Node = null;\n\n @property(cc.Node)\n multiBatcher: cc.Node = null;\n\n @property(cc.Node)\n charMode: cc.Node = null;\n\n @property(cc.Node)\n highDPI: cc.Node = null;\n\n @property(cc.Node)\n spineBatch: cc.Node = null;\n\n @property(cc.Node)\n spineSkin: cc.Node = null;\n\n @property(cc.Node)\n mainArea: cc.Node = null;\n\n tick = 0;\n\n map: Map<cc.Node, { bundle: string, path: string }>\n\n\n start() {\n this.map = new Map([\n\n [this.home, {\n bundle: \"home\",\n path: \"home\",\n }],\n\n [this.multiMaterial, {\n bundle: \"multi-render\",\n path: \"multi-material/multi-material\",\n }],\n\n [this.multiBatcher, {\n bundle: \"multi-render\",\n path: \"multi-batcher/multi-batcher\",\n }],\n\n [this.charMode, {\n bundle: \"text-render\",\n path: \"char-mode/char-mode\",\n }],\n\n [this.highDPI, {\n bundle: \"text-render\",\n path: \"high-dpi/high-dpi\",\n }],\n\n [this.spineBatch, {\n bundle: \"spine\",\n path: \"batch/spine-batch\",\n }],\n\n [this.spineSkin, {\n bundle: \"spine\",\n path: \"skin/spine-skin\",\n }],\n\n ]);\n\n this.initBtns();\n this.switchPage(this.map.get(this.home));\n }\n\n\n initBtns() {\n for (const [node, route] of this.map) {\n node.on('toggle', (toggle: cc.Toggle) => {\n if (toggle.isChecked) {\n this.switchPage(route);\n }\n });\n }\n }\n\n\n switchPage(route: { bundle: string, path: string }) {\n const cur = ++this.tick;\n\n this.mainArea.destroyAllChildren();\n\n if (route) {\n cc.assetManager.loadBundle('common', () => {\n cc.assetManager.loadBundle(route.bundle, (err, bundle) => {\n if (!err) {\n bundle.load(route.path, cc.Prefab, (err, prefab: cc.Prefab) => {\n if (!err && cur === this.tick) {\n this.mainArea.addChild(cc.instantiate(prefab));\n }\n });\n }\n });\n });\n }\n }\n\n}\n","const { ccclass, property } = cc._decorator;\n\n@ccclass\nexport default class Main extends cc.Component {\n\n @property(cc.Label)\n version: cc.Label = null;\n\n\n protected start(): void {\n this.version.string = `Version: v${cc.sp.version}\\n`;\n }\n\n}\n\n\ncc.sp.labelRetinaScale = 2;\ncc.sp.charAtlasAutoBatchCount = 2;\ncc.macro.CLEANUP_IMAGE_CACHE = false;\ncc.dynamicAtlasManager.maxFrameSize = 2048;\n"],"file":"index.js"} |