@ives_xxz/packages 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/AddComponent/main.js +32 -0
  2. package/AddComponent/package.json +26 -0
  3. package/AddComponent/panel/index.js +233 -0
  4. package/AddComponent/readme.md +38 -0
  5. package/AddComponent/scene-accessor.js +109 -0
  6. package/AddComponent/template-auto-dock.js +73 -0
  7. package/BitmapFontTools/i18n/en.js +1 -0
  8. package/BitmapFontTools/i18n/zh.js +1 -0
  9. package/BitmapFontTools/main.js +1 -0
  10. package/BitmapFontTools/package-lock.json +83 -0
  11. package/BitmapFontTools/package.json +37 -0
  12. package/BitmapFontTools/panel/font.css +1 -0
  13. package/BitmapFontTools/panel/font.js +58 -0
  14. package/BitmapFontTools/panel/font_panel.js +1 -0
  15. package/BitmapFontTools/panel/ttf.css +1 -0
  16. package/BitmapFontTools/panel/ttf.js +68 -0
  17. package/BitmapFontTools/panel/ttf_panel.js +1 -0
  18. package/FWAssetsFinder/main.js +9 -0
  19. package/FWAssetsFinder/package.json +20 -0
  20. package/FWAssetsFinder/panel/index.css +2 -0
  21. package/FWAssetsFinder/panel/index.html +52 -0
  22. package/FWAssetsFinder/panel/index.js +265 -0
  23. package/FWAssetsFinder/panel/less.css +71 -0
  24. package/FWAssetsFinder/panel/scene.js +194 -0
  25. package/FWExcelGenerator/main.js +367 -0
  26. package/FWExcelGenerator/package-lock.json +109 -0
  27. package/FWExcelGenerator/package.json +23 -0
  28. package/FWExcelGenerator/panel/index.js +648 -0
  29. package/FWLayerGenerator/main.js +186 -0
  30. package/FWLayerGenerator/package.json +21 -0
  31. package/FWLayerGenerator/panel/index.css +36 -0
  32. package/FWLayerGenerator/panel/index.html +17 -0
  33. package/FWLayerGenerator/panel/index.js +29 -0
  34. package/FWMask/inspector.js +26 -0
  35. package/FWMask/main.js +16 -0
  36. package/FWMask/package.json +6 -0
  37. package/FWPolygonPoints/main.js +149 -0
  38. package/FWPolygonPoints/package.json +9 -0
  39. package/PNG Auto Compress/CHANGELOG.md +32 -0
  40. package/PNG Auto Compress/LICENSE +21 -0
  41. package/PNG Auto Compress/README.md +113 -0
  42. package/PNG Auto Compress/config-manager.js +72 -0
  43. package/PNG Auto Compress/i18n/en.js +14 -0
  44. package/PNG Auto Compress/i18n/zh.js +14 -0
  45. package/PNG Auto Compress/images/setting.png +0 -0
  46. package/PNG Auto Compress/jsconfig.json +1 -0
  47. package/PNG Auto Compress/main.js +377 -0
  48. package/PNG Auto Compress/package.json +41 -0
  49. package/PNG Auto Compress/panel.setting/index.css +13 -0
  50. package/PNG Auto Compress/panel.setting/index.html +51 -0
  51. package/PNG Auto Compress/panel.setting/index.js +124 -0
  52. package/PNG Auto Compress/pngquant/macos/COPYRIGHT +687 -0
  53. package/PNG Auto Compress/pngquant/macos/README.md +78 -0
  54. package/PNG Auto Compress/pngquant/macos/pngquant +0 -0
  55. package/PNG Auto Compress/pngquant/macos/pngquant-compat +0 -0
  56. package/PNG Auto Compress/pngquant/windows/COPYRIGHT +687 -0
  57. package/PNG Auto Compress/pngquant/windows/Drag PNG here to reduce palette automatically.bat +11 -0
  58. package/PNG Auto Compress/pngquant/windows/Drag PNG here to reduce palette to 256.bat +10 -0
  59. package/PNG Auto Compress/pngquant/windows/README.txt +78 -0
  60. package/PNG Auto Compress/pngquant/windows/pngquant.exe +0 -0
  61. package/PNG Auto Compress/typings/cocos/editor.d.ts +1053 -0
  62. package/PNG Auto Compress/utils/file-utils.js +67 -0
  63. package/Quick Finder/CHANGELOG.md +100 -0
  64. package/Quick Finder/LICENSE +21 -0
  65. package/Quick Finder/README.en.md +141 -0
  66. package/Quick Finder/README.md +149 -0
  67. package/Quick Finder/i18n/en.js +42 -0
  68. package/Quick Finder/i18n/zh.js +42 -0
  69. package/Quick Finder/images/assets/animation-clip.png +0 -0
  70. package/Quick Finder/images/assets/asset.png +0 -0
  71. package/Quick Finder/images/assets/atlas.png +0 -0
  72. package/Quick Finder/images/assets/audio-clip.png +0 -0
  73. package/Quick Finder/images/assets/auto-atlas.png +0 -0
  74. package/Quick Finder/images/assets/bitmap-font.png +0 -0
  75. package/Quick Finder/images/assets/buffer.png +0 -0
  76. package/Quick Finder/images/assets/coffeescript.png +0 -0
  77. package/Quick Finder/images/assets/component.png +0 -0
  78. package/Quick Finder/images/assets/css.png +0 -0
  79. package/Quick Finder/images/assets/dragonbones-atlas.png +0 -0
  80. package/Quick Finder/images/assets/folder.png +0 -0
  81. package/Quick Finder/images/assets/html.png +0 -0
  82. package/Quick Finder/images/assets/javascript.png +0 -0
  83. package/Quick Finder/images/assets/json.png +0 -0
  84. package/Quick Finder/images/assets/label-atlas.png +0 -0
  85. package/Quick Finder/images/assets/markdown.png +0 -0
  86. package/Quick Finder/images/assets/material.png +0 -0
  87. package/Quick Finder/images/assets/mesh.png +0 -0
  88. package/Quick Finder/images/assets/mount.png +0 -0
  89. package/Quick Finder/images/assets/node.png +0 -0
  90. package/Quick Finder/images/assets/particle.png +0 -0
  91. package/Quick Finder/images/assets/physics-material.png +0 -0
  92. package/Quick Finder/images/assets/prefab.png +0 -0
  93. package/Quick Finder/images/assets/raw-asset.png +0 -0
  94. package/Quick Finder/images/assets/scene.png +0 -0
  95. package/Quick Finder/images/assets/shader.png +0 -0
  96. package/Quick Finder/images/assets/skeleton.png +0 -0
  97. package/Quick Finder/images/assets/spine.png +0 -0
  98. package/Quick Finder/images/assets/sprite-animation.png +0 -0
  99. package/Quick Finder/images/assets/sprite-atlas.png +0 -0
  100. package/Quick Finder/images/assets/sprite-frame.png +0 -0
  101. package/Quick Finder/images/assets/text.png +0 -0
  102. package/Quick Finder/images/assets/tiled-map.png +0 -0
  103. package/Quick Finder/images/assets/ttf-font.png +0 -0
  104. package/Quick Finder/images/assets/typescript.png +0 -0
  105. package/Quick Finder/images/search.png +0 -0
  106. package/Quick Finder/images/settings.png +0 -0
  107. package/Quick Finder/images/update.png +0 -0
  108. package/Quick Finder/images/version.png +0 -0
  109. package/Quick Finder/jsconfig.json +17 -0
  110. package/Quick Finder/lib/node-fetch.js +1649 -0
  111. package/Quick Finder/lib/vue.global.prod.js +7 -0
  112. package/Quick Finder/package.json +45 -0
  113. package/Quick Finder/src/common/config-manager.js +122 -0
  114. package/Quick Finder/src/eazax/browser-util.js +61 -0
  115. package/Quick Finder/src/eazax/color-util.js +37 -0
  116. package/Quick Finder/src/eazax/css/cocos-class.css +202 -0
  117. package/Quick Finder/src/eazax/css/cocos-tag.css +197 -0
  118. package/Quick Finder/src/eazax/css/eazax-colors.css +18 -0
  119. package/Quick Finder/src/eazax/editor-main-kit.js +53 -0
  120. package/Quick Finder/src/eazax/editor-main-util.js +112 -0
  121. package/Quick Finder/src/eazax/editor-renderer-kit.js +26 -0
  122. package/Quick Finder/src/eazax/file-util.js +158 -0
  123. package/Quick Finder/src/eazax/i18n.js +36 -0
  124. package/Quick Finder/src/eazax/main-event.js +81 -0
  125. package/Quick Finder/src/eazax/package-util.js +47 -0
  126. package/Quick Finder/src/eazax/renderer-event.js +80 -0
  127. package/Quick Finder/src/eazax/updater.js +92 -0
  128. package/Quick Finder/src/eazax/version-util.js +61 -0
  129. package/Quick Finder/src/eazax/window-util.js +80 -0
  130. package/Quick Finder/src/main/finder.js +101 -0
  131. package/Quick Finder/src/main/index.js +155 -0
  132. package/Quick Finder/src/main/opener.js +95 -0
  133. package/Quick Finder/src/main/panel-manager.js +159 -0
  134. package/Quick Finder/src/renderer/search/index.css +222 -0
  135. package/Quick Finder/src/renderer/search/index.html +46 -0
  136. package/Quick Finder/src/renderer/search/index.js +348 -0
  137. package/Quick Finder/src/renderer/settings/index.css +101 -0
  138. package/Quick Finder/src/renderer/settings/index.html +86 -0
  139. package/Quick Finder/src/renderer/settings/index.js +219 -0
  140. package/Quick Finder/typings/cocos/editor.d.ts +1053 -0
  141. package/Quick Finder/typings/vue.d.ts +1 -0
  142. package/README.md +93 -0
  143. package/package.json +12 -0
  144. package/unpack plist/main.js +253 -0
  145. package/unpack plist/package.json +13 -0
  146. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/CHANGELOG.md +30 -0
  147. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/LICENSE +21 -0
  148. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/README.en.md +111 -0
  149. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/README.md +115 -0
  150. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/i18n/en.js +55 -0
  151. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/i18n/zh.js +55 -0
  152. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/images/search.png +0 -0
  153. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/images/settings.png +0 -0
  154. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/images/update.png +0 -0
  155. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/images/version.png +0 -0
  156. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/jsconfig.json +17 -0
  157. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/lib/node-fetch.js +1649 -0
  158. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/lib/vue.global.prod.js +7 -0
  159. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/package.json +44 -0
  160. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/common/config-manager.js +104 -0
  161. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/browser-util.js +61 -0
  162. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/color-util.js +37 -0
  163. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/css/cocos-class.css +201 -0
  164. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/css/cocos-tag.css +197 -0
  165. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/css/eazax-colors.css +18 -0
  166. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/editor-main-kit.js +53 -0
  167. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/editor-main-util.js +147 -0
  168. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/editor-renderer-kit.js +26 -0
  169. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/file-util.js +158 -0
  170. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/i18n.js +36 -0
  171. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/main-event.js +81 -0
  172. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/package-util.js +47 -0
  173. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/renderer-event.js +80 -0
  174. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/updater.js +92 -0
  175. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/version-util.js +61 -0
  176. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/eazax/window-util.js +80 -0
  177. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/main/editor-api.js +90 -0
  178. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/main/finder.js +248 -0
  179. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/main/index.js +155 -0
  180. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/main/object-util.js +70 -0
  181. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/main/panel-manager.js +86 -0
  182. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/main/parser.js +161 -0
  183. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/main/printer.js +108 -0
  184. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/renderer/settings/index.css +61 -0
  185. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/renderer/settings/index.html +90 -0
  186. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/src/renderer/settings/index.js +191 -0
  187. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/typings/cocos/editor.d.ts +1053 -0
  188. package//345/274/225/347/224/250/346/237/245/346/211/276/345/231/250/typings/vue.d.ts +1 -0
@@ -0,0 +1 @@
1
+ const panel=Editor.require("packages://bitmap-font/panel/ttf.js");function loadCss(e,t){e&&(Array.isArray(t)||(t=[t]),t.forEach((t=>{const a=CSS.escape(t);if(!e.querySelector(`#${a}`)){const s=document.createElement("link");s.rel="stylesheet",s.href=t,s.id=a,e.appendChild(s)}})))}Editor.Panel.extend({template:'<div id="app" style="width:100%;height:100%;display:flex;">ttf</div>',messages:{},ready(...e){loadCss(this.shadowRoot,"packages://bitmap-font/panel/ttf.css"),loadCss(document.head,"packages://bitmap-font/panel/ttf.css");let t=panel;panel&&panel.default&&(t=panel.default);let a=t;if("function"==typeof t&&(a=new t),a.hasOwnProperty("ready")&&"function"==typeof a.ready){const t=this.shadowRoot.getElementById("app");a.ready(t||this.shadowRoot,e)}}});
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ load() {},
3
+ unload() {},
4
+ messages: {
5
+ 'open': function() {
6
+ Editor.Panel.open('find-assets');
7
+ }
8
+ }
9
+ };
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "find-assets",
3
+ "version": "1.0.0",
4
+ "description": "The package template for getting started.",
5
+ "author": "ives",
6
+ "main": "main.js",
7
+ "main-menu": {
8
+ "i18n:MAIN_MENU.package.title/i18n:资源引用查找器": {
9
+ "message": "find-assets:open"
10
+ }
11
+ },
12
+ "panel": {
13
+ "main": "panel/index.js",
14
+ "type": "dockable",
15
+ "title": "资源引用查找器",
16
+ "engineSupport": true,
17
+ "width": 500,
18
+ "height": 600
19
+ }
20
+ }
@@ -0,0 +1,2 @@
1
+ :host { margin: 5px; }
2
+ h2 { color: #f90; }
@@ -0,0 +1,52 @@
1
+ <div id="warp" class="warp">
2
+
3
+ <ui-prop name="指定场景或预制体(可选):" tooltip="只在指定的场景或预制体中查找" style="height: 43px; display: flex;">
4
+ <ui-asset type="native-asset" v-value="prefabUuid" class="flex-1">
5
+ </ui-asset>
6
+ </ui-prop>
7
+
8
+ <ui-prop name="assets:" tooltip="直接拖动资源查询" style="height: 43px; display: flex;">
9
+ <ui-asset type="native-asset" v-value="assetUuid" class="flex-1">
10
+ </ui-asset>
11
+ </ui-prop>
12
+
13
+ <ui-prop name="脚本名:" tooltip="区分大小写,模糊查询后点击右边的下拉框选择符合的脚本">
14
+ <ui-input class="flex-1" v-value="inputName" v-on:confirm="onInputName"></ui-input>
15
+ <ui-select class="flex-1" v-value="compName" v-on:change="onSelected">
16
+ <template v-for="item in compNames">
17
+ <option v-bind:value="item">{{item}}</option>
18
+ </template>
19
+ </ui-select>
20
+ </ui-prop>
21
+
22
+ <ui-prop name="">
23
+ <div class="self-end layout center horizontal">
24
+
25
+ <ui-button class="self-end green" v-on:confirm="onRefresh">刷新</ui-button>
26
+ <ui-button v-on:confirm="onClean">清除</ui-button>
27
+ </div>
28
+ </ui-prop>
29
+
30
+ <ui-prop>
31
+ <div class>{{resultTip}}</div>
32
+ </ui-prop>
33
+
34
+ <section>
35
+ <ul>
36
+ <li>
37
+ <div class="scene">场景或预制体</div>
38
+ <div class="path">路径</div>
39
+ <div class="controller">操作</div>
40
+ </li>
41
+ <li v-for="item in items">
42
+ <div class="scene" :title="item.scene">{{item.scene}}</div>
43
+ <div class="path" :title="item.path">{{item.path}}</div>
44
+ <div class="controller">
45
+ <ui-button v-on:confirm="jumpRes(item.uuid)">路径</ui-button>
46
+ <ui-button v-on:confirm="jumpScene(item)">跳转</ui-button>
47
+ </div>
48
+ </li>
49
+ </ul>
50
+ </section>
51
+
52
+ </div>
@@ -0,0 +1,265 @@
1
+ var FS = require("fire-fs"),
2
+ PATH = require("fire-path"),
3
+ fse = require("fs-extra"),
4
+ Scene = Editor.require("packages://find-assets/panel/scene"),
5
+ $jscomp$compprop0 = {};
6
+ Editor.Panel.extend({
7
+ style: FS.readFileSync(Editor.url("packages://find-assets/panel/less.css", "utf8")),
8
+ template: FS.readFileSync(Editor.url("packages://find-assets/panel/index.html", "utf8")),
9
+ $: {},
10
+ ready: function() {
11
+ window.plugin = new window.Vue({
12
+ el: this.shadowRoot,
13
+ created: function() {
14
+ Editor.assetdb.queryAssets("db://assets/**/*", ["javascript","typescript"],
15
+ function(a, b) {
16
+ for (a = 0; a < b.length; a++) {
17
+ var c = b[a].url.replace("db://assets/", "");
18
+ this.scriptsArr.push(c)
19
+ }
20
+ this.systemScripts = "cc.Scene cc.Node cc.Sprite cc.Label cc.RichText cc.Layout cc.Button cc.ParticleSystem cc.ScrollView cc.PageView cc.ProgressBar cc.Toggle cc.EditBox cc.WebView cc.VideoPlayer".split(" ");
21
+ this.scriptsArr.push.apply(this.scriptsArr, this.systemScripts)
22
+ }.bind(this))
23
+ },
24
+ data: {
25
+ prefabUuid: "",
26
+ compName: "",
27
+ compNames: [],
28
+ inputName: "",
29
+ scriptsArr: [],
30
+ systemScripts: [],
31
+ assetUuid: "",
32
+ nodeId: null,
33
+ item: null,
34
+ items: [],
35
+ assetItems: [],
36
+ nameItems: [],
37
+ resultTip: "\u641c\u7d22\u7ed3\u679c",
38
+ tips: "",
39
+ isNeedParam: !1,
40
+ paramName: "",
41
+ paramValue: ""
42
+ },
43
+ watch: {
44
+ assetUuid: function() {
45
+ this.searchByAsset()
46
+ }
47
+ },
48
+ methods: {
49
+ onNeedParam: function() {
50
+ this.isNeedParam = !this.isNeedParam;
51
+ this.paramValue = this.paramName = ""
52
+ },
53
+ onRefresh: function() {
54
+ this.inputName ? this.searchByName() : this.assetUuid && this.searchByAsset()
55
+ },
56
+ onSelected: function() {
57
+ this.inputName = this.compName;
58
+ this.searchByName()
59
+ },
60
+ onInputName: function() {
61
+ this.inputName && (this.compNames = this.fuzzyQuery(this.scriptsArr, this.inputName))
62
+ },
63
+ fuzzyQuery: function(a, b) {
64
+ b = new RegExp(b, 'i');
65
+ for (var c = [], e = 0; e < a.length; e++) b.test(a[e]) && c.push(a[e]);
66
+ return c
67
+ },
68
+ onClean: function() {
69
+ this.items = [];
70
+ this.item = null;
71
+ this.compName = "";
72
+ this.compNames = [];
73
+ this.prefabUuid = this.tips = this.resultTip = this.assetUuid = this.inputName = "";
74
+ this.isNeedParam = !1;
75
+ this.paramValue = this.paramName = ""
76
+ },
77
+ onDoubleSearch: function() {
78
+ for (var a = [], b = 0; b < this.assetItems.length; b++) for (var c = 0; c < this.nameItems.length; c++) this.nameItems[c].scene == this.assetItems[b].scene && this.nameItems[c].path == this.assetItems[b].path && a.push(this.nameItems[c]);
79
+ this.items = a;
80
+ this.tips = this.getTips(this.assetName + " \u548c " + this.scriptName);
81
+ this.resultTip = this.tips + " \u7684\u641c\u7d22\u7ed3\u679c";
82
+ Editor.success(this.tips + "\u7684\u53cc\u6761\u4ef6\u67e5\u8be2\u7ed3\u675f")
83
+ },
84
+ getTips: function(a) {
85
+ if (this.prefabUuid) {
86
+ var b = Editor.remote.assetdb.uuidToUrl(this.prefabUuid).split("/");
87
+ return "\u5728" + b[b.length - 1] + "\u4e0b" + a
88
+ }
89
+ return a
90
+ },
91
+ searchByAsset: function() {
92
+ if (this.assetUuid) {
93
+ var a = Editor.assetdb.remote.uuidToUrl(this.assetUuid).split("/");
94
+ this.assetName = a[a.length - 1];
95
+ this.tips = this.getTips(this.assetName);
96
+ this.resultTip = this.tips + " \u7684\u641c\u7d22\u7ed3\u679c";
97
+ this.assetItems = this.resourcePath(this.assetUuid)
98
+ }
99
+ },
100
+ searchByName: function() {
101
+ if (this.inputName) if ( - 1 == this.systemScripts.indexOf(this.inputName)) {
102
+ var a = this.inputName.split("/");
103
+ this.scriptName = a[a.length - 1];
104
+ this.tips = this.getTips(this.scriptName);
105
+ this.resultTip = this.tips + " \u7684\u641c\u7d22\u7ed3\u679c";
106
+ this.nameItems = this.resourcePath(Editor.assetdb.remote.urlToUuid("db://assets/" + this.inputName))
107
+ } else this.tips = this.getTips(this.inputName),
108
+ this.resultTip = this.tips + " \u7684\u641c\u7d22\u7ed3\u679c",
109
+ this.nameItems = this.resourcePath(this.inputName)
110
+ },
111
+ resourcePath: function(a) {
112
+ this.item = this.nodeId = null;
113
+ var b = this.items = [],
114
+ c = this.paramName,
115
+ e = this.paramValue;
116
+ if (this.prefabUuid) {
117
+ var d = Editor.assetdb.remote.assetInfoByUuid(this.prefabUuid);
118
+ d.destPath = Editor.assetdb.remote.loadMetaByUuid(this.prefabUuid).dests()[0];
119
+ var h = Scene.search(d, a, c, e);
120
+ 0 < h.length && h.forEach(function(a) {
121
+ b.push({
122
+ scene: PATH.basename(d.path),
123
+ path: a.path,
124
+ uuid: d.uuid,
125
+ nodeId: a.uuid
126
+ })
127
+ });
128
+ Editor.success(this.tips + "\u67e5\u8be2\u7ed3\u675f");
129
+ return b
130
+ }
131
+ Editor.assetdb.queryAssets("db://assets/**/*", "scene",
132
+ function(d, g) {
133
+ g.forEach(function(d) {
134
+ var f = Scene.search(d, a, c, e);
135
+ 0 < f.length && f.forEach(function(a) {
136
+ b.push({
137
+ scene: PATH.basename(d.path),
138
+ path: a.path,
139
+ uuid: d.uuid,
140
+ nodeId: a.uuid
141
+ })
142
+ })
143
+ })
144
+ });
145
+ Editor.assetdb.queryAssets("db://assets/**/*", "prefab",
146
+ function(d, g) {
147
+ g.forEach(function(d) {
148
+ var f = Scene.search(d, a, c, e);
149
+ 0 < f.length && f.forEach(function(a) {
150
+ b.push({
151
+ scene: PATH.basename(d.path),
152
+ path: a.path,
153
+ uuid: d.uuid,
154
+ nodeId: a.uuid
155
+ })
156
+ })
157
+ });
158
+ Editor.success(this.tips + "\u67e5\u8be2\u7ed3\u675f")
159
+ }.bind(this));
160
+ return b
161
+ },
162
+ jumpRes: function(a) {
163
+ Editor.Ipc.sendToAll("assets:hint", a)
164
+ },
165
+ jumpScene: function(a) {
166
+ const assetUrl = Editor.remote.assetdb.uuidToUrl(a.uuid);
167
+ this.isPrefabMode = assetUrl.endsWith('.prefab');
168
+
169
+ // 生成标准化路径
170
+ const assetPath = assetUrl
171
+ .replace('db://assets/', '')
172
+ .replace(/\.\w+$/, '');
173
+
174
+ // 在预制体模式下保持原始节点路径
175
+ if ( this.isPrefabMode) {
176
+ this.prefabRootPath = assetPath;
177
+ }
178
+ this.nodeId = a.nodeId;
179
+ var b = a.uuid,
180
+ c = Editor.remote.assetdb.uuidToUrl(b).split(".");
181
+ c = c[c.length - 1];
182
+ "prefab" == c ? (this.item = a, Editor.Ipc.sendToAll("scene:enter-prefab-edit-mode", b)) : "fire" == c && Editor.Ipc.sendToMain("scene:open-by-uuid", b)
183
+ },
184
+ highlight: function(a) {
185
+ var b = this;
186
+ a.nodeId ? (Editor.Selection.select("node", a.nodeId),
187
+ Editor.Ipc.sendToAll("hierarchy:hint", a.nodeId)) :
188
+ Editor.Ipc.sendToPanel("scene", "scene:query-hierarchy",
189
+ function(c, e, d) {
190
+ if (c) return Editor.error(c);
191
+ // 修复1: 直接使用场景根节点而不是数组第一个元素
192
+
193
+ var rootNode = d[0];
194
+ // 修复2: 正确构建根节点路径
195
+ var rootPath = rootNode.name;
196
+ // 修复3: 匹配根节点或子节点
197
+ var nodeId = (a.path === rootPath) ? rootNode.id :
198
+ b.getNodeIdByPath(a.path, rootNode);
199
+ if (nodeId) {
200
+ Editor.Selection.select("node", nodeId);
201
+ Editor.Ipc.sendToAll("hierarchy:hint", nodeId);
202
+ } else {
203
+ Editor.error("找不到节点: " + a.path);
204
+ }
205
+ })
206
+ },
207
+
208
+ getNodeIdByPath: function(targetPath, node, currentPath = '') {
209
+ if (!node) return null;
210
+
211
+ // 使用正确的作用域变量
212
+ const nodePath = this.isPrefabMode
213
+ ? node.name
214
+ : (currentPath ? `${currentPath}/${node.name}` : node.name);
215
+
216
+ // 精确匹配目标路径的最后部分
217
+ if (nodePath === targetPath || nodePath.endsWith(`/${targetPath}`)) {
218
+ return node.id;
219
+ }
220
+
221
+ // 遍历子节点
222
+ if (node.children) {
223
+ for (const child of node.children) {
224
+ const found = this.getNodeIdByPath(
225
+ targetPath,
226
+ child,
227
+ this.isPrefabMode ? '' : nodePath // 预制体模式不传递路径
228
+ );
229
+ if (found) return found;
230
+ }
231
+ }
232
+ return null;
233
+ },
234
+ }
235
+ })
236
+ },
237
+ messages: ($jscomp$compprop0.addLog = function(a, b) {
238
+ window.plugin.addLog(b)
239
+ },
240
+ $jscomp$compprop0["scene:ready"] = function() {
241
+ var a = window.plugin.nodeId;
242
+ a && setTimeout(function() {
243
+ Editor.Selection.select("node", a);
244
+ Editor.Ipc.sendToAll("hierarchy:hint", a)
245
+ },
246
+ 500);
247
+ window.plugin.nodeId = null
248
+ },
249
+ $jscomp$compprop0["scene:enter-prefab-edit-mode"] = function() {
250
+ if (window.plugin && window.plugin.item) {
251
+ var a = window.plugin.item;
252
+ a && setTimeout(function() {
253
+ Editor.Ipc.sendToPanel("scene", "scene:query-hierarchy",
254
+ function(b, c, e) {
255
+ if (b) return Editor.error(b);
256
+ if (b = a.path == e[0].name ? e[0].id: window.plugin.getNodeIdByPath(a.path, e[0])) Editor.Selection.select("node", b),
257
+ Editor.Ipc.sendToAll("hierarchy:hint", b)
258
+ })
259
+ },
260
+ 1E3);
261
+ window.plugin.item = null
262
+ }
263
+ },
264
+ $jscomp$compprop0)
265
+ });
@@ -0,0 +1,71 @@
1
+ @import url('app://bower_components/fontawesome/css/font-awesome.min.css');
2
+ :host {
3
+ display: flex;
4
+ }
5
+ #warp {
6
+ margin: 10px;
7
+ display: flex;
8
+ flex: 1;
9
+ flex-direction: column;
10
+ overflow: hidden;
11
+ }
12
+ header {
13
+ display: flex;
14
+ height: 50px;
15
+ }
16
+ header ui-prop {
17
+ display: flex;
18
+ flex: 1;
19
+ }
20
+ header ui-prop ui-asset {
21
+ flex: 1;
22
+ }
23
+ header i.fa {
24
+ margin: 6px 2px;
25
+ padding: 12px 6px;
26
+ cursor: pointer;
27
+ font-size: 14px;
28
+ }
29
+ section {
30
+ flex: 1;
31
+ border-radius: 4px;
32
+ border: 1px solid #666;
33
+ padding: 10px;
34
+ overflow: auto;
35
+ }
36
+ ul {
37
+ margin: 0;
38
+ padding: 0;
39
+ }
40
+ ul li {
41
+ padding: 4px 10px;
42
+ list-style: none;
43
+ display: flex;
44
+ border-bottom: 1px solid #666666;
45
+ }
46
+ ul li:last-child {
47
+ border-bottom: none;
48
+ }
49
+ ul li > div {
50
+ padding: 4px 6px;
51
+ overflow: hidden;
52
+ text-overflow: ellipsis;
53
+ white-space: nowrap;
54
+ }
55
+ ul li .scene {
56
+ width: 200px;
57
+ color: #f84b4b;
58
+ }
59
+ ul li .path {
60
+ flex: 1;
61
+ color: #52c41a;
62
+ }
63
+ ul li .controller {
64
+ width: 145px;
65
+ color: #412df5;
66
+ }
67
+ ul li .controller i {
68
+ margin: 0 2px;
69
+ padding: 0 4px;
70
+ cursor: pointer;
71
+ }
@@ -0,0 +1,194 @@
1
+ var $jscomp = $jscomp || {};
2
+ $jscomp.scope = {};
3
+ $jscomp.arrayIteratorImpl = function(a) {
4
+ var b = 0;
5
+ return function() {
6
+ return b < a.length ? {
7
+ done: !1,
8
+ value: a[b++]
9
+ }: {
10
+ done: !0
11
+ }
12
+ }
13
+ };
14
+ $jscomp.arrayIterator = function(a) {
15
+ return {
16
+ next: $jscomp.arrayIteratorImpl(a)
17
+ }
18
+ };
19
+ $jscomp.ASSUME_ES5 = !1;
20
+ $jscomp.ASSUME_NO_NATIVE_MAP = !1;
21
+ $jscomp.ASSUME_NO_NATIVE_SET = !1;
22
+ $jscomp.SIMPLE_FROUND_POLYFILL = !1;
23
+ $jscomp.defineProperty = $jscomp.ASSUME_ES5 || "function" == typeof Object.defineProperties ? Object.defineProperty: function(a, b, c) {
24
+ a != Array.prototype && a != Object.prototype && (a[b] = c.value)
25
+ };
26
+ $jscomp.getGlobal = function(a) {
27
+ return "undefined" != typeof window && window === a ? a: "undefined" != typeof global && null != global ? global: a
28
+ };
29
+ $jscomp.global = $jscomp.getGlobal(this);
30
+ $jscomp.SYMBOL_PREFIX = "jscomp_symbol_";
31
+ $jscomp.initSymbol = function() {
32
+ $jscomp.initSymbol = function() {};
33
+ $jscomp.global.Symbol || ($jscomp.global.Symbol = $jscomp.Symbol)
34
+ };
35
+ $jscomp.SymbolClass = function(a, b) {
36
+ this.$jscomp$symbol$id_ = a;
37
+ $jscomp.defineProperty(this, "description", {
38
+ configurable: !0,
39
+ writable: !0,
40
+ value: b
41
+ })
42
+ };
43
+ $jscomp.SymbolClass.prototype.toString = function() {
44
+ return this.$jscomp$symbol$id_
45
+ };
46
+ $jscomp.Symbol = function() {
47
+ function a(c) {
48
+ if (this instanceof a) throw new TypeError("Symbol is not a constructor");
49
+ return new $jscomp.SymbolClass($jscomp.SYMBOL_PREFIX + (c || "") + "_" + b++, c)
50
+ }
51
+ var b = 0;
52
+ return a
53
+ } ();
54
+ $jscomp.initSymbolIterator = function() {
55
+ $jscomp.initSymbol();
56
+ var a = $jscomp.global.Symbol.iterator;
57
+ a || (a = $jscomp.global.Symbol.iterator = $jscomp.global.Symbol("Symbol.iterator"));
58
+ "function" != typeof Array.prototype[a] && $jscomp.defineProperty(Array.prototype, a, {
59
+ configurable: !0,
60
+ writable: !0,
61
+ value: function() {
62
+ return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))
63
+ }
64
+ });
65
+ $jscomp.initSymbolIterator = function() {}
66
+ };
67
+ $jscomp.initSymbolAsyncIterator = function() {
68
+ $jscomp.initSymbol();
69
+ var a = $jscomp.global.Symbol.asyncIterator;
70
+ a || (a = $jscomp.global.Symbol.asyncIterator = $jscomp.global.Symbol("Symbol.asyncIterator"));
71
+ $jscomp.initSymbolAsyncIterator = function() {}
72
+ };
73
+ $jscomp.iteratorPrototype = function(a) {
74
+ $jscomp.initSymbolIterator();
75
+ a = {
76
+ next: a
77
+ };
78
+ a[$jscomp.global.Symbol.iterator] = function() {
79
+ return this
80
+ };
81
+ return a
82
+ };
83
+ $jscomp.iteratorFromArray = function(a, b) {
84
+ $jscomp.initSymbolIterator();
85
+ a instanceof String && (a += "");
86
+ var c = 0,
87
+ d = {
88
+ next: function() {
89
+ if (c < a.length) {
90
+ var e = c++;
91
+ return {
92
+ value: b(e, a[e]),
93
+ done: !1
94
+ }
95
+ }
96
+ d.next = function() {
97
+ return {
98
+ done: !0,
99
+ value: void 0
100
+ }
101
+ };
102
+ return d.next()
103
+ }
104
+ };
105
+ d[Symbol.iterator] = function() {
106
+ return d
107
+ };
108
+ return d
109
+ };
110
+ $jscomp.polyfill = function(a, b, c, d) {
111
+ if (b) {
112
+ c = $jscomp.global;
113
+ a = a.split(".");
114
+ for (d = 0; d < a.length - 1; d++) {
115
+ var e = a[d];
116
+ e in c || (c[e] = {});
117
+ c = c[e]
118
+ }
119
+ a = a[a.length - 1];
120
+ d = c[a];
121
+ b = b(d);
122
+ b != d && null != b && $jscomp.defineProperty(c, a, {
123
+ configurable: !0,
124
+ writable: !0,
125
+ value: b
126
+ })
127
+ }
128
+ };
129
+ $jscomp.polyfill("Array.prototype.keys",
130
+ function(a) {
131
+ return a ? a: function() {
132
+ return $jscomp.iteratorFromArray(this,
133
+ function(a) {
134
+ return a
135
+ })
136
+ }
137
+ },
138
+ "es6", "es3");
139
+ var Fs = require("fire-fs"),
140
+ getParent = function(a, b) {
141
+ var c = null;
142
+ try {
143
+ switch (b.__type__) {
144
+ case "cc.Node":
145
+ b._parent && (c = b._parent.__id__);
146
+ break;
147
+ case "cc.PrefabInfo":
148
+ c = b.root.__id__;
149
+ break;
150
+ case "cc.Scene":
151
+ break;
152
+ default:
153
+ c = b.node.__id__
154
+ }
155
+ } catch(d) {
156
+ Editor.warn(d),
157
+ Editor.warn(b)
158
+ }
159
+ return a[c]
160
+ };
161
+ exports.conversion = function(a, b) {
162
+ for (var c = [b._name], d = ""; b = getParent(a, b);)"cc.Node" === b.__type__ && (d || (d = b._id), c.splice(0, 0, b._name));
163
+ c = c.filter(function(a) {
164
+ return !! a
165
+ });
166
+ return {
167
+ path: c.join("/"),
168
+ uuid: d
169
+ }
170
+ };
171
+ exports.search = function(a, b, c, d) {
172
+ var e = [],
173
+ g = Fs.readJsonSync(a.destPath);
174
+ a = {};
175
+ for (var h = 0; h < g.length; a = {
176
+ $jscomp$loop$prop$item$2: a.$jscomp$loop$prop$item$2
177
+ },
178
+ h++) {
179
+ a.$jscomp$loop$prop$item$2 = g[h];
180
+ if (Editor.Utils.UuidUtils.decompressUuid(a.$jscomp$loop$prop$item$2.__type__) === b) {
181
+ if (c && a.$jscomp$loop$prop$item$2[c] != d) continue;
182
+ var k = exports.conversion(g, a.$jscomp$loop$prop$item$2);
183
+ e.push(k)
184
+ }
185
+ Object.keys(a.$jscomp$loop$prop$item$2).some(function(a) {
186
+ return function(f) {
187
+ if ((f = a.$jscomp$loop$prop$item$2[f]) && f.__uuid__ === b && "cc.PrefabInfo" != a.$jscomp$loop$prop$item$2.__type__ && (!c || a.$jscomp$loop$prop$item$2[c] == d)) return f = exports.conversion(g, a.$jscomp$loop$prop$item$2),
188
+ e.push(f),
189
+ !0
190
+ }
191
+ } (a))
192
+ }
193
+ return e
194
+ };