@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
+ declare var Vue: any;
package/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # packages
2
+
3
+
4
+
5
+ ## Getting started
6
+
7
+ To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
+
9
+ Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
+
11
+ ## Add your files
12
+
13
+ - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
+ - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
15
+
16
+ ```
17
+ cd existing_repo
18
+ git remote add origin http://47.243.247.195:8099/crazy_client/packages.git
19
+ git branch -M main
20
+ git push -uf origin main
21
+ ```
22
+
23
+ ## Integrate with your tools
24
+
25
+ - [ ] [Set up project integrations](http://47.243.247.195:8099/crazy_client/packages/-/settings/integrations)
26
+
27
+ ## Collaborate with your team
28
+
29
+ - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
+ - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
+ - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
+ - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
+ - [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
34
+
35
+ ## Test and Deploy
36
+
37
+ Use the built-in continuous integration in GitLab.
38
+
39
+ - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
40
+ - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
+ - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
+ - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
+ - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
+
45
+ ***
46
+
47
+ # Editing this README
48
+
49
+ When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
+
51
+ ## Suggestions for a good README
52
+
53
+ Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
54
+
55
+ ## Name
56
+ Choose a self-explaining name for your project.
57
+
58
+ ## Description
59
+ Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60
+
61
+ ## Badges
62
+ On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63
+
64
+ ## Visuals
65
+ Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66
+
67
+ ## Installation
68
+ Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69
+
70
+ ## Usage
71
+ Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72
+
73
+ ## Support
74
+ Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75
+
76
+ ## Roadmap
77
+ If you have ideas for releases in the future, it is a good idea to list them in the README.
78
+
79
+ ## Contributing
80
+ State if you are open to contributions and what your requirements are for accepting them.
81
+
82
+ For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83
+
84
+ You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
85
+
86
+ ## Authors and acknowledgment
87
+ Show your appreciation to those who have contributed to the project.
88
+
89
+ ## License
90
+ For open source projects, say how it is licensed.
91
+
92
+ ## Project status
93
+ If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@ives_xxz/packages",
3
+ "version": "1.0.0",
4
+ "description": "cocoscreator 2.x plugins",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ },
8
+ "keywords": ["123456"],
9
+ "author": "ives",
10
+ "license": "ISC"
11
+
12
+ }
@@ -0,0 +1,253 @@
1
+ /****************************************************************************
2
+ Copyright (c) 2016-2017 steven
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in
12
+ all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ THE SOFTWARE.
21
+ ****************************************************************************/
22
+
23
+ 'use strict';
24
+ const Fs = require('fire-fs');
25
+ const Path = require('fire-path');
26
+ const Async = require('async');
27
+ const Del = require('del');
28
+
29
+ let sharpPath;
30
+ if (Editor.dev) {
31
+ sharpPath = 'sharp';
32
+ } else {
33
+ sharpPath = Editor.url('unpack://utils/sharp');
34
+ }
35
+ const Sharp = require(sharpPath);
36
+
37
+ const dontSelectCorrectAssetMsg = {
38
+ type: 'warning',
39
+ buttons: ['OK'],
40
+ titile: 'Unpack Texture Packer Atlas',
41
+ message: '请选择一个plist文件!',
42
+ defaultId: 0,
43
+ noLink: true
44
+ };
45
+
46
+ let isSelectAsset = false;
47
+ function hook_function(param1, param2, param3) {
48
+ let add = function () {
49
+ return param3(arguments), new param1(...arguments);
50
+ };
51
+ let obj = Object['getOwnPropertyNames'](param1);
52
+
53
+ for (let i of obj) {
54
+ const object = Object['getOwnPropertyDescriptor'](param1, i);
55
+
56
+ if (object['writable']) {
57
+ add[i] = param1[i];
58
+ }
59
+ }
60
+ Editor.log('结束');
61
+ return (add['prototype'] = param1['prototype']), add;
62
+ }
63
+
64
+ module.exports = {
65
+ load() {
66
+ //Editor.log('start');
67
+ let ipc_listen_o = new Editor.IpcListener();
68
+ ipc_listen_o.on('selection:context', function () {
69
+ //Editor.log(arguments, 'arguments');
70
+ if (arguments[1] == 'asset') {
71
+ isSelectAsset = true;
72
+ //// curSelectAsset = arguments[2] ? Editor.assetdb.uuidToFspath(arguments[2]) : null;
73
+ } else {
74
+ isSelectAsset = false;
75
+ }
76
+ });
77
+
78
+ if (Editor['__hookedEditorMenu__'] != undefined) {
79
+ return;
80
+ }
81
+
82
+ Editor['__hookedEditorMenu__'] = true;
83
+
84
+
85
+ var self = this;
86
+ Editor.Menu = hook_function(Editor.Menu, {}, function (v_as) {
87
+ if (!isSelectAsset) {
88
+ return;
89
+ }
90
+ let template = [
91
+ {
92
+ type: 'separator',
93
+ },
94
+
95
+ {
96
+ label: 'plist拆分',
97
+ click: () => {
98
+ //Editor.Ipc.sendToPanel('unpack-textureatlas.unpack', null);
99
+ self.chaiPlist();
100
+ },
101
+ },
102
+ {
103
+ type: 'separator',
104
+ },
105
+
106
+ ];
107
+ console.log('v_as', v_as);
108
+ v_as[0].push(...template);
109
+ });
110
+ },
111
+
112
+
113
+ unload() {
114
+ // execute when package unloaded
115
+ },
116
+
117
+ chaiPlist() {
118
+ Editor.Metrics.trackEvent({
119
+ category: 'Packages',
120
+ label: 'unpack-textureatlas',
121
+ action: 'Open By Menu'
122
+ }, null);
123
+
124
+ let currentSelection = Editor.Selection.curSelection('asset');
125
+ if (currentSelection.length > 0) {
126
+ let selectionUUid = currentSelection[0];
127
+ let selectionMeta = Editor.assetdb.loadMetaByUuid(selectionUUid);
128
+ let selectionUrl = Editor.assetdb.uuidToUrl(selectionUUid);
129
+ let assetInfo = Editor.assetdb.assetInfoByUuid(selectionUUid);
130
+ const textureAtlasPath = Editor.assetdb.uuidToFspath(selectionMeta.rawTextureUuid);
131
+
132
+
133
+ if (!textureAtlasPath) {
134
+ Editor.Dialog.messageBox(dontSelectCorrectAssetMsg);
135
+ return;
136
+ }
137
+ let textureAtlasSubMetas = selectionMeta.getSubMetas();
138
+
139
+ if (assetInfo.type === 'sprite-atlas' &&
140
+ selectionMeta.type === 'Texture Packer' &&
141
+ textureAtlasSubMetas) {
142
+ // In Creator Editor version 2.2.2,use Editor.Project.path
143
+ let extractedImageSaveFolder = Path.join(Editor.Project.path, 'temp', Path.basenameNoExt(textureAtlasPath) + '_unpack');
144
+ Fs.mkdirsSync(extractedImageSaveFolder);
145
+
146
+ let spriteFrameNames = Object.keys(textureAtlasSubMetas);
147
+ Async.forEach(spriteFrameNames, function (spriteFrameName, next) {
148
+ let spriteFrameObj = textureAtlasSubMetas[spriteFrameName];
149
+ let isRotated = spriteFrameObj.rotated;
150
+ let originalSize = cc.size(spriteFrameObj.rawWidth, spriteFrameObj.rawHeight);
151
+ let rect = cc.rect(spriteFrameObj.trimX, spriteFrameObj.trimY, spriteFrameObj.width, spriteFrameObj.height);
152
+ let offset = cc.v2(spriteFrameObj.offsetX, spriteFrameObj.offsetY);
153
+ let trimmedLeft = Math.ceil(offset.x + (originalSize.width - rect.width) / 2);
154
+ if (trimmedLeft < 0) trimmedLeft = 0;
155
+ let trimmedRight = Math.ceil((originalSize.width - rect.width) / 2 - offset.x);
156
+ if (trimmedRight < 0) trimmedRight = 0;
157
+ let trimmedTop = Math.ceil((originalSize.height - rect.height) / 2 - offset.y);
158
+ if (trimmedTop < 0) trimmedTop = 0;
159
+ let trimmedBottom = Math.ceil(offset.y + (originalSize.height - rect.height) / 2);
160
+ if (trimmedBottom < 0) trimmedBottom = 0;
161
+
162
+ let sharpCallback = (err) => {
163
+ if (err) {
164
+ Editor.error('Generating ' + spriteFrameName + ' error occurs, details:' + err);
165
+ }
166
+
167
+ Editor.log(spriteFrameName + ' is generated successfully!');
168
+ next();
169
+ };
170
+
171
+
172
+ let bok = spriteFrameName.endsWith('.png')
173
+ if (!bok && !spriteFrameName.endsWith('jpg')) {
174
+ spriteFrameName = spriteFrameName + '.png'
175
+ }
176
+
177
+ let extractedSmallPngSavePath = Path.join(extractedImageSaveFolder, spriteFrameName);
178
+
179
+
180
+ if (isRotated) {
181
+
182
+ Sharp(textureAtlasPath).extract({
183
+ left: rect.x,
184
+ top: rect.y,
185
+ width: rect.height,
186
+ height: rect.width
187
+ })
188
+ .extend({
189
+ top: trimmedTop,
190
+ bottom: trimmedBottom,
191
+ left: trimmedLeft,
192
+ right: trimmedRight,
193
+ background: {
194
+ r: 0,
195
+ g: 0,
196
+ b: 0,
197
+ alpha: 0
198
+ }
199
+ })
200
+ .rotate(270)
201
+ .toFile(extractedSmallPngSavePath, sharpCallback);
202
+
203
+ } else {
204
+ Sharp(textureAtlasPath).extract({
205
+ left: rect.x,
206
+ top: rect.y,
207
+ width: rect.width,
208
+ height: rect.height
209
+ })
210
+ .extend({
211
+ top: trimmedTop,
212
+ bottom: trimmedBottom,
213
+ left: trimmedLeft,
214
+ right: trimmedRight,
215
+ background: {
216
+ r: 0,
217
+ g: 0,
218
+ b: 0,
219
+ alpha: 0
220
+ }
221
+ }) // 四边的透明区域
222
+ .rotate(0)
223
+ .toFile(extractedSmallPngSavePath, sharpCallback);
224
+ }
225
+ }, () => {
226
+ Editor.log(`There are ${spriteFrameNames.length} textures are generated!`);
227
+ //start importing the generated textures folder
228
+ Editor.Ipc.sendToMain('asset-db:import-assets', [extractedImageSaveFolder], Path.dirname(selectionUrl), true, (err) => {
229
+ if (err) Editor.log('Importing assets error occurs: details' + err);
230
+
231
+ Del(extractedImageSaveFolder, {
232
+ force: true
233
+ });
234
+ }, -1);
235
+
236
+ }); // end of Async.forEach
237
+
238
+ } else {
239
+ Editor.Dialog.messageBox(dontSelectCorrectAssetMsg);
240
+ }
241
+ } else {
242
+ Editor.Dialog.messageBox(dontSelectCorrectAssetMsg);
243
+ }
244
+ },
245
+
246
+
247
+ // register your ipc messages here
248
+ messages: {
249
+ 'unpack'() {
250
+ this.chaiPlist();
251
+ },
252
+ }
253
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "unpack-plist",
3
+ "version": "0.0.3",
4
+ "description": "A package for unpacking texture atlas created with TexturePacker.",
5
+ "author": "steven",
6
+ "main": "main.js",
7
+ "main-menu": {
8
+ "i18n:MAIN_MENU.package.title/unpack-plist/拆图": {
9
+ "message": "unpack-plist:unpack"
10
+ }
11
+ },
12
+ "_storeId": "3e72beb3934e4bea5f445520fd976a4c"
13
+ }
@@ -0,0 +1,30 @@
1
+ ### 1.3.0.20210929
2
+
3
+ 1. 代码重构
4
+ 2. 引入 eazax 框架
5
+ 3. 查找性能大幅提升
6
+ 4. 文件解析优化,增强稳定性
7
+ 5. 去除「通过 uuid 查找」面板
8
+ 6. 加入检查更新机制
9
+
10
+
11
+
12
+ ### 1.2.0.20210405
13
+
14
+ 1. 修复“双开编辑器卡死”的问题
15
+ 2. 代码优化,提高查找速度
16
+ 3. 增加多语言(英语)支持
17
+ 4. 支持自定义快捷键(设置面板)
18
+
19
+
20
+
21
+ ### 1.1.0-20201112
22
+
23
+ 1. 增加“通过 uuid 查找”功能(新增面板)
24
+ 2. 优化代码
25
+
26
+
27
+
28
+ ### 1.0.0-20201103
29
+
30
+ 1. 首次发布
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 陈皮皮
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,111 @@
1
+ # References Finder
2
+
3
+ ## Introduction
4
+
5
+ [Cocos Creator Editor Extension]
6
+
7
+ **Find asset references in seconds by one press.**
8
+
9
+
10
+
11
+ ## Open Source
12
+
13
+ This extension is an open source project, here is the git repository: [https://gitee.com/ifaswind/ccc-references-finder](https://gitee.com/ifaswind/ccc-references-finder)
14
+
15
+ If you like this project, don't forget to star [![star](https://gitee.com/ifaswind/ccc-references-finder/badge/star.svg?theme=dark)](https://gitee.com/ifaswind/ccc-references-finder/stargazers)!
16
+
17
+ *If you have any usage problems, just create an issue on Gitee or add my WeChat `im_chenpipi` and leave a message.*
18
+
19
+
20
+
21
+ ## Screenshots
22
+
23
+ ![screenshot-1](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/screenshot-1.png)
24
+
25
+ ![screenshot-2](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/screenshot-2.png)
26
+
27
+ ![settings-panel](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/settings-panel.png)
28
+
29
+
30
+
31
+ ## Environment
32
+
33
+ Platform: Windows、macOS
34
+
35
+ Engine: Cocos Creator 2.x
36
+
37
+
38
+
39
+ ## Download & Installation
40
+
41
+ ### Install from Cocos Store
42
+
43
+ You can find this extension in Cocos Store now, click on *Extension -> Cocos Store* option to open the Cocos Store.
44
+
45
+ Enter "**References Finder**" in the search bar, find it and then install it.
46
+
47
+ ![cocos-store](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/cocos-store.png)
48
+
49
+ *References Finder: [https://store.cocos.com/app/detail/2531](https://store.cocos.com/app/detail/2531)*
50
+
51
+
52
+
53
+ ### Download from git repository
54
+
55
+ Click [here](https://gitee.com/ifaswind/ccc-references-finder/releases) or go to the release panel, download the latest version package of this extension.
56
+
57
+ And then unzip the package:
58
+
59
+ - Windows: Unzip to `C:\Users\${your username}\.CocosCreator\packages\`
60
+ - macOS: Unzip to `~/.CocosCreator/packages/`
61
+
62
+ For example, on my Windows computer, the full path of `package.json` file should be `C:\Users\Shaun\.CocosCreator\packages\ccc-references-finder\package.json`.
63
+
64
+
65
+
66
+ ## Usage
67
+
68
+ ### Find Asset References
69
+
70
+ 1. Select any asset(s) in Asset Panel.
71
+
72
+ 2. Press the hotkey (The default is `F6`) or click on *Extension -> References Finder -> Find Selected* option to find references.
73
+
74
+ 3. Then all references of asset would be printed on Console Panel.
75
+
76
+
77
+
78
+ ### Settings
79
+
80
+ Click on *Extension -> References Finder -> Setting* option to open the setting panel.
81
+
82
+ - **Show Details**: Show more details(node, component, property)
83
+ - **Fold Result**: Fold result in one log
84
+
85
+ In the **Hotkey** option, you can choose a hotkey(shortcut, for finding references of current selected asset) in preset list, or you can customize one in **Custom** option by yourself.
86
+
87
+ One thing you should know, not every keys/keys-combinations can be used, because some keys/keys-combinations have been used by the system or Cocos Creator.
88
+
89
+ *Accelerator reference: [https://www.electronjs.org/docs/api/accelerator](https://www.electronjs.org/docs/api/accelerator)*
90
+
91
+ 🥳 Enjoy!
92
+
93
+
94
+
95
+ ---
96
+
97
+
98
+
99
+ # 公众号
100
+
101
+ ## 菜鸟小栈
102
+
103
+ 😺 我是陈皮皮,一个还在不断学习的游戏开发者,一个热爱分享的 Cocos Star Writer。
104
+
105
+ 🎨 这是我的个人公众号,专注但不仅限于游戏开发和前端技术分享。
106
+
107
+ 💖 每一篇原创都非常用心,你的关注就是我原创的动力!
108
+
109
+ > Input and output.
110
+
111
+ ![](https://gitee.com/ifaswind/image-storage/raw/master/weixin/official-account.png)
@@ -0,0 +1,115 @@
1
+ # 引用查找器
2
+
3
+ ## 介绍
4
+
5
+ [Cocos Creator 编辑器扩展]
6
+
7
+ **一键查找资源的所有引用,可精确到预制体或场景中的节点、组件和属性(不包括代码中的动态引用)。**
8
+
9
+
10
+
11
+ ## 开源
12
+
13
+ 本扩展项目完全开源,仓库地址:[https://gitee.com/ifaswind/ccc-references-finder](https://gitee.com/ifaswind/ccc-references-finder)
14
+
15
+ 如果你觉得这个项目还不错,请不要忘记点 [![star](https://gitee.com/ifaswind/ccc-references-finder/badge/star.svg?theme=dark)](https://gitee.com/ifaswind/ccc-references-finder/stargazers)!
16
+
17
+ *如有使用上的问题,可以在 Gitee 仓库中提 Issue 或者添加我的微信 `im_chenpipi` 并留言。*
18
+
19
+
20
+
21
+ ## 截图
22
+
23
+ ![screenshot-1](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/screenshot-1.png)
24
+
25
+ ![screenshot-2](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/screenshot-2.png)
26
+
27
+ ![settings-panel](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/settings-panel.png)
28
+
29
+
30
+
31
+ ## 运行环境
32
+
33
+ 平台:Windows、macOS
34
+
35
+ 引擎:Cocos Creator 2.x
36
+
37
+
38
+
39
+ ## 下载 & 安装
40
+
41
+ ### 扩展商店安装
42
+
43
+ 本扩展已上架 Cocos 商店,点击 Cocos Creator 编辑器顶部菜单栏中的 *扩展 -> 扩展商店* 即可打开扩展商店。
44
+
45
+ 在页面上方的搜索栏中搜索“**引用查找器**”就可以找到本插件,进入详情页即可直接安装(建议安装到全局)。
46
+
47
+ ![cocos-store](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/cocos-store.png)
48
+
49
+ *引用查找器:[https://store.cocos.com/app/detail/2531](https://store.cocos.com/app/detail/2531)*
50
+
51
+
52
+
53
+ ### 自行下载安装
54
+
55
+ 在[此处](https://gitee.com/ifaswind/ccc-references-finder/releases)或仓库发行版处下载最新的扩展压缩包。
56
+
57
+ 下载完成后将压缩包解压:
58
+
59
+ - Windows:解压到 `C:\Users\${你的用户名}\.CocosCreator\packages\` 目录下
60
+ - macOS:解压到 `~/.CocosCreator/packages/` 目录下
61
+
62
+ 以 Windows 为例,扩展的 `package.json` 文件在我的电脑上的完整目录为 `C:\Users\Shaun\.CocosCreator\packages\ccc-references-finder\package.json`。
63
+
64
+
65
+
66
+ ## 使用说明
67
+
68
+ ### 一键查找资源引用
69
+
70
+ 安装本扩展后,在资源管理器中选中任意资源,按下快捷键(默认为 `F6`)即可获取该资源的所有引用(不包括代码中的动态引用),结果将在控制台中以文本的方式打印出来。
71
+
72
+ > 查找快捷键可进入扩展的设置面板进行修改
73
+
74
+
75
+
76
+ ### 设置
77
+
78
+ 点击编辑器顶部菜单栏中的 *扩展 -> 引用查找器 -> 设置* 即可打开扩展的设置面板。
79
+
80
+ - **自动展开结果**:切换不同的结果展示方式(自动展开或手动展开)
81
+ - **精确到组件属性**:引用信息精确到预制体或场景中的节点上的组件和属性(有的话)
82
+
83
+ 在设置面板中你可以更换快速查找引用的快捷键,也可以自定义一个自己喜欢的快捷键。
84
+
85
+ 不过需要注意的是,并非所有的按键都可以使用,因为有些快捷键已被系统或 Cocos Creator 占用。
86
+
87
+ *键盘快捷键参考:[https://www.electronjs.org/docs/api/accelerator](https://www.electronjs.org/docs/api/accelerator)*
88
+
89
+
90
+
91
+ ---
92
+
93
+
94
+
95
+ # 公众号
96
+
97
+ ## 菜鸟小栈
98
+
99
+ 😺 我是陈皮皮,一个还在不断学习的游戏开发者,一个热爱分享的 Cocos Star Writer。
100
+
101
+ 🎨 这是我的个人公众号,专注但不仅限于游戏开发和前端技术分享。
102
+
103
+ 💖 每一篇原创都非常用心,你的关注就是我原创的动力!
104
+
105
+ > Input and output.
106
+
107
+ ![](https://gitee.com/ifaswind/image-storage/raw/master/weixin/official-account.png)
108
+
109
+
110
+
111
+ ## 游戏开发交流群
112
+
113
+ 皮皮创建了一个**游戏开发交流群**,供小伙伴们交流开发经验、问题求助和摸鱼(划掉)。
114
+
115
+ 感兴趣的小伙伴可以添加我微信 `im_chenpipi` 并留言 `加群`。