2022-06-20 10:56:40 +08:00

1 line
6.0 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","_loop_1","node","route","on","toggle","isChecked","cur_1","destroyAllChildren","assetManager","loadBundle","err","load","Prefab","prefab","addChild","instantiate","_b","__values","_c","next","done","_d","__read","value","__decorate","Node","Component","exports","default","Main","version","string","sp","Label","labelRetinaScale","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,EAAAhB,KAAAK,UAAA;UACIU,QAAA;UACAC,MAAA;aAGJ,EAAAhB,KAAAM,SAAA;UACIS,QAAA;UACAC,MAAA;aAGJ,E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gB,WAAA,kBAAA;MAG1B+B,WAAA,EADChD,SAAAH,GAAAoD,SACwBhD,SAAAgB,WAAA,iBAAA;MAxBRhB,WAAA+C,WAAA,EADpBjD,WACoBE;MAmGrB,OAAAA;KAnGA,CAAAJ,GAAAqD;IAAqBC,QAAAC,UAAAnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICHf,IAAAL,KAAAC,GAAAC,YAAAC,UAAAH,GAAAG,SAAAC,WAAAJ,GAAAI;IAGN,IAAAqD,OAAA,SAAAnD;MAAkCC,UAAAkD,MAAAnD;MAAlC,SAAAmD;QAAA,IAAAjD,QAAA,SAAAF,UAAAA,OAAAG,MAAAC,MAAAC,cAAAD;QAGIF,MAAAkD,UAAA;;;MAGUD,KAAApC,UAAAC,QAAA;QACNZ,KAAAgD,QAAAC,SAAA,eAAA1D,GAAA2D,GAAAF,UAAA;;MAJJN,WAAA,EADChD,SAAAH,GAAA4D,UACwBJ,KAAApC,WAAA,gBAAA;MAHRoC,OAAAL,WAAA,EADpBjD,WACoBsD;MAUrB,OAAAA;KAVA,CAAAxD,GAAAqD;IAAqBC,QAAAC,UAAAC;IAarBxD,GAAA2D,GAAAE,mBAAA;IACA7D,GAAA8D,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 }\n\n\n initBtns() {\n for (const [node, route] of this.map) {\n node.on('toggle', (toggle: cc.Toggle) => {\n if (toggle.isChecked) {\n const cur = ++this.tick;\n\n this.mainArea.destroyAllChildren();\n\n if (route) {\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\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.dynamicAtlasManager.maxFrameSize = 2048;\n"],"file":"index.js"}