├── .creator ├── asset-template │ └── typescript │ │ └── Custom Script Template Help Documentation.url └── default-meta.json ├── .eslintrc.js ├── .gitignore ├── LICENSE ├── assets ├── app-appinit.meta ├── app-appinit │ ├── .app-appinit.md │ ├── res.meta │ ├── res │ │ ├── logo.png │ │ ├── logo.png.meta │ │ ├── singleColor.png │ │ └── singleColor.png.meta │ ├── view.meta │ └── view │ │ ├── AppInit.prefab │ │ ├── AppInit.prefab.meta │ │ ├── AppInit.ts │ │ └── AppInit.ts.meta ├── app-builtin.meta ├── app-builtin │ ├── .app-builtin.md │ ├── app-admin.meta │ └── app-admin │ │ ├── .app-admin.md │ │ ├── executor.ts │ │ └── executor.ts.meta ├── app-scene.meta ├── app-scene │ ├── .app-scene.md │ ├── main.scene │ └── main.scene.meta ├── app.meta └── app │ ├── .app.md │ ├── app.ts │ ├── app.ts.meta │ ├── handle.ts │ ├── handle.ts.meta │ ├── setting.ts │ └── setting.ts.meta ├── cliconfig.json ├── extensions ├── app │ ├── README-CN.md │ ├── README-EN.md │ ├── assets │ │ ├── Core.ts │ │ ├── Core.ts.meta │ │ ├── app.ts.meta │ │ ├── base.meta │ │ ├── base │ │ │ ├── BaseAppInit.ts │ │ │ ├── BaseAppInit.ts.meta │ │ │ ├── BaseControl.ts │ │ │ ├── BaseControl.ts.meta │ │ │ ├── BaseController.ts │ │ │ ├── BaseController.ts.meta │ │ │ ├── BaseManager.ts │ │ │ ├── BaseManager.ts.meta │ │ │ ├── BaseModel.ts │ │ │ ├── BaseModel.ts.meta │ │ │ ├── BaseView.ts │ │ │ └── BaseView.ts.meta │ │ ├── lib.meta │ │ ├── lib │ │ │ ├── debug.meta │ │ │ ├── debug │ │ │ │ ├── debug.ts │ │ │ │ └── debug.ts.meta │ │ │ ├── logger.meta │ │ │ ├── logger │ │ │ │ ├── logger.ts │ │ │ │ └── logger.ts.meta │ │ │ ├── storage.meta │ │ │ ├── storage │ │ │ │ ├── storage.ts │ │ │ │ └── storage.ts.meta │ │ │ ├── task.meta │ │ │ └── task │ │ │ │ ├── task.ts │ │ │ │ └── task.ts.meta │ │ ├── manager.meta │ │ └── manager │ │ │ ├── MainManager.prefab │ │ │ ├── MainManager.prefab.meta │ │ │ ├── event.meta │ │ │ ├── event │ │ │ ├── EventManager.ts │ │ │ └── EventManager.ts.meta │ │ │ ├── loader.meta │ │ │ ├── loader │ │ │ ├── LoaderManager.ts │ │ │ └── LoaderManager.ts.meta │ │ │ ├── sound.meta │ │ │ ├── sound │ │ │ ├── Audio.ts │ │ │ ├── Audio.ts.meta │ │ │ ├── AudioEngine.ts │ │ │ ├── AudioEngine.ts.meta │ │ │ ├── AudioManager.ts │ │ │ ├── AudioManager.ts.meta │ │ │ ├── SoundManager.ts │ │ │ └── SoundManager.ts.meta │ │ │ ├── timer.meta │ │ │ ├── timer │ │ │ ├── TimerManager.ts │ │ │ └── TimerManager.ts.meta │ │ │ ├── ui.meta │ │ │ └── ui │ │ │ ├── UIManager.ts │ │ │ ├── UIManager.ts.meta │ │ │ ├── comp.meta │ │ │ ├── comp │ │ │ ├── UIMgrLoading.ts │ │ │ ├── UIMgrLoading.ts.meta │ │ │ ├── UIMgrShade.ts │ │ │ ├── UIMgrShade.ts.meta │ │ │ ├── UIMgrToast.ts │ │ │ ├── UIMgrToast.ts.meta │ │ │ ├── UIMgrToastCell.ts │ │ │ ├── UIMgrToastCell.ts.meta │ │ │ ├── UIMgrZOrder.ts │ │ │ └── UIMgrZOrder.ts.meta │ │ │ ├── effect.meta │ │ │ ├── effect │ │ │ ├── blur.effect │ │ │ ├── blur.effect.meta │ │ │ ├── blur.mtl │ │ │ └── blur.mtl.meta │ │ │ ├── prefab.meta │ │ │ ├── prefab │ │ │ ├── UIMgrLoading.prefab │ │ │ ├── UIMgrLoading.prefab.meta │ │ │ ├── UIMgrShade.prefab │ │ │ ├── UIMgrShade.prefab.meta │ │ │ ├── UIMgrToast.prefab │ │ │ ├── UIMgrToast.prefab.meta │ │ │ ├── UIMgrToastCell.prefab │ │ │ └── UIMgrToastCell.prefab.meta │ │ │ ├── texture.meta │ │ │ └── texture │ │ │ ├── singleColor.png │ │ │ ├── singleColor.png.meta │ │ │ ├── toastBox.png │ │ │ ├── toastBox.png.meta │ │ │ ├── toastCell.png │ │ │ └── toastCell.png.meta │ ├── engine │ │ ├── .gitignore │ │ ├── @types │ │ │ ├── editor.d.ts │ │ │ ├── electron.d.ts │ │ │ ├── extension.d.ts │ │ │ ├── index.d.ts │ │ │ ├── message.d.ts │ │ │ └── packages │ │ │ │ ├── alipay-mini-game │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── android │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── asset-db │ │ │ │ └── @types │ │ │ │ │ ├── message.d.ts │ │ │ │ │ └── public.d.ts │ │ │ │ ├── assets │ │ │ │ └── @types │ │ │ │ │ └── public.d.ts │ │ │ │ ├── baidu-mini-game │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── builder │ │ │ │ └── @types │ │ │ │ │ ├── index.d.ts │ │ │ │ │ └── public │ │ │ │ │ ├── build-plugin.d.ts │ │ │ │ │ ├── build-result.d.ts │ │ │ │ │ ├── global.d.ts │ │ │ │ │ ├── index.d.ts │ │ │ │ │ ├── message.d.ts │ │ │ │ │ ├── options.d.ts │ │ │ │ │ └── texture-compress.d.ts │ │ │ │ ├── bytedance-mini-game │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── certificate │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── channel-upload-tools │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── cocos-play │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── console │ │ │ │ └── @types │ │ │ │ │ └── pritate.d.ts │ │ │ │ ├── engine-extends │ │ │ │ └── @types │ │ │ │ │ ├── glTF.d.ts │ │ │ │ │ ├── gltf-validator.d.ts │ │ │ │ │ ├── i18n-well-defined.d.ts │ │ │ │ │ └── third-parts.d.ts │ │ │ │ ├── engine │ │ │ │ └── @types │ │ │ │ │ ├── index.d.ts │ │ │ │ │ ├── message.d.ts │ │ │ │ │ └── module.d.ts │ │ │ │ ├── huawei-agc │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── huawei-quick-game │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── ios │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── linux │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── localization-editor │ │ │ │ └── @types │ │ │ │ │ ├── gettext-parser │ │ │ │ │ └── index.d.ts │ │ │ │ │ ├── globals.d.ts │ │ │ │ │ ├── index.d.ts │ │ │ │ │ ├── intl │ │ │ │ │ └── index.d.ts │ │ │ │ │ ├── po.d.ts │ │ │ │ │ └── runtime │ │ │ │ │ ├── components │ │ │ │ │ ├── icu-component.d.ts │ │ │ │ │ ├── l10n-component.d.ts │ │ │ │ │ └── l10n-label.d.ts │ │ │ │ │ ├── core │ │ │ │ │ ├── asset-manager-initer.d.ts │ │ │ │ │ ├── auto-config-intl-manager.d.ts │ │ │ │ │ ├── icu-options.d.ts │ │ │ │ │ ├── icu-type.d.ts │ │ │ │ │ ├── l10n-listen-event.d.ts │ │ │ │ │ ├── l10n-manager.d.ts │ │ │ │ │ ├── l10n-options.d.ts │ │ │ │ │ ├── localization-global.d.ts │ │ │ │ │ └── resource-data-manager.d.ts │ │ │ │ │ ├── l10n.d.ts │ │ │ │ │ └── polyfills │ │ │ │ │ ├── Intl.DateTimeFormat.d.ts │ │ │ │ │ ├── Intl.DisplayNames.d.ts │ │ │ │ │ ├── Intl.ListFormat.d.ts │ │ │ │ │ ├── Intl.Locale.d.ts │ │ │ │ │ ├── Intl.NumberFormat.d.ts │ │ │ │ │ ├── Intl.PluralRules.d.ts │ │ │ │ │ ├── Intl.RelativeTimeFormat.d.ts │ │ │ │ │ └── Intl.getCanonicalLocales.d.ts │ │ │ │ ├── mac │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── native │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── ohos │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── open-harmonyos │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── oppo-mini-game │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── package-asset │ │ │ │ └── @types │ │ │ │ │ └── public.d.ts │ │ │ │ ├── preview │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── programming │ │ │ │ └── @types │ │ │ │ │ └── message.d.ts │ │ │ │ ├── runtime-dev-tools │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── scene │ │ │ │ └── @types │ │ │ │ │ ├── engine-view.d.ts │ │ │ │ │ ├── message.d.ts │ │ │ │ │ ├── public.d.ts │ │ │ │ │ └── scene-facade-interface.d.ts │ │ │ │ ├── server │ │ │ │ └── @types │ │ │ │ │ └── package.d.ts │ │ │ │ ├── shortcuts │ │ │ │ └── @types │ │ │ │ │ └── shortcut.d.ts │ │ │ │ ├── vivo-mini-game │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── web-desktop │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── web-mobile │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── wechatgame │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ ├── windows │ │ │ │ └── @types │ │ │ │ │ └── index.d.ts │ │ │ │ └── xiaomi-quick-game │ │ │ │ └── @types │ │ │ │ └── index.d.ts │ │ ├── dist │ │ │ ├── builder │ │ │ │ ├── hooks.js │ │ │ │ ├── index.js │ │ │ │ └── utils │ │ │ │ │ ├── file.js │ │ │ │ │ └── md5.js │ │ │ ├── inspector │ │ │ │ └── asset-directory.js │ │ │ ├── main.js │ │ │ ├── menu │ │ │ │ ├── index.js │ │ │ │ └── tinyPNG.js │ │ │ ├── panel │ │ │ │ ├── components │ │ │ │ │ ├── app-create.js │ │ │ │ │ ├── app.js │ │ │ │ │ ├── create-controller.js │ │ │ │ │ ├── create-manager.js │ │ │ │ │ ├── create-model.js │ │ │ │ │ ├── create-res.js │ │ │ │ │ ├── create-sound.js │ │ │ │ │ └── create-view.js │ │ │ │ └── index.js │ │ │ ├── scene.js │ │ │ └── utils.js │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── res │ │ │ ├── json │ │ │ │ └── builder.json │ │ │ ├── mark.js │ │ │ ├── meta │ │ │ │ ├── app-admin.meta │ │ │ │ ├── app-controller.meta │ │ │ │ ├── app-manager.meta │ │ │ │ ├── app-model.meta │ │ │ │ ├── app-sound.meta │ │ │ │ ├── custom-bundle.meta │ │ │ │ ├── resources.meta │ │ │ │ ├── view-native.meta │ │ │ │ └── view-resources.meta │ │ │ ├── panel │ │ │ │ ├── components │ │ │ │ │ ├── app.html │ │ │ │ │ ├── create-controller.html │ │ │ │ │ ├── create-manager.html │ │ │ │ │ ├── create-model.html │ │ │ │ │ ├── create-res.html │ │ │ │ │ ├── create-sound.html │ │ │ │ │ └── create-view.html │ │ │ │ ├── index.html │ │ │ │ └── styles │ │ │ │ │ └── index.css │ │ │ └── readme │ │ │ │ ├── app-admin.md │ │ │ │ ├── app-appinit.md │ │ │ │ ├── app-builtin.md │ │ │ │ ├── app-bundle.md │ │ │ │ ├── app-controller.md │ │ │ │ ├── app-manager.md │ │ │ │ ├── app-model.md │ │ │ │ ├── app-scene.md │ │ │ │ ├── app-sound.md │ │ │ │ ├── app-view.md │ │ │ │ ├── app.md │ │ │ │ ├── res-bundle.md │ │ │ │ ├── res-native.md │ │ │ │ ├── resources.md │ │ │ │ ├── sound-effect.md │ │ │ │ ├── sound-music.md │ │ │ │ ├── view-expansion.md │ │ │ │ ├── view-native.md │ │ │ │ └── view-resources.md │ │ ├── src │ │ │ ├── builder │ │ │ │ ├── hooks.ts │ │ │ │ ├── index.ts │ │ │ │ └── utils │ │ │ │ │ ├── file.ts │ │ │ │ │ └── md5.ts │ │ │ ├── inspector │ │ │ │ └── asset-directory.ts │ │ │ ├── main.ts │ │ │ ├── menu │ │ │ │ ├── index.ts │ │ │ │ └── tinyPNG.ts │ │ │ ├── panel │ │ │ │ ├── components │ │ │ │ │ ├── app.ts │ │ │ │ │ ├── create-controller.ts │ │ │ │ │ ├── create-manager.ts │ │ │ │ │ ├── create-model.ts │ │ │ │ │ ├── create-res.ts │ │ │ │ │ ├── create-sound.ts │ │ │ │ │ └── create-view.ts │ │ │ │ └── index.ts │ │ │ ├── scene.ts │ │ │ ├── shims-vue.d.ts │ │ │ └── utils.ts │ │ └── tsconfig.json │ ├── i18n │ │ ├── en.js │ │ └── zh.js │ ├── package.json │ ├── tsconfig.json │ └── vue │ │ ├── LICENSE │ │ ├── README.md │ │ ├── dist │ │ └── vue.js │ │ ├── package.json │ │ └── types │ │ ├── index.d.ts │ │ ├── options.d.ts │ │ ├── plugin.d.ts │ │ ├── umd.d.ts │ │ ├── vnode.d.ts │ │ └── vue.d.ts └── pkg │ ├── README.md │ ├── index.js │ └── package.json ├── package-lock.json ├── package.json ├── readme.md ├── settings └── v2 │ └── packages │ ├── builder.json │ ├── cocos-service.json │ ├── device.json │ ├── engine.json │ ├── information.json │ ├── program.json │ ├── project.json │ └── scene.json └── tsconfig.json /.creator/asset-template/typescript/Custom Script Template Help Documentation.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=https://docs.cocos.com/creator/manual/en/scripting/setup.html#custom-script-template -------------------------------------------------------------------------------- /.creator/default-meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "image": { 3 | "type": "sprite-frame" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: true, 4 | node: true 5 | }, 6 | extends: [ 7 | 'eslint:recommended', 8 | 'plugin:@typescript-eslint/recommended' 9 | ], 10 | parser: '@typescript-eslint/parser', 11 | parserOptions: { 12 | sourceType: 'module' 13 | }, 14 | plugins: [ 15 | '@typescript-eslint' 16 | ], 17 | globals: {}, 18 | rules: { 19 | 'no-useless-escape': 0, 20 | 'prefer-spread': 0, 21 | 'prefer-const': 0, 22 | 'comma-spacing': 'error', 23 | 'space-infix-ops': 'error', 24 | 'no-constant-condition': 0, 25 | 'no-inner-declarations': 0, 26 | '@typescript-eslint/no-namespace': 0, 27 | '@typescript-eslint/no-empty-interface': 0, 28 | 'arrow-spacing': ['error', { before: true, after: true }], 29 | 'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 1 }], 30 | 'space-before-function-paren': ['error', { 'anonymous': 'always', 'named': 'never', 'asyncArrow': 'always' }], 31 | '@typescript-eslint/ban-types': 0, 32 | '@typescript-eslint/ban-ts-comment': 0, 33 | '@typescript-eslint/no-explicit-any': 0, 34 | '@typescript-eslint/no-var-requires': 0, 35 | '@typescript-eslint/no-empty-function': 0, 36 | '@typescript-eslint/semi': ['error', 'always'], 37 | '@typescript-eslint/quotes': ['error', 'single'], 38 | '@typescript-eslint/explicit-module-boundary-types': 0, 39 | '@typescript-eslint/object-curly-spacing': ['error', 'always'], 40 | '@typescript-eslint/no-inferrable-types': ['error', { ignoreParameters: true, ignoreProperties: true }], 41 | } 42 | }; -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #///////////////////////////////////////////////////////////////////////////// 2 | # Fireball Projects 3 | #///////////////////////////////////////////////////////////////////////////// 4 | 5 | !/profiles/v2/packages/builder.json 6 | !/extensions/app/ 7 | !/extensions/pkg/ 8 | 9 | /temp/ 10 | /build/ 11 | /library/ 12 | /profiles/ 13 | /local/logs/ 14 | /local/local.json 15 | /local/layout.editor.json 16 | /settings/wechatgame.json 17 | /settings/bytedance.json 18 | #///////////////////////////////////////////////////////////////////////////// 19 | # npm files 20 | #///////////////////////////////////////////////////////////////////////////// 21 | 22 | npm-debug.log 23 | /node_modules 24 | /web-template/node_modules 25 | 26 | #///////////////////////////////////////////////////////////////////////////// 27 | # Logs and databases 28 | #///////////////////////////////////////////////////////////////////////////// 29 | 30 | *.log 31 | *.sql 32 | *.sqlite 33 | 34 | #///////////////////////////////////////////////////////////////////////////// 35 | # files for debugger 36 | #///////////////////////////////////////////////////////////////////////////// 37 | 38 | *.sln 39 | *.pidb 40 | *.suo 41 | 42 | #///////////////////////////////////////////////////////////////////////////// 43 | # OS generated files 44 | #///////////////////////////////////////////////////////////////////////////// 45 | 46 | .DS_Store 47 | ehthumbs.db 48 | Thumbs.db 49 | 50 | #///////////////////////////////////////////////////////////////////////////// 51 | # WebStorm files 52 | #///////////////////////////////////////////////////////////////////////////// 53 | 54 | .idea/ 55 | 56 | #////////////////////////// 57 | # VS Code files 58 | #////////////////////////// 59 | 60 | .vscode/ 61 | !.vscode/settings.json -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 向前 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. 22 | -------------------------------------------------------------------------------- /assets/app-appinit.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "5aa02f13-d2f9-4d73-a79e-58b9fe6eca78", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/app-appinit/.app-appinit.md: -------------------------------------------------------------------------------- 1 | 1、框架初始化首屏 2 | 2、不可删除此文件夹 -------------------------------------------------------------------------------- /assets/app-appinit/res.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "e1ee8c84-c9c2-4a48-8e6e-9e242ed718f3", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/app-appinit/res/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1076559139/XForge/65635cdd4768b6eb3aa07a7dca3283cd95169257/assets/app-appinit/res/logo.png -------------------------------------------------------------------------------- /assets/app-appinit/res/logo.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.27", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "2a89c2f6-f894-47db-88e9-1017df6fbf0d", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "2a89c2f6-f894-47db-88e9-1017df6fbf0d@6c48a", 14 | "displayName": "logo", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "clamp-to-edge", 19 | "wrapModeT": "clamp-to-edge", 20 | "imageUuidOrDatabaseUri": "2a89c2f6-f894-47db-88e9-1017df6fbf0d", 21 | "isUuid": true, 22 | "visible": false, 23 | "minfilter": "linear", 24 | "magfilter": "linear", 25 | "mipfilter": "none", 26 | "anisotropy": 0 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | }, 35 | "f9941": { 36 | "importer": "sprite-frame", 37 | "uuid": "2a89c2f6-f894-47db-88e9-1017df6fbf0d@f9941", 38 | "displayName": "logo", 39 | "id": "f9941", 40 | "name": "spriteFrame", 41 | "userData": { 42 | "trimType": "auto", 43 | "trimThreshold": 1, 44 | "rotated": false, 45 | "offsetX": 0, 46 | "offsetY": 0, 47 | "trimX": 0, 48 | "trimY": 0, 49 | "width": 400, 50 | "height": 400, 51 | "rawWidth": 400, 52 | "rawHeight": 400, 53 | "borderTop": 0, 54 | "borderBottom": 0, 55 | "borderLeft": 0, 56 | "borderRight": 0, 57 | "packable": true, 58 | "pixelsToUnit": 100, 59 | "pivotX": 0.5, 60 | "pivotY": 0.5, 61 | "meshType": 0, 62 | "vertices": { 63 | "rawPosition": [ 64 | -200, 65 | -200, 66 | 0, 67 | 200, 68 | -200, 69 | 0, 70 | -200, 71 | 200, 72 | 0, 73 | 200, 74 | 200, 75 | 0 76 | ], 77 | "indexes": [ 78 | 0, 79 | 1, 80 | 2, 81 | 2, 82 | 1, 83 | 3 84 | ], 85 | "uv": [ 86 | 0, 87 | 400, 88 | 400, 89 | 400, 90 | 0, 91 | 0, 92 | 400, 93 | 0 94 | ], 95 | "nuv": [ 96 | 0, 97 | 0, 98 | 1, 99 | 0, 100 | 0, 101 | 1, 102 | 1, 103 | 1 104 | ], 105 | "minPos": [ 106 | -200, 107 | -200, 108 | 0 109 | ], 110 | "maxPos": [ 111 | 200, 112 | 200, 113 | 0 114 | ] 115 | }, 116 | "isUuid": true, 117 | "imageUuidOrDatabaseUri": "2a89c2f6-f894-47db-88e9-1017df6fbf0d@6c48a", 118 | "atlasUuid": "" 119 | }, 120 | "ver": "1.0.12", 121 | "imported": true, 122 | "files": [ 123 | ".json" 124 | ], 125 | "subMetas": {} 126 | } 127 | }, 128 | "userData": { 129 | "type": "sprite-frame", 130 | "hasAlpha": false, 131 | "fixAlphaTransparencyArtifacts": false, 132 | "redirect": "2a89c2f6-f894-47db-88e9-1017df6fbf0d@6c48a" 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /assets/app-appinit/res/singleColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1076559139/XForge/65635cdd4768b6eb3aa07a7dca3283cd95169257/assets/app-appinit/res/singleColor.png -------------------------------------------------------------------------------- /assets/app-appinit/res/singleColor.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.27", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "a4cadc68-5c93-4683-8ee0-cf3bb6acb132", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "a4cadc68-5c93-4683-8ee0-cf3bb6acb132@6c48a", 14 | "displayName": "singleColor", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "clamp-to-edge", 19 | "wrapModeT": "clamp-to-edge", 20 | "imageUuidOrDatabaseUri": "a4cadc68-5c93-4683-8ee0-cf3bb6acb132", 21 | "isUuid": true, 22 | "visible": false, 23 | "minfilter": "linear", 24 | "magfilter": "linear", 25 | "mipfilter": "none", 26 | "anisotropy": 0 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | }, 35 | "f9941": { 36 | "importer": "sprite-frame", 37 | "uuid": "a4cadc68-5c93-4683-8ee0-cf3bb6acb132@f9941", 38 | "displayName": "singleColor", 39 | "id": "f9941", 40 | "name": "spriteFrame", 41 | "userData": { 42 | "trimType": "auto", 43 | "trimThreshold": 1, 44 | "rotated": false, 45 | "offsetX": 0, 46 | "offsetY": 0, 47 | "trimX": 0, 48 | "trimY": 0, 49 | "width": 2, 50 | "height": 2, 51 | "rawWidth": 2, 52 | "rawHeight": 2, 53 | "borderTop": 0, 54 | "borderBottom": 0, 55 | "borderLeft": 0, 56 | "borderRight": 0, 57 | "packable": true, 58 | "pixelsToUnit": 100, 59 | "pivotX": 0.5, 60 | "pivotY": 0.5, 61 | "meshType": 0, 62 | "vertices": { 63 | "rawPosition": [ 64 | -1, 65 | -1, 66 | 0, 67 | 1, 68 | -1, 69 | 0, 70 | -1, 71 | 1, 72 | 0, 73 | 1, 74 | 1, 75 | 0 76 | ], 77 | "indexes": [ 78 | 0, 79 | 1, 80 | 2, 81 | 2, 82 | 1, 83 | 3 84 | ], 85 | "uv": [ 86 | 0, 87 | 2, 88 | 2, 89 | 2, 90 | 0, 91 | 0, 92 | 2, 93 | 0 94 | ], 95 | "nuv": [ 96 | 0, 97 | 0, 98 | 1, 99 | 0, 100 | 0, 101 | 1, 102 | 1, 103 | 1 104 | ], 105 | "minPos": [ 106 | -1, 107 | -1, 108 | 0 109 | ], 110 | "maxPos": [ 111 | 1, 112 | 1, 113 | 0 114 | ] 115 | }, 116 | "isUuid": true, 117 | "imageUuidOrDatabaseUri": "a4cadc68-5c93-4683-8ee0-cf3bb6acb132@6c48a", 118 | "atlasUuid": "" 119 | }, 120 | "ver": "1.0.12", 121 | "imported": true, 122 | "files": [ 123 | ".json" 124 | ], 125 | "subMetas": {} 126 | } 127 | }, 128 | "userData": { 129 | "type": "sprite-frame", 130 | "fixAlphaTransparencyArtifacts": true, 131 | "hasAlpha": false, 132 | "redirect": "a4cadc68-5c93-4683-8ee0-cf3bb6acb132@6c48a" 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /assets/app-appinit/view.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "2d1f88c5-c88d-43c1-9bad-8c188f9314e0", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/app-appinit/view/AppInit.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.50", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "19a93f71-0300-44b3-9bd9-efbc15271e7d", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "AppInit" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/app-appinit/view/AppInit.ts: -------------------------------------------------------------------------------- 1 | import { Node, UIOpacity, _decorator, tween } from 'cc'; 2 | import BaseAppInit from '../../../extensions/app/assets/base/BaseAppInit'; 3 | const { ccclass, property } = _decorator; 4 | 5 | @ccclass('AppInit') 6 | export class AppInit extends BaseAppInit { 7 | @property(Node) 8 | private logo: Node; 9 | 10 | /** 11 | * 获得用户资源总量,这里返回几,就需要用户自行调用几次nextInit 12 | */ 13 | protected getUserAssetNum(): number { 14 | return 1; 15 | } 16 | 17 | protected onLoad() { 18 | // 执行初始化操作 19 | const opacity = this.logo.getComponent(UIOpacity); 20 | opacity.opacity = 0; 21 | tween(opacity) 22 | .to(0.5, { opacity: 255 }) 23 | .delay(1) 24 | .to(0.5, { opacity: 0 }) 25 | .call(() => { 26 | this.nextInit(); 27 | }) 28 | .start(); 29 | } 30 | 31 | // BaseAppInit中使用start方法作为初始化入口,如果重写start方法,请注意调用父类方法 32 | // protected start() { } 33 | 34 | protected onFinish() { 35 | // 执行完成操作 36 | this.node.destroy(); 37 | } 38 | } -------------------------------------------------------------------------------- /assets/app-appinit/view/AppInit.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "598f2121-5288-4479-b533-b2ac171e8a25", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/app-builtin.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "8564f435-63c9-4e21-bda9-2927d8c7b90d", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/app-builtin/.app-builtin.md: -------------------------------------------------------------------------------- 1 | 1、存储内置功能的文件夹 2 | 2、不可删除此文件夹 -------------------------------------------------------------------------------- /assets/app-builtin/app-admin.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "95e76f7f-cbcf-4726-87bf-efbf19fb0e33", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "isBundle": true, 10 | "bundleConfigID": "auto_398Ij6Mc1B2Y7sW3e6BgFC" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/app-builtin/app-admin/.app-admin.md: -------------------------------------------------------------------------------- 1 | 1、一些配置类的资产(框架自动维护) 2 | 2、不可删除此文件夹 -------------------------------------------------------------------------------- /assets/app-builtin/app-admin/executor.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { Component,director,Director } from 'cc'; 3 | import { app } from '../../app/app'; 4 | import { EDITOR,EDITOR_NOT_IN_PREVIEW } from 'cc/env'; 5 | 6 | export type IReadOnly = { readonly [P in keyof T]: T[P] extends Function ? T[P] : (T[P] extends Object ? IReadOnly : T[P]); }; 7 | 8 | export type IViewName = "never" 9 | export type IViewNames = IViewName[] 10 | export type IMiniViewName = "never" 11 | export type IMiniViewNames = IMiniViewName[] 12 | export type IMusicName = "never" 13 | export type IMusicNames = IMusicName[] 14 | export type IEffectName = "never" 15 | export type IEffectNames = IEffectName[] 16 | 17 | import EventManager from '../../../extensions/app/assets/manager/event/EventManager' 18 | import LoaderManager from '../../../extensions/app/assets/manager/loader/LoaderManager' 19 | import SoundManager from '../../../extensions/app/assets/manager/sound/SoundManager' 20 | import TimerManager from '../../../extensions/app/assets/manager/timer/TimerManager' 21 | import UIManager from '../../../extensions/app/assets/manager/ui/UIManager' 22 | export type IApp = { 23 | Controller: {}, 24 | controller: {}, 25 | Manager: {Event:Omit,Loader:Omit,Sound:Omit,Timer:Omit,UI:Omit}, 26 | manager: {event:Omit,loader:Omit,sound:Omit,keyof Component>,timer:Omit,ui:Omit,keyof Component>}, 27 | data: {}, 28 | config: {} 29 | store: {} 30 | } 31 | 32 | function init(){ 33 | if(!EDITOR||!EDITOR_NOT_IN_PREVIEW) Object.assign(app.config, {}) 34 | if(!EDITOR||!EDITOR_NOT_IN_PREVIEW) Object.assign(app.data, {}) 35 | if(!EDITOR||!EDITOR_NOT_IN_PREVIEW) Object.assign(app.store, {}) 36 | 37 | if(!EDITOR||!EDITOR_NOT_IN_PREVIEW) Object.assign(app.Controller, {}) 38 | if(!EDITOR||!EDITOR_NOT_IN_PREVIEW) Object.assign(app.controller, {}) 39 | } 40 | if(!EDITOR||!EDITOR_NOT_IN_PREVIEW) director.on(Director.EVENT_RESET,init) 41 | if(!EDITOR||!EDITOR_NOT_IN_PREVIEW) init() 42 | -------------------------------------------------------------------------------- /assets/app-builtin/app-admin/executor.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "f187b639-0be1-421c-ac96-f3891a260321", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/app-scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "104c58a7-687b-47fb-b7b0-dac627418567", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/app-scene/.app-scene.md: -------------------------------------------------------------------------------- 1 | 1、存储主场景的文件夹 2 | 2、不可删除此文件夹 -------------------------------------------------------------------------------- /assets/app-scene/main.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.50", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "5298bb0b-166e-4978-af98-0047d43757de", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/app.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "a7084ee0-ab27-4f9f-a846-6d4b38db50ba", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/app/.app.md: -------------------------------------------------------------------------------- 1 | 1、框架配置、生命周期及全局导出 2 | 2、不可删除此文件夹 -------------------------------------------------------------------------------- /assets/app/app.ts: -------------------------------------------------------------------------------- 1 | import { Game, game } from 'cc'; 2 | import { DEBUG, DEV, EDITOR } from 'cc/env'; 3 | import Core from '../../extensions/app/assets/Core'; 4 | import { IApp } from '../app-builtin/app-admin/executor'; 5 | import { appInited, appReady, cccInited, cccReady } from './handle'; 6 | 7 | export class App extends Core { 8 | protected static _inst: App | undefined; 9 | static get inst() { 10 | if (!this._inst) this._inst = new App(); 11 | return this._inst; 12 | } 13 | 14 | private constructor() { 15 | super(); 16 | } 17 | } 18 | 19 | export const app = App.inst; 20 | 21 | if (DEBUG) { 22 | //@ts-ignore 23 | window['app'] = app; 24 | //@ts-ignore 25 | window['App'] = App; 26 | } 27 | 28 | if (!EDITOR || DEV) { 29 | cccReady && cccReady(app); 30 | appReady && appReady(app); 31 | cccInited && game.once(Game.EVENT_ENGINE_INITED, function () { cccInited(app); }); 32 | appInited && app.once(App.EventType.EVENT_APPINIT_FINISHED, function () { appInited(app); }); 33 | } -------------------------------------------------------------------------------- /assets/app/app.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "121df84f-631d-4557-831a-19641e7deea8", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/app/handle.ts: -------------------------------------------------------------------------------- 1 | import { game, sys } from 'cc'; 2 | import { App } from './app'; 3 | 4 | /** 5 | * ccc除物理引擎等外的基础功能已经准备好了 6 | */ 7 | export function cccReady(app: App) { 8 | // 为了防止web环境中异常掉帧问题(关键代码在cc.game._pacer._handleRAF中) 9 | if (sys.isBrowser) { 10 | game.frameRate = 100; 11 | } 12 | } 13 | 14 | /** 15 | * ccc全部功能都初始化完毕了 16 | */ 17 | export function cccInited(app: App) { 18 | 19 | } 20 | 21 | /** 22 | * app除了用户自定义Manager未加载外,其它都已准备好了 23 | */ 24 | export function appReady(app: App) { 25 | 26 | } 27 | 28 | /** 29 | * app全部功能都初始化完毕了 30 | */ 31 | export function appInited(app: App) { 32 | 33 | } -------------------------------------------------------------------------------- /assets/app/handle.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "8afaf85a-fbcd-4213-aacb-2e9337926fee", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/app/setting.ts: -------------------------------------------------------------------------------- 1 | import { DEBUG } from 'cc/env'; 2 | import { Logger } from 'db://app/lib/logger/logger'; 3 | import { Storage } from 'db://app/lib/storage/storage'; 4 | import SoundManager from 'db://app/manager/sound/SoundManager'; 5 | import UIManager from 'db://app/manager/ui/UIManager'; 6 | 7 | // 如果需要加密内容,请设置密钥的值 8 | Storage.setting.secretKey = ''; 9 | // 设置日志过滤 10 | Logger.setting.filter = DEBUG ? ['error', 'log', 'warn'] : ['error']; 11 | 12 | // 预加载的UI列表 13 | UIManager.setting.preload = []; 14 | // 默认UI, 会在首屏流程后自动show 15 | UIManager.setting.defaultUI = ''; // 通过App菜单创建Page类型的UI后,填入该UI的名称(会有自动提示与类型检查) 16 | // 是否自动适配分辨率策略 17 | UIManager.setting.autoFit = true; // 开启后,会弃用项目设置中的适配策略,并自动根据设备分辨率与设计分辨率计算出新的适配策略 18 | // 弹窗默认遮罩展现动画配置 19 | UIManager.setting.shade = { 20 | delay: 0, 21 | begin: 100, 22 | end: 200, 23 | speed: 400, 24 | blur: false 25 | }; 26 | 27 | // 预加载的音频(按数组顺序依次预加载) 28 | SoundManager.setting.preload = []; 29 | // 默认音乐, 会在首屏流程后自动播放 30 | SoundManager.setting.defaultMusicName = ''; 31 | // 默认音效, 会在Button被点击后播放 32 | SoundManager.setting.defaultEffectName = ''; -------------------------------------------------------------------------------- /assets/app/setting.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "9a8d2a40-9eb2-4058-8883-a7de0fedbd33", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /cliconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Creator3D", 3 | "version": "3.5.10" 4 | } -------------------------------------------------------------------------------- /extensions/app/README-CN.md: -------------------------------------------------------------------------------- 1 | # 项目简介 2 | 3 | 框架核心。 4 | 5 | ## 开发环境 6 | 7 | Node.js 8 | 9 | ## 安装 10 | 11 | ```bash 12 | # 安装依赖模块 13 | npm install 14 | # 构建 15 | npm run build 16 | ``` 17 | -------------------------------------------------------------------------------- /extensions/app/README-EN.md: -------------------------------------------------------------------------------- 1 | # Project Title 2 | 3 | The core of the framework 4 | 5 | ## Development Environment 6 | 7 | Node.js 8 | 9 | ## Install 10 | 11 | ```bash 12 | # Install dependent modules 13 | npm install 14 | # build 15 | npm run build 16 | ``` 17 | -------------------------------------------------------------------------------- /extensions/app/assets/Core.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "b4a49372-fa9e-4448-b91b-29bc9701d9ff", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/app.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "0ceacfb9-e86a-4e83-bd5d-15a4a27185c8", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/base.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "2fb050e0-159f-4a3b-b24c-3d76e43ac54d", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/app/assets/base/BaseAppInit.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "2110b07a-1c6c-430e-b9d9-926db06c8b30", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/base/BaseControl.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "fb1039b9-17f2-43b5-ad26-8d74e691b4f5", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/base/BaseController.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "a7da7081-e604-487e-8e0c-7d458fdbb356", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/base/BaseManager.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "30205eac-9b1e-4f44-8081-7b70ff8d6c52", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/base/BaseModel.ts: -------------------------------------------------------------------------------- 1 | // export type IModel = { 2 | // [P in keyof T]: T[P] extends Function 3 | // ? '❌此处不能定义任何方法' 4 | // : ( 5 | // T[P] extends Array 6 | // ? ( 7 | // R extends Function 8 | // ? '❌此处不能定义任何方法' 9 | // : T[P] 10 | // ) 11 | // : T[P] // IModel 性能消耗大 12 | // ); 13 | // }; 14 | 15 | // export type IStore = { 16 | // [P in keyof T]: T[P] extends Function 17 | // ? T[P] 18 | // : ( 19 | // T[P] extends Array 20 | // ? ( 21 | // R extends Function 22 | // ? '❌此处不能定义任何方法' 23 | // : IModel 24 | // ) 25 | // : IModel 26 | // ); 27 | // }; 28 | 29 | export type IModel = { 30 | [P in keyof T]: T[P] extends Function 31 | ? '❌此处不能定义任何方法' 32 | : T[P]; 33 | }; 34 | 35 | // export type IStore = { 36 | // [P in keyof T]: T[P] extends Function 37 | // ? T[P] 38 | // : IModel; 39 | // }; 40 | 41 | export type IStore = { 42 | [P in keyof T]: T[P]; 43 | }; -------------------------------------------------------------------------------- /extensions/app/assets/base/BaseModel.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "7a377ceb-e086-4e71-99bd-f44dab40d24f", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/base/BaseView.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "eddc0411-4239-423d-8710-77fdf92affc2", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/lib.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "6ff04fb4-44cd-4fc4-a4b8-28ac28d83a0b", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/app/assets/lib/debug.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "e939f63c-c853-403c-aed7-b8f0925106f0", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/app/assets/lib/debug/debug.ts: -------------------------------------------------------------------------------- 1 | import { DEBUG, DEV } from 'cc/env'; 2 | 3 | function jsGetSet(obj: unknown, prop: string, getter: Function, setter?: Function) { 4 | Object.defineProperty(obj, prop, { 5 | get: getter as any, 6 | set: setter as any, 7 | enumerable: false, 8 | configurable: false 9 | }); 10 | } 11 | function clear(object: Record) { 12 | if (!object) return; 13 | for (const key of Object.keys(object)) { 14 | delete object[key]; 15 | } 16 | } 17 | /** 18 | * 将某个变量设置为不可观测(不可在浏览器中打印) 19 | * @param owner object | string | number | boolean | Array | Function | ... 20 | * @param callback 被观测时触发回调 21 | * @returns 22 | */ 23 | export function unobservable(owner: unknown, callback?: Function) { 24 | if (DEV || DEBUG) return; 25 | if (!owner) return; 26 | function define() { 27 | function accessor() { 28 | if (callback) { 29 | callback(); 30 | } else { 31 | clear(owner); 32 | } 33 | } 34 | try { 35 | jsGetSet(owner, 'unobservable', accessor.bind(null, 'de' + 'bu' + 'gg' + 'er')); 36 | } 37 | catch (e) { !0; } 38 | } 39 | define(); 40 | } -------------------------------------------------------------------------------- /extensions/app/assets/lib/debug/debug.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "c0d5da3b-23f0-400e-85bb-6c754b9c08eb", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/lib/logger.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "140d98c1-6885-4e37-bf16-2ee67ffe087e", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/lib/logger/logger.ts: -------------------------------------------------------------------------------- 1 | import { DEV } from 'cc/env'; 2 | 3 | interface ILog { 4 | (title: string, ...args: any[]): void 5 | } 6 | 7 | /** 8 | * 日志管理类,用于统一日志输出格式 9 | */ 10 | export class Logger { 11 | static setting: { 12 | filter: Array<'log' | 'warn' | 'error'> 13 | } = { 14 | filter: ['error', 'log', 'warn'] 15 | }; 16 | 17 | /** 18 | * 创建日志输出函数 19 | */ 20 | static create(level: 'log' | 'warn' | 'error', styleColor: string, title: string, titleColor = '#fff') { 21 | if (this.setting.filter.indexOf(level) == -1) { 22 | return; 23 | } 24 | 25 | if (DEV) { 26 | return window.console[level].bind(window.console, 27 | '%c %s %c %s ', 28 | `background:${styleColor}; padding: 2px; border-radius: 5px 0 0 5px; border: 1px solid ${styleColor}; color: ${titleColor}; font-weight: normal;`, 29 | `${title} ${new Date().toLocaleString()}`, 30 | `background:#ffffff ; padding: 2px; border-radius: 0 5px 5px 0; border: 1px solid ${styleColor}; color: ${styleColor}; font-weight: normal;` 31 | ); 32 | } 33 | return window.console[level].bind(window.console, 34 | `${title} [${new Date().toLocaleString()}]` 35 | ); 36 | } 37 | 38 | /** 39 | * 用于输出一般信息 40 | */ 41 | get log() { 42 | return Logger.create('log', '#6495ed', '[LOG]', '#000') as ILog; 43 | } 44 | 45 | /** 46 | * 用于输出警告信息 47 | */ 48 | 49 | get warn() { 50 | return Logger.create('warn', '#ff7f50', '[WARN]', '#000') as ILog; 51 | } 52 | 53 | /** 54 | * 用于输出错误信息 55 | */ 56 | get error() { 57 | return Logger.create('error', '#ff4757', '[ERROR]', '#000') as ILog; 58 | } 59 | 60 | /** 61 | * 用于输出调试信息 62 | */ 63 | get debug() { 64 | return Logger.create('log', '#ff6347', '[DEBUG]', '#000') as ILog; 65 | } 66 | 67 | /** 68 | * 用于输出成功信息 69 | */ 70 | get success() { 71 | return Logger.create('log', '#00ae9d', '[SUCC]', '#000') as ILog; 72 | } 73 | } 74 | 75 | export default new Logger(); -------------------------------------------------------------------------------- /extensions/app/assets/lib/logger/logger.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "0b5812e8-b67d-4ba9-83d8-12ca1e46cfd0", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/lib/storage.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "0c157f59-fd16-449c-b42c-d0efa2dc1401", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/app/assets/lib/storage/storage.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "be3da7ca-1bb5-4a41-894b-f82751c78ef2", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/lib/task.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "54e30e53-aef2-4e16-8969-e38bea0ea336", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/app/assets/lib/task/task.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "721e6dcc-aab3-48d6-aa4e-e1baf821263b", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/manager.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "b50df186-2646-40b3-83c5-5dca8bf01803", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/MainManager.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.50", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "5e43bb09-848f-434a-b3a5-a6b6602e00af", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "MainManager" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/event.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "4f12d0c8-895c-48a5-8805-79653aadb7e4", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/event/EventManager.ts: -------------------------------------------------------------------------------- 1 | import { EventTarget, _decorator } from 'cc'; 2 | import BaseManager from '../../base/BaseManager'; 3 | const { ccclass } = _decorator; 4 | 5 | @ccclass('EventManager') 6 | export default class EventManager extends BaseManager { 7 | private events: Map = new Map(); 8 | 9 | clear() { 10 | return this.events.clear(); 11 | } 12 | 13 | delete(rootName: string | number) { 14 | return this.events.delete(rootName); 15 | } 16 | 17 | get(rootName: string | number): EventTarget { 18 | if (this.events.has(rootName)) { 19 | return this.events.get(rootName); 20 | } 21 | 22 | const event = new EventTarget(); 23 | this.events.set(rootName, event); 24 | 25 | return event; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/event/EventManager.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "b4ea6344-3778-423d-98aa-a7785155bbd4", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/loader.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "d8954580-884f-4927-b59a-dfb9553d4ce6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/loader/LoaderManager.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "b3bf5337-0c73-4771-87b5-9e735962be81", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/sound.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "a99e9a5e-e037-428c-b8f4-e5ad266db8ee", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/sound/Audio.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "a40e77a6-cdac-445c-a50c-a8ced2411dbc", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/sound/AudioEngine.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "7a638f5c-801f-4e69-88cc-3fc72e1be985", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/sound/AudioManager.ts: -------------------------------------------------------------------------------- 1 | import Audio from './Audio'; 2 | 3 | export default class AudioManager { 4 | private static _inst: AudioManager = null; 5 | static get inst() { 6 | if (!this._inst) this._inst = new AudioManager(); 7 | return this._inst; 8 | } 9 | private constructor() { } 10 | 11 | private audioArray: Audio[] = []; 12 | 13 | getAudio() { 14 | if (this.audioArray.length) { 15 | return this.audioArray.pop(); 16 | } 17 | return new Audio(); 18 | } 19 | 20 | putAudio(audio: Audio) { 21 | audio.clear(); 22 | this.audioArray.push(audio); 23 | } 24 | } -------------------------------------------------------------------------------- /extensions/app/assets/manager/sound/AudioManager.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "5902cecf-4966-4675-95a9-ab0f0f271857", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/sound/SoundManager.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "580021da-d9a7-4e59-bb76-2c3afcae6053", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/timer.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "ea45b442-c58f-49d1-9b11-edc7bc719a73", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/timer/TimerManager.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "b5636f8d-3516-4510-aaba-74f9202b8a9f", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "714739c4-f4c0-4313-bc98-2d350df6b208", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/UIManager.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "234f62f1-ebd3-4d14-9f6f-0b69c7096449", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/comp.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "cc9c8895-27f9-49df-aca5-a0d1b9ba6480", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/comp/UIMgrLoading.ts: -------------------------------------------------------------------------------- 1 | import { Component, Graphics, Node, Size, UITransform, _decorator } from 'cc'; 2 | const { ccclass, property, requireComponent } = _decorator; 3 | 4 | @ccclass('UIMgrLoading') 5 | @requireComponent(UITransform) 6 | export default class UIMgrLoading extends Component { 7 | @property(Node) 8 | private loading: Node; 9 | 10 | @property({ tooltip: '动画的尺寸' }) 11 | private size: Size = new Size(60, 60); 12 | 13 | @property({ tooltip: '等待几秒后开始动画' }) 14 | private delay = 0; 15 | 16 | private progress = 0; 17 | private ringScale = 1; 18 | private reverse = false; 19 | 20 | private angleSpeed = 120; 21 | private ringSpeed = 0.02; 22 | 23 | private inited = false; 24 | private drawing = false; 25 | private timedown = 0; 26 | 27 | init() { 28 | if (this.inited) return; 29 | this.inited = true; 30 | 31 | this.progress = 0; 32 | this.ringScale = 1; 33 | this.loading.angle = 0; 34 | this.reverse = false; 35 | 36 | this.drawing = false; 37 | this.timedown = this.delay; 38 | this.loading.getComponent(Graphics).clear(); 39 | } 40 | 41 | clear() { 42 | this.inited = false; 43 | this.drawing = false; 44 | } 45 | 46 | /** 47 | * 需要重写 48 | */ 49 | private onDraw() { 50 | const graphics = this.loading.getComponent(Graphics); 51 | const uiTransform = this.loading.getComponent(UITransform); 52 | 53 | const centerX = this.size.width * (0.5 - uiTransform.anchorX); 54 | const centerY = this.size.height * (0.5 - uiTransform.anchorY); 55 | 56 | const r = Math.min(this.size.width / 2, this.size.height / 2); 57 | 58 | const allPI = Math.PI; 59 | const offst = 0; 60 | 61 | graphics.clear(); 62 | if (this.reverse) { 63 | const start = 0.5 * Math.PI + offst; 64 | const end = 0.5 * Math.PI + this.progress * 2 * allPI + offst; 65 | graphics.arc(centerX, centerY, r, start, end, true); 66 | } else { 67 | const start = 0.5 * Math.PI - offst; 68 | const end = 0.5 * Math.PI - this.progress * 2 * allPI - offst; 69 | graphics.arc(centerX, centerY, r, start, end, false); 70 | } 71 | graphics.stroke(); 72 | } 73 | 74 | protected update(dt: number): void { 75 | if (!this.inited) return; 76 | 77 | // 倒计时 78 | if (!this.drawing) { 79 | if (this.timedown > 0) { 80 | this.timedown -= dt; 81 | } 82 | if (this.timedown <= 0) { 83 | this.drawing = true; 84 | } else { 85 | return; 86 | } 87 | } 88 | 89 | // 旋转 90 | this.loading.angle -= this.angleSpeed * dt; 91 | if (this.loading.angle >= 360 || this.loading.angle <= -360) { 92 | this.loading.angle = this.loading.angle % 360; 93 | } 94 | 95 | // 进度 96 | if (this.ringScale > 0) { 97 | this.progress = Math.min(1, this.progress + this.ringSpeed * this.ringScale); 98 | 99 | if (this.progress == 1) { 100 | this.ringScale = -1; 101 | this.reverse = !this.reverse; 102 | } 103 | } else { 104 | this.progress = Math.max(0, this.progress + this.ringSpeed * this.ringScale); 105 | 106 | if (this.progress == 0) { 107 | this.ringScale = 1; 108 | this.reverse = !this.reverse; 109 | } 110 | } 111 | 112 | this.onDraw(); 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/comp/UIMgrLoading.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "4a8e5697-ae78-4a4a-8d08-17acc6823a27", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/comp/UIMgrShade.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "d0295d9b-b01d-493c-9e31-5ed78e6c33ab", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/comp/UIMgrToast.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "cde1528c-f66c-40f4-bdd2-27bf138ce1df", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/comp/UIMgrToastCell.ts: -------------------------------------------------------------------------------- 1 | import { Component, Label, UIOpacity, UITransform, _decorator } from 'cc'; 2 | const { ccclass, property, requireComponent } = _decorator; 3 | 4 | @ccclass('UIMgrToastCell') 5 | @requireComponent(UIOpacity) 6 | @requireComponent(UITransform) 7 | export default class UIMgrToastCell extends Component { 8 | @property(Label) 9 | private title: Label = null; 10 | 11 | init(title: string) { 12 | if (title.split('\n').find((v) => v.length > 30)) { 13 | this.title.overflow = Label.Overflow.RESIZE_HEIGHT; 14 | this.title.getComponent(UITransform).width = 600; 15 | } else { 16 | this.title.overflow = Label.Overflow.NONE; 17 | } 18 | this.title.string = title; 19 | this.title.updateRenderData(true); 20 | } 21 | 22 | unuse() { 23 | this.title.string = ''; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/comp/UIMgrToastCell.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "6cc631d6-b08e-4ee3-8bde-e307c4288734", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/comp/UIMgrZOrder.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, Component, Director, director, Node } from 'cc'; 2 | const { ccclass } = _decorator; 3 | 4 | @ccclass('UIMgrZOrder') 5 | export default class UIMgrZOrder extends Component { 6 | private zOrder = false; 7 | private tempArr: Node[] = []; 8 | 9 | protected onLoad() { 10 | this.checkUpdateZOrder(); 11 | this.node.on(Node.EventType.CHILD_ADDED, this.onChildAdded, this); 12 | this.node.on(Node.EventType.CHILD_REMOVED, this.onChildRemoveed, this); 13 | if (Node.EventType.CHILDREN_ORDER_CHANGED) { 14 | this.node.on(Node.EventType.CHILDREN_ORDER_CHANGED, this.checkUpdateZOrder, this); 15 | } else { 16 | this.node.on(Node.EventType.SIBLING_ORDER_CHANGED, this.checkUpdateZOrder, this); 17 | } 18 | } 19 | 20 | protected onDestroy() { 21 | director.off(Director.EVENT_AFTER_UPDATE, this.updateZOrder, this); 22 | this.node.off(Node.EventType.CHILD_ADDED, this.onChildAdded, this); 23 | this.node.off(Node.EventType.CHILD_REMOVED, this.onChildRemoveed, this); 24 | if (Node.EventType.CHILDREN_ORDER_CHANGED) { 25 | this.node.off(Node.EventType.CHILDREN_ORDER_CHANGED, this.checkUpdateZOrder, this); 26 | } else { 27 | this.node.off(Node.EventType.SIBLING_ORDER_CHANGED, this.checkUpdateZOrder, this); 28 | } 29 | } 30 | 31 | private onChildAdded(child: Node) { 32 | this.checkUpdateZOrder(); 33 | child.on(Node.EventType.TRANSFORM_CHANGED, this.checkUpdateZOrder, this); 34 | } 35 | 36 | private onChildRemoveed(child: Node) { 37 | child.off(Node.EventType.TRANSFORM_CHANGED, this.checkUpdateZOrder, this); 38 | } 39 | 40 | private checkUpdateZOrder() { 41 | if (this.zOrder) return; 42 | this.zOrder = true; 43 | director.once(Director.EVENT_AFTER_UPDATE, this.updateZOrder, this); 44 | } 45 | 46 | /** 47 | * 更新节点树排序 48 | */ 49 | public updateZOrder() { 50 | if (!this.zOrder) return; 51 | Array.prototype.push.apply(this.tempArr, this.node.children); 52 | this.tempArr 53 | .sort((a, b) => { 54 | return (a.position.z - b.position.z) 55 | || (a.getSiblingIndex() - b.getSiblingIndex()); 56 | }) 57 | .forEach((child, index) => { 58 | child.setSiblingIndex(index); 59 | }); 60 | 61 | // 一定要放到最后再设置false, 62 | // 避免更新过程中设置siblingIndex, 63 | // 导致无限重复调用 64 | this.zOrder = false; 65 | this.tempArr.length = 0; 66 | } 67 | } 68 | 69 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/comp/UIMgrZOrder.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.24", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "ad5cb510-639e-40c2-acdd-399ad00629b9", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "e3ac29f9-11a4-461c-a404-9e478271b953", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/effect/blur.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.1", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "b5376e0b-9e5d-4c91-b0a4-19448fd39179", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/effect/blur.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "b5376e0b-9e5d-4c91-b0a4-19448fd39179", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "textureSize": { 29 | "__type__": "cc.Vec2", 30 | "x": 750, 31 | "y": 1334 32 | }, 33 | "blurDegree": 1 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/effect/blur.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.21", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "a313b5eb-b939-4c44-affc-32c713440cea", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "a32ee073-dc9a-4d81-b3c1-54283a151627", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/prefab/UIMgrLoading.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.50", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "fe542035-b018-493e-bea8-084fe4e01905", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "UIMgrLoading" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/prefab/UIMgrShade.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.50", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "000cee21-922c-4fcd-bd39-6f80ac2436a4", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "UIMgrShade" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/prefab/UIMgrToast.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "UIMgrToast", 5 | "_objFlags": 0, 6 | "__editorExtras__": {}, 7 | "_native": "", 8 | "data": { 9 | "__id__": 1 10 | }, 11 | "optimizationPolicy": 0, 12 | "persistent": false 13 | }, 14 | { 15 | "__type__": "cc.Node", 16 | "_name": "UIMgrToast", 17 | "_objFlags": 0, 18 | "__editorExtras__": {}, 19 | "_parent": null, 20 | "_children": [], 21 | "_active": true, 22 | "_components": [ 23 | { 24 | "__id__": 2 25 | } 26 | ], 27 | "_prefab": { 28 | "__id__": 4 29 | }, 30 | "_lpos": { 31 | "__type__": "cc.Vec3", 32 | "x": 0, 33 | "y": 0, 34 | "z": 0 35 | }, 36 | "_lrot": { 37 | "__type__": "cc.Quat", 38 | "x": 0, 39 | "y": 0, 40 | "z": 0, 41 | "w": 1 42 | }, 43 | "_lscale": { 44 | "__type__": "cc.Vec3", 45 | "x": 1, 46 | "y": 1, 47 | "z": 1 48 | }, 49 | "_mobility": 0, 50 | "_layer": 33554432, 51 | "_euler": { 52 | "__type__": "cc.Vec3", 53 | "x": 0, 54 | "y": 0, 55 | "z": 0 56 | }, 57 | "_id": "" 58 | }, 59 | { 60 | "__type__": "cde15KM9mxA9L3SJ78TjOHf", 61 | "_name": "", 62 | "_objFlags": 0, 63 | "__editorExtras__": {}, 64 | "node": { 65 | "__id__": 1 66 | }, 67 | "_enabled": true, 68 | "__prefab": { 69 | "__id__": 3 70 | }, 71 | "cell": { 72 | "__uuid__": "5aa9450d-6710-4fac-a82c-ee2939cf9411", 73 | "__expectedType__": "cc.Prefab" 74 | }, 75 | "_id": "" 76 | }, 77 | { 78 | "__type__": "cc.CompPrefabInfo", 79 | "fileId": "3aBOvgZTJM7o51sRqaqstL" 80 | }, 81 | { 82 | "__type__": "cc.PrefabInfo", 83 | "root": { 84 | "__id__": 1 85 | }, 86 | "asset": { 87 | "__id__": 0 88 | }, 89 | "fileId": "7cYDN4HdROmJQ7qqaDYftE", 90 | "instance": null, 91 | "targetOverrides": null 92 | } 93 | ] -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/prefab/UIMgrToast.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.50", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "b2a00c44-d199-4031-8fa7-ea681618b9d4", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "UIMgrToast" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/prefab/UIMgrToastCell.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.50", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "5aa9450d-6710-4fac-a82c-ee2939cf9411", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "UIMgrToastCell" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/texture.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "f5f10a35-ca33-4eb2-81f1-52459832001b", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/texture/singleColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1076559139/XForge/65635cdd4768b6eb3aa07a7dca3283cd95169257/extensions/app/assets/manager/ui/texture/singleColor.png -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/texture/singleColor.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.27", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "5512993f-89ea-46fe-b788-0ecc0c2cd51c", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "5512993f-89ea-46fe-b788-0ecc0c2cd51c@6c48a", 14 | "displayName": "singleColor", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "clamp-to-edge", 19 | "wrapModeT": "clamp-to-edge", 20 | "imageUuidOrDatabaseUri": "5512993f-89ea-46fe-b788-0ecc0c2cd51c", 21 | "isUuid": true, 22 | "visible": false, 23 | "minfilter": "linear", 24 | "magfilter": "linear", 25 | "mipfilter": "none", 26 | "anisotropy": 0 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | }, 35 | "f9941": { 36 | "importer": "sprite-frame", 37 | "uuid": "5512993f-89ea-46fe-b788-0ecc0c2cd51c@f9941", 38 | "displayName": "singleColor", 39 | "id": "f9941", 40 | "name": "spriteFrame", 41 | "userData": { 42 | "trimType": "auto", 43 | "trimThreshold": 1, 44 | "rotated": false, 45 | "offsetX": 0, 46 | "offsetY": 0, 47 | "trimX": 0, 48 | "trimY": 0, 49 | "width": 2, 50 | "height": 2, 51 | "rawWidth": 2, 52 | "rawHeight": 2, 53 | "borderTop": 0, 54 | "borderBottom": 0, 55 | "borderLeft": 0, 56 | "borderRight": 0, 57 | "packable": true, 58 | "pixelsToUnit": 100, 59 | "pivotX": 0.5, 60 | "pivotY": 0.5, 61 | "meshType": 0, 62 | "vertices": { 63 | "rawPosition": [ 64 | -1, 65 | -1, 66 | 0, 67 | 1, 68 | -1, 69 | 0, 70 | -1, 71 | 1, 72 | 0, 73 | 1, 74 | 1, 75 | 0 76 | ], 77 | "indexes": [ 78 | 0, 79 | 1, 80 | 2, 81 | 2, 82 | 1, 83 | 3 84 | ], 85 | "uv": [ 86 | 0, 87 | 2, 88 | 2, 89 | 2, 90 | 0, 91 | 0, 92 | 2, 93 | 0 94 | ], 95 | "nuv": [ 96 | 0, 97 | 0, 98 | 1, 99 | 0, 100 | 0, 101 | 1, 102 | 1, 103 | 1 104 | ], 105 | "minPos": [ 106 | -1, 107 | -1, 108 | 0 109 | ], 110 | "maxPos": [ 111 | 1, 112 | 1, 113 | 0 114 | ] 115 | }, 116 | "isUuid": true, 117 | "imageUuidOrDatabaseUri": "5512993f-89ea-46fe-b788-0ecc0c2cd51c@6c48a", 118 | "atlasUuid": "" 119 | }, 120 | "ver": "1.0.12", 121 | "imported": true, 122 | "files": [ 123 | ".json" 124 | ], 125 | "subMetas": {} 126 | } 127 | }, 128 | "userData": { 129 | "type": "sprite-frame", 130 | "fixAlphaTransparencyArtifacts": true, 131 | "hasAlpha": false, 132 | "redirect": "5512993f-89ea-46fe-b788-0ecc0c2cd51c@6c48a" 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/texture/toastBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1076559139/XForge/65635cdd4768b6eb3aa07a7dca3283cd95169257/extensions/app/assets/manager/ui/texture/toastBox.png -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/texture/toastBox.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.27", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "b250e49c-5d79-4d07-a85f-a980fca36170", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "b250e49c-5d79-4d07-a85f-a980fca36170@6c48a", 14 | "displayName": "toastBox", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "clamp-to-edge", 19 | "wrapModeT": "clamp-to-edge", 20 | "imageUuidOrDatabaseUri": "b250e49c-5d79-4d07-a85f-a980fca36170", 21 | "isUuid": true, 22 | "visible": false, 23 | "minfilter": "linear", 24 | "magfilter": "linear", 25 | "mipfilter": "none", 26 | "anisotropy": 0 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | }, 35 | "f9941": { 36 | "importer": "sprite-frame", 37 | "uuid": "b250e49c-5d79-4d07-a85f-a980fca36170@f9941", 38 | "displayName": "toastBox", 39 | "id": "f9941", 40 | "name": "spriteFrame", 41 | "userData": { 42 | "trimType": "auto", 43 | "trimThreshold": 1, 44 | "rotated": false, 45 | "offsetX": 0, 46 | "offsetY": 0, 47 | "trimX": 0, 48 | "trimY": 0, 49 | "width": 288, 50 | "height": 78, 51 | "rawWidth": 288, 52 | "rawHeight": 78, 53 | "borderTop": 0, 54 | "borderBottom": 0, 55 | "borderLeft": 40, 56 | "borderRight": 40, 57 | "packable": true, 58 | "pixelsToUnit": 100, 59 | "pivotX": 0.5, 60 | "pivotY": 0.5, 61 | "meshType": 0, 62 | "vertices": { 63 | "rawPosition": [ 64 | -144, 65 | -39, 66 | 0, 67 | 144, 68 | -39, 69 | 0, 70 | -144, 71 | 39, 72 | 0, 73 | 144, 74 | 39, 75 | 0 76 | ], 77 | "indexes": [ 78 | 0, 79 | 1, 80 | 2, 81 | 2, 82 | 1, 83 | 3 84 | ], 85 | "uv": [ 86 | 0, 87 | 78, 88 | 288, 89 | 78, 90 | 0, 91 | 0, 92 | 288, 93 | 0 94 | ], 95 | "nuv": [ 96 | 0, 97 | 0, 98 | 1, 99 | 0, 100 | 0, 101 | 1, 102 | 1, 103 | 1 104 | ], 105 | "minPos": [ 106 | -144, 107 | -39, 108 | 0 109 | ], 110 | "maxPos": [ 111 | 144, 112 | 39, 113 | 0 114 | ] 115 | }, 116 | "isUuid": true, 117 | "imageUuidOrDatabaseUri": "b250e49c-5d79-4d07-a85f-a980fca36170@6c48a", 118 | "atlasUuid": "" 119 | }, 120 | "ver": "1.0.12", 121 | "imported": true, 122 | "files": [ 123 | ".json" 124 | ], 125 | "subMetas": {} 126 | } 127 | }, 128 | "userData": { 129 | "type": "sprite-frame", 130 | "fixAlphaTransparencyArtifacts": true, 131 | "hasAlpha": true, 132 | "redirect": "b250e49c-5d79-4d07-a85f-a980fca36170@6c48a" 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/texture/toastCell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1076559139/XForge/65635cdd4768b6eb3aa07a7dca3283cd95169257/extensions/app/assets/manager/ui/texture/toastCell.png -------------------------------------------------------------------------------- /extensions/app/assets/manager/ui/texture/toastCell.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.27", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "7922bee9-7eb5-449b-884e-14ac57ae515c", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "7922bee9-7eb5-449b-884e-14ac57ae515c@6c48a", 14 | "displayName": "toastCell", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "clamp-to-edge", 19 | "wrapModeT": "clamp-to-edge", 20 | "imageUuidOrDatabaseUri": "7922bee9-7eb5-449b-884e-14ac57ae515c", 21 | "isUuid": true, 22 | "visible": false, 23 | "minfilter": "linear", 24 | "magfilter": "linear", 25 | "mipfilter": "none", 26 | "anisotropy": 0 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | }, 35 | "f9941": { 36 | "importer": "sprite-frame", 37 | "uuid": "7922bee9-7eb5-449b-884e-14ac57ae515c@f9941", 38 | "displayName": "toastCell", 39 | "id": "f9941", 40 | "name": "spriteFrame", 41 | "userData": { 42 | "trimType": "auto", 43 | "trimThreshold": 1, 44 | "rotated": false, 45 | "offsetX": 0, 46 | "offsetY": 0, 47 | "trimX": 0, 48 | "trimY": 0, 49 | "width": 100, 50 | "height": 100, 51 | "rawWidth": 100, 52 | "rawHeight": 100, 53 | "borderTop": 15, 54 | "borderBottom": 15, 55 | "borderLeft": 15, 56 | "borderRight": 15, 57 | "packable": true, 58 | "pixelsToUnit": 100, 59 | "pivotX": 0.5, 60 | "pivotY": 0.5, 61 | "meshType": 0, 62 | "vertices": { 63 | "rawPosition": [ 64 | -50, 65 | -50, 66 | 0, 67 | 50, 68 | -50, 69 | 0, 70 | -50, 71 | 50, 72 | 0, 73 | 50, 74 | 50, 75 | 0 76 | ], 77 | "indexes": [ 78 | 0, 79 | 1, 80 | 2, 81 | 2, 82 | 1, 83 | 3 84 | ], 85 | "uv": [ 86 | 0, 87 | 100, 88 | 100, 89 | 100, 90 | 0, 91 | 0, 92 | 100, 93 | 0 94 | ], 95 | "nuv": [ 96 | 0, 97 | 0, 98 | 1, 99 | 0, 100 | 0, 101 | 1, 102 | 1, 103 | 1 104 | ], 105 | "minPos": [ 106 | -50, 107 | -50, 108 | 0 109 | ], 110 | "maxPos": [ 111 | 50, 112 | 50, 113 | 0 114 | ] 115 | }, 116 | "isUuid": true, 117 | "imageUuidOrDatabaseUri": "7922bee9-7eb5-449b-884e-14ac57ae515c@6c48a", 118 | "atlasUuid": "" 119 | }, 120 | "ver": "1.0.12", 121 | "imported": true, 122 | "files": [ 123 | ".json" 124 | ], 125 | "subMetas": {} 126 | } 127 | }, 128 | "userData": { 129 | "type": "sprite-frame", 130 | "hasAlpha": true, 131 | "fixAlphaTransparencyArtifacts": false, 132 | "redirect": "7922bee9-7eb5-449b-884e-14ac57ae515c@6c48a" 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /extensions/app/engine/.gitignore: -------------------------------------------------------------------------------- 1 | #///////////////////////////////////////////////////////////////////////////// 2 | # files 3 | #///////////////////////////////////////////////////////////////////////////// 4 | /node_modules -------------------------------------------------------------------------------- /extensions/app/engine/@types/extension.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace Editor { 2 | 3 | namespace Interface { 4 | // ---- Package ---- start 5 | interface PackageInfo { 6 | debug: boolean; 7 | enable: boolean; 8 | // TODO 更名为 packageJSON 更合适 9 | info: PackageJson; 10 | invalid: boolean; 11 | name: string; 12 | path: string; 13 | version: string; 14 | } 15 | 16 | interface PackageJson { 17 | name: string; 18 | version: string; 19 | 20 | title?: string; 21 | author?: string; 22 | debug?: boolean; 23 | description?: string; 24 | main?: string; 25 | editor?: string; 26 | panel?: any; 27 | contributions?: { 28 | [key: string]: any; 29 | builder?: string; // 构建插件注册脚本 30 | }; 31 | } 32 | // ---- Package ---- end 33 | 34 | // ---- UI ---- start 35 | interface PanelInfo { 36 | template?: string; 37 | style?: string; 38 | listeners?: { [key: string]: () => {} }; 39 | methods?: { [key: string]: Function }; 40 | $?: { [key: string]: string }; 41 | ready?(): void; 42 | update?(...args: any[]): void; 43 | beforeClose?(): void; 44 | close?(): void; 45 | } 46 | 47 | namespace UIKit { 48 | interface UIPanelInfo extends PanelInfo { 49 | // 向上触发事件 50 | dispath(eventName: string, ...arg: any): void; 51 | } 52 | 53 | interface EditorElementBase extends HTMLElement { 54 | value: any; 55 | dispath: (name: string, event: any) => void; 56 | } 57 | 58 | } 59 | // ---- UI ---- end 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/message.d.ts: -------------------------------------------------------------------------------- 1 | import * as AssetDB from './packages/asset-db/@types/message'; 2 | import * as Scene from './packages/scene/@types/message'; 3 | import * as Engine from './packages/engine/@types/message'; 4 | import * as Builder from './packages/builder/@types/public/message'; 5 | import * as Programming from './packages/programming/@types/message'; 6 | // import * as Extension from './packages/extension/@types/message'; 7 | 8 | declare global { 9 | interface EditorMessageContent { 10 | params: any[], 11 | result: any; 12 | } 13 | 14 | interface EditorMessageMap { 15 | [x: string]: EditorMessageContent; 16 | } 17 | 18 | interface EditorMessageMaps { 19 | [x: string]: EditorMessageMap; 20 | 'asset-db': AssetDB.message; 21 | 'scene': Scene.message; 22 | 'engine': Engine.message; 23 | 'builder': Builder.message; 24 | 'programming': Programming.message, 25 | // 'extension': Extension.message; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/alipay-mini-game/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | export * from '@editor/library-type/packages/builder/@types/protect'; 4 | import { IInternalBuildOptions, IPolyFills, ISettings } from '@editor/library-type/packages/builder/@types/protect'; 5 | 6 | export type IOrientation = 'landscape' | 'portrait'; 7 | 8 | export interface ITaskOption extends IInternalBuildOptions { 9 | packages: { 10 | 'alipay-mini-game': { 11 | deviceOrientation: IOrientation; 12 | }; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/android/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export * from '@editor/library-type/packages/builder/@types/protect'; 3 | 4 | import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect'; 5 | import { IOptions as INativeOption } from '@editor/library-type/packages/native'; 6 | 7 | export type IOrientation = 'landscape' | 'portrait'; 8 | 9 | export interface ITaskOption extends IInternalBuildOptions { 10 | packages: { 11 | 'android': IOptions; 12 | native: INativeOption; 13 | } 14 | } 15 | 16 | export type IAppABI = 'armeabi-v7a' | 'arm64-v8a' | 'x86' | 'x86_64'; 17 | 18 | export interface IOptions { 19 | packageName: string; 20 | orientation: { 21 | landscapeRight: boolean; 22 | landscapeLeft: boolean; 23 | portrait: boolean; 24 | upsideDown: boolean; 25 | }, 26 | 27 | apiLevel: number; 28 | appABIs: IAppABI[]; 29 | 30 | useDebugKeystore: boolean; 31 | keystorePath: string; 32 | keystorePassword: string; 33 | keystoreAlias: string; 34 | keystoreAliasPassword: string; 35 | 36 | appBundle: boolean; 37 | androidInstant: boolean; 38 | remoteUrl: string; 39 | sdkPath: string; 40 | ndkPath: string; 41 | 42 | swappy: boolean; 43 | 44 | renderBackEnd: { 45 | vulkan: boolean; 46 | gles3: boolean; 47 | gles2: boolean; 48 | } 49 | } 50 | 51 | export interface IBuildResult extends InternalBuildResult { 52 | userFrameWorks: boolean; // 是否使用用户的配置数据 53 | } 54 | 55 | export interface ICertificateSetting { 56 | country: string; 57 | state: string; 58 | locality: string; 59 | organizationalUnit: string; 60 | organization: string; 61 | email: string; 62 | certificatePath: string; 63 | 64 | password: string; // 密钥密码 65 | confirmPassword: string; // 确认密钥密码 66 | 67 | alias: string; // 密钥别名 68 | aliasPassword: string; 69 | confirmAliasPassword: string; 70 | 71 | validity: number; // 有效期 72 | } 73 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/asset-db/@types/public.d.ts: -------------------------------------------------------------------------------- 1 | // Basic information about the resource 2 | // 资源的基础信息 3 | export interface AssetInfo { 4 | // Asset name 5 | // 资源名字 6 | name: string; 7 | // Asset display name 8 | // 资源用于显示的名字 9 | displayName: string; 10 | // URL 11 | source: string; 12 | // loader 加载的层级地址 13 | path: string; 14 | // loader 加载地址会去掉扩展名,这个参数不去掉 15 | url: string; 16 | // 绝对路径 17 | file: string; 18 | // 资源的唯一 ID 19 | uuid: string; 20 | // 使用的导入器名字 21 | importer: string; 22 | // 类型 23 | type: string; 24 | // 是否是文件夹 25 | isDirectory: boolean; 26 | // 导入资源的 map 27 | library: { [key: string]: string }; 28 | // 子资源 map 29 | subAssets: { [key: string]: AssetInfo }; 30 | // 是否显示 31 | visible: boolean; 32 | // 是否只读 33 | readonly: boolean; 34 | 35 | // 虚拟资源可以实例化成实体的话,会带上这个扩展名 36 | instantiation?: string; 37 | // 跳转指向资源 38 | redirect?: IRedirectInfo; 39 | // 继承类型 40 | extends?: string[]; 41 | // 是否导入完成 42 | imported: boolean; 43 | // 是否导入失败 44 | invalid: boolean; 45 | } 46 | 47 | export interface IRedirectInfo { 48 | // 跳转资源的类型 49 | type: string; 50 | // 跳转资源的 uuid 51 | uuid: string; 52 | } 53 | 54 | export interface QueryAssetsOption { 55 | type?: string; 56 | pattern?: string; 57 | ccType?: string; 58 | extname?: string; 59 | importer?: string; 60 | isBundle?: boolean; 61 | } 62 | 63 | export interface AssetOperationOption { 64 | // 是否强制覆盖已经存在的文件,默认 false 65 | overwrite?: boolean; 66 | // 是否自动重命名冲突文件,默认 false 67 | rename?: boolean; 68 | } 69 | 70 | export interface AssetDBOptions { 71 | name: string; 72 | target: string; 73 | library: string; 74 | temp: string; 75 | /** 76 | * 0: 忽略错误 77 | * 1: 仅仅打印错误 78 | * 2: 打印错误、警告 79 | * 3: 打印错误、警告、日志 80 | * 4: 打印错误、警告、日志、调试信息 81 | */ 82 | level: number; 83 | ignoreFiles: string[]; 84 | readonly: boolean; 85 | } 86 | 87 | export interface ContributionInfo { 88 | mount?: { 89 | path: string; 90 | readonly?: boolean; 91 | visible?: boolean; 92 | enable?: string; 93 | }; 94 | } 95 | 96 | export interface ExecuteAssetDBScriptMethodOptions { 97 | name: string; 98 | method: string; 99 | args: any[]; 100 | } 101 | 102 | export interface IAssetMeta { 103 | ver: string; 104 | importer: string; 105 | imported: boolean; 106 | uuid: string; 107 | files: string[]; 108 | subMetas: { 109 | [index: string]: IAssetMeta; 110 | }; 111 | userData: { 112 | [index: string]: any; 113 | }; 114 | displayName: string; 115 | id: string; 116 | name: string; 117 | } 118 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/assets/@types/public.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 外部插件注册搜索方式指定返回的接口 3 | * 4 | * @export 5 | * @interface SearchMenuItem 6 | */ 7 | export interface SearchMenuItem { 8 | label: string; 9 | key: string; 10 | // handler 方法是外部扩展的搜索方法,返回 true 表示匹配搜索成功 11 | // searchValue 表示 assets 面板输入的搜索内容,asset 表示匹配搜索时的节点信息 12 | handler: (searchVale: string, asset: any) => boolean | Promise; 13 | } 14 | 15 | /** 16 | * 外部插件注册扩展的入口 17 | * 可以是搜索方式或限定搜索类型 18 | * 19 | * @export 20 | * @interface SearchExtension 21 | */ 22 | export interface SearchExtension { 23 | typeMenu?: Function; // 限定的搜索类型 24 | searchMenu: Function; // 搜索方式 25 | } 26 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/baidu-mini-game/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export * from '@editor/library-type/packages/builder/@types/protect'; 3 | 4 | import { IInternalBuildOptions } from '@editor/library-type/packages/builder/@types/protect'; 5 | 6 | export type IOrientation = 'auto' | 'landscape' | 'portrait'; 7 | 8 | export interface IOptions { 9 | appid: string; 10 | buildOpenDataContextTemplate: boolean; 11 | orientation: IOrientation; 12 | } 13 | 14 | export interface ITaskOption extends IInternalBuildOptions { 15 | packages: { 16 | 'baidu-mini-game': IOptions; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/builder/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from './public'; 3 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/builder/@types/public/global.d.ts: -------------------------------------------------------------------------------- 1 | import { IBuild } from '.'; 2 | 3 | // 定义 builder 进程内的全局变量 4 | declare global { 5 | // @ts-ignore 6 | const Build: IBuild; 7 | } 8 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/builder/@types/public/index.d.ts: -------------------------------------------------------------------------------- 1 | import { ITransformOptions } from './options'; 2 | 3 | export * from './build-result'; 4 | export * from './build-plugin'; 5 | export * from './texture-compress'; 6 | export * from './options'; 7 | 8 | interface IAppendRes { 9 | hash: string; 10 | paths: string[]; 11 | } 12 | 13 | interface ICreateBundleOptions { 14 | excludes?: string[]; 15 | debug?: boolean; 16 | sourceMap?: boolean; 17 | targets?: string; 18 | } 19 | export interface IBuildUtils { 20 | /** 21 | * 压缩 uuid 22 | * 'fc991dd7-0033-4b80-9d41-c8a86a702e59' -> 'fc9913XADNLgJ1ByKhqcC5Z' 23 | */ 24 | compressUuid: (uuid: string, min: boolean) => string; 25 | 26 | /** 27 | * 解压缩 uuid 28 | * 'fc9913XADNLgJ1ByKhqcC5Z' -> 'fc991dd7-0033-4b80-9d41-c8a86a702e59' 29 | */ 30 | decompressUuid: (uuid: string) => string; 31 | 32 | /** 33 | * 翻译带有 i18n 开头的名称(i18n:test)(待定) 34 | * 'i18n:test' -> '测试' 35 | */ 36 | transI18nName: (name: string) => string; 37 | 38 | /** 39 | * 移除 db 前缀 40 | * 'db://assets/test.jpg' -> 'assets/test.jpg' 41 | */ 42 | removeDbHeader: (url: string) => string; 43 | 44 | /** 45 | * 将 db 开头的 url 转为项目里的实际 url 46 | * 'db://assets/test.jpg' -> 'c:/project/assets/test.jpg' 47 | */ 48 | dbUrlToRawPath: (url: string) => string; 49 | 50 | /** 51 | * 从路径里获取存在的 uuid 52 | * 'E:\test3d\library\oc\0c0c1f5742-89b0-4a1e-b5eb-914d84f48c1c.json' -> '0c0c1f5742-89b0-4a1e-b5eb-914d84f48c1c' 53 | */ 54 | getUuidFromPath: (path: string) => string; 55 | 56 | /** 57 | * 检查是否全局安装了 nodejs 58 | */ 59 | isInstallNodeJs: () => Promise; 60 | 61 | /** 62 | * 逐文件拷贝 63 | */ 64 | copyDirSync: (src: string, dest: string) => void; 65 | 66 | /** 67 | * 获取相对路径接口 68 | * 返回 / 拼接的相对路径 69 | */ 70 | relativeUrl: (from: string, to: string) => string; 71 | 72 | transformCode: (code: string, options: ITransformOptions) => Promise; 73 | 74 | /** 75 | * 给指定路径添加 md5 76 | */ 77 | appendMd5ToPaths: (paths: string[]) => Promise; 78 | 79 | calcMd5: (data: Buffer | string) => string; 80 | 81 | copyPaths: (paths: { src: string; dest: string }[]) => Promise; 82 | 83 | createBundle: (src: string, dest: string, options?: ICreateBundleOptions) => Promise; 84 | } 85 | export interface IBuild { 86 | Utils: IBuildUtils; 87 | 88 | LIBRARY_NAME: string; 89 | IMPORT_HEADER: string; 90 | NATIVE_HEADER: string; 91 | ASSETS_HEADER: string; 92 | SUBPACKAGES_HEADER: string; 93 | REMOTE_HEADER: string; 94 | BUNDLE_SCRIPTS_HEADER: string; 95 | SCRIPT_NAME: string; 96 | CONFIG_NAME: string; 97 | BUNDLE_ZIP_NAME: string; 98 | projectTempDir: string; 99 | globalTempDir: string; 100 | buildTemplateDir: string; // 构建模板地址 build-templates 101 | } 102 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/builder/@types/public/message.d.ts: -------------------------------------------------------------------------------- 1 | import { IBundleConfig, ISettings, IOutputSettings } from './build-result'; 2 | import { IBuildTaskItemJSON } from './options'; 3 | export interface message extends EditorMessageMap { 4 | 'open-devtools': { 5 | params: [], 6 | result: void, 7 | }, 8 | open: { 9 | params: [], 10 | result: void, 11 | }, 12 | 'generate-preview-setting': { 13 | params: any[], 14 | result: Promise<{ 15 | settings: IOutputSettings; 16 | script2library: Record; 17 | bundleConfigs: IBundleConfig[]; 18 | }>, 19 | }, 20 | 'query-tasks-info': { 21 | params: [], 22 | result: { 23 | queue: Record, 24 | free: Promise, 25 | }, 26 | }, 27 | 'query-task': { 28 | params: string[], 29 | result: Promise, 30 | }, 31 | /** 32 | * 预览合图 33 | * @param {object} pacUuid 34 | */ 35 | 'preview-pac': { 36 | params: string[], 37 | result: Promise, 38 | }, 39 | 40 | } 41 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/builder/@types/public/texture-compress.d.ts: -------------------------------------------------------------------------------- 1 | export type ITextureCompressType = 2 | | 'jpg' 3 | | 'png' 4 | | 'webp' 5 | | 'pvrtc_4bits_rgb' 6 | | 'pvrtc_4bits_rgba' 7 | | 'pvrtc_4bits_rgb_a' 8 | | 'pvrtc_2bits_rgb' 9 | | 'pvrtc_2bits_rgba' 10 | | 'pvrtc_2bits_rgb_a' 11 | | 'etc1_rgb' 12 | | 'etc1_rgb_a' 13 | | 'etc2_rgb' 14 | | 'etc2_rgba' 15 | | 'astc_4x4' 16 | | 'astc_5x5' 17 | | 'astc_6x6' 18 | | 'astc_8x8' 19 | | 'astc_10x5' 20 | | 'astc_10x10' 21 | | 'astc_12x12' 22 | | string; 23 | export type ITextureCompressPlatform = 'miniGame' | 'web' | 'ios' | 'android'; 24 | 25 | export interface IHandlerInfo { 26 | type: 'program' | 'npm' | 'function'; 27 | info: ICommandInfo | Function; 28 | func?: Function; 29 | } 30 | 31 | export interface ICustomConfig { 32 | id: string; 33 | name: string; 34 | path: string; 35 | command: string; 36 | format: string; 37 | overwrite?: boolean; 38 | } 39 | 40 | export interface ICommandInfo { 41 | command: string; 42 | params?: string[]; 43 | path: string; 44 | } 45 | 46 | export interface ITextureFormatInfo { 47 | displayName: string; 48 | value: ITextureCompressType | string; 49 | formatSuffix?: string; 50 | alpha?: boolean; 51 | formatType?: string; 52 | handler?: IHandlerInfo; 53 | custom?: boolean; 54 | params?: string[]; 55 | } 56 | export interface ISupportFormat { 57 | rgb: ITextureCompressType[]; 58 | rgba: ITextureCompressType[]; 59 | } 60 | export interface IConfigGroupsInfo { 61 | defaultSupport?: ISupportFormat, 62 | support: ISupportFormat, 63 | displayName: string; 64 | icon: string; 65 | } 66 | export type IConfigGroups = Record; 67 | 68 | export type IPVRQuality = 'fastest' | 'fast' | 'normal' | 'high' | 'best'; 69 | export type IETCQuality = 'slow' | 'fast'; 70 | export type IASTCQuality = 'veryfast' | 'fast' | 'medium' | 'thorough' | 'exhaustive'; 71 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/bytedance-mini-game/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | export * from '@editor/library-type/packages/builder/@types/protect'; 4 | 5 | import { IInternalBuildOptions } from '@editor/library-type/packages/builder/@types/protect'; 6 | 7 | export type IOrientation = 'auto' | 'landscape' | 'portrait'; 8 | 9 | export interface IOptions { 10 | appid: string; 11 | buildOpenDataContextTemplate: boolean; 12 | orientation: IOrientation; 13 | physX: { 14 | use: 'physX' | 'project'; 15 | notPackPhysXLibs: boolean; 16 | mutiThread: boolean; 17 | subThreadCount: number; 18 | epsilon: number; 19 | }; 20 | } 21 | 22 | export interface ITaskOption extends IInternalBuildOptions { 23 | packages: { 24 | 'bytedance-mini-game': IOptions; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/certificate/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/channel-upload-tools/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/cocos-play/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | export * from '@editor/library-type/packages/builder/@types/protect'; 4 | import { IInternalBuildOptions } from '@editor/library-type/packages/builder/@types/protect'; 5 | 6 | export type IOrientation = 'landscape' | 'portrait'; 7 | 8 | export interface PlatformSettings { 9 | runtimeVersion: string, 10 | deviceOrientation: IOrientation, 11 | statusbarDisplay: boolean, 12 | startSceneAssetBundle: false, 13 | workerPath: string, 14 | XHRTimeout: number, 15 | WSTimeout: number, 16 | uploadFileTimeout: number, 17 | downloadFileTimeout: number, 18 | cameraPermissionHint: string, 19 | userInfoPermissionHint: string, 20 | locationPermissionHint: string, 21 | albumPermissionHint: string 22 | } 23 | 24 | export interface ITaskOption extends IInternalBuildOptions { 25 | packages: { 26 | 'cocos-play': PlatformSettings 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/console/@types/pritate.d.ts: -------------------------------------------------------------------------------- 1 | 2 | export type logType = 'log' | 'warn' | 'error'; 3 | export interface IMessageItem { 4 | rows: number; // 内部有几行 包括 details & stacks 5 | translateY: number; 6 | show: boolean; 7 | title: string; 8 | content: string[]; // details 9 | count: number; // 重复的个数 10 | fold: boolean; // 折叠 11 | type: logType; 12 | message: any; 13 | texture: string; // 纹理 light or dark 14 | date?: number; // 格式化的时间 15 | time?: number; // 时间戳 16 | process?: string; 17 | stack: string[]; 18 | } 19 | 20 | export interface INewItem { 21 | type: logType 22 | [propName: string]: any 23 | } 24 | 25 | export type ILogCounter = Record; 26 | 27 | export type IConsoleExtension = { 28 | name: string, 29 | key: string, 30 | label: string, 31 | value?: boolean, 32 | show: boolean 33 | } 34 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/engine-extends/@types/gltf-validator.d.ts: -------------------------------------------------------------------------------- 1 | 2 | declare module 'gltf-validator' { 3 | /** 4 | * Returns a version string. 5 | */ 6 | export const version: string; 7 | 8 | /** 9 | * Returns an array of supported extensions names. 10 | */ 11 | export const supportedExtensions: string[]; 12 | 13 | /** 14 | * @param uri Relative URI of the external resource. 15 | * @returns Promise with Uint8Array data. 16 | */ 17 | export type ExternalResourceFunction = (uri: string) => Promise; 18 | 19 | export interface ValidationOptions { 20 | /** 21 | * Absolute or relative asset URI that will be copied to validation report. 22 | */ 23 | uri?: string; 24 | 25 | /** 26 | * Max number of reported issues. Use 0 for unlimited output. 27 | */ 28 | maxIssues?: number; 29 | 30 | /** 31 | * Array of ignored issue codes. 32 | */ 33 | ignoredIssues?: string[]; 34 | 35 | /** 36 | * Object with overridden severities for issue codes. 37 | */ 38 | severityOverrides?: { 39 | [x: string]: number; 40 | }; 41 | 42 | /** 43 | * Function for loading external resources. If omitted, external resources are not validated. 44 | */ 45 | externalResourceFunction?: ExternalResourceFunction; 46 | 47 | /** 48 | * Set to false to skip reading of accessor data. 49 | */ 50 | validateAccessorData?: boolean; 51 | } 52 | 53 | export interface Resource { 54 | pointer: string; 55 | mimeType: string; 56 | storage: string; 57 | uri: string; 58 | } 59 | 60 | export interface Report { 61 | uri: string; 62 | mimeType: string; 63 | validatorVersion: string; 64 | validatedAt: string; 65 | issues: { 66 | numErrors: number; 67 | numWarnings: number; 68 | numInfos: number; 69 | numHints: number; 70 | messages: Array<{ 71 | code: string; 72 | message: string; 73 | pointer: string; 74 | severity: number; 75 | }>; 76 | truncated: boolean; 77 | }; 78 | info: { 79 | version: string; 80 | generator: string; 81 | resources: Array<{ 82 | pointer: string; 83 | mimeType: string; 84 | storage: string; 85 | uri: string; 86 | }>; 87 | hasAnimations: boolean; 88 | hasMaterials: boolean; 89 | hasMorphTargets: boolean; 90 | hasSkins: boolean; 91 | hasTextures: boolean; 92 | hasDefaultScene: boolean; 93 | primitivesCount: number; 94 | maxAttributesUsed: number; 95 | }; 96 | } 97 | 98 | export function validateBytes(data: Uint8Array, options?: ValidationOptions): Promise; 99 | 100 | export function validateString(json: string, options?: ValidationOptions): Promise; 101 | 102 | export const enum Severity { 103 | Error = 0, 104 | 105 | Warning = 1, 106 | 107 | Information = 2, 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/engine/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './module'; 2 | export interface EngineInfo { 3 | typescript: { 4 | type: 'builtin' | 'custom'; // 当前使用的引擎类型(内置或自定义) 5 | custom: string; // 自定义引擎地址 6 | builtin: string, // 内置引擎地址 7 | path: string; // 当前使用的引擎路径,为空也表示编译失败 8 | }, 9 | native: { 10 | type: 'builtin' | 'custom'; // 当前使用的引擎类型(内置或自定义) 11 | custom: string; // 自定义引擎地址 12 | builtin: string; // 内置引擎地址 13 | path: string; // 当前使用的引擎路径,为空也表示编译失败 14 | }, 15 | } 16 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/engine/@types/message.d.ts: -------------------------------------------------------------------------------- 1 | import { EngineInfo } from './index'; 2 | export interface message extends EditorMessageMap { 3 | 'query-info': { 4 | params: [] | [ 5 | string, 6 | ], 7 | result: { 8 | version: string; 9 | path: string; 10 | nativeVersion: string; // 原生引擎类型 'custom' 'builtin' 11 | nativePath: string; 12 | editor: string; 13 | }, 14 | }, 15 | 'query-engine-info': { 16 | params: [] | [ 17 | string, 18 | ], 19 | result: EngineInfo, 20 | }, 21 | } 22 | 23 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/engine/@types/module.d.ts: -------------------------------------------------------------------------------- 1 | 2 | export type IModules = Record; 3 | 4 | export interface IFlagBaseItem { 5 | /** 6 | * Display text. 7 | */ 8 | label: string; 9 | 10 | /** 11 | * Description. 12 | */ 13 | description?: string; 14 | 15 | native?: string; 16 | 17 | wechatPlugin?: boolean; 18 | 19 | default?: string[]; 20 | } 21 | 22 | export interface IBaseItem { 23 | /** 24 | * Display text. 25 | */ 26 | label: string; 27 | 28 | /** 29 | * Description. 30 | */ 31 | description?: string; 32 | 33 | required?: boolean; 34 | 35 | native?: string; 36 | 37 | wechatPlugin?: boolean; 38 | } 39 | 40 | export interface IModuleItem extends IBaseItem { 41 | /** 42 | * Display text. 43 | */ 44 | label: string; 45 | 46 | /** 47 | * Description. 48 | */ 49 | description?: string; 50 | 51 | /** 52 | * Whether if the feature of options allow multiple selection. 53 | */ 54 | multi?: boolean; 55 | 56 | /** 57 | * If have default it will checked 58 | */ 59 | default?: string[]; 60 | 61 | options?: Record; 62 | 63 | category?: string; 64 | 65 | flags?: Record; 66 | } 67 | 68 | export interface IDisplayModuleItem extends IModuleItem { 69 | _value: boolean; 70 | _option?: string; 71 | options?: Record; 72 | } 73 | 74 | export interface IDisplayModuleCache { 75 | _value: boolean; 76 | _option?: string; 77 | flags?: Record; 78 | } 79 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/huawei-agc/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | 2 | /// 3 | export * from '@editor/library-type/packages/builder/@types/protect'; 4 | 5 | import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect'; 6 | 7 | export type IOrientation = 'landscape' | 'portrait'; 8 | 9 | export interface ITaskOption extends IInternalBuildOptions { 10 | packages: { 11 | 'android': IOptions; 12 | } 13 | } 14 | 15 | export type IAppABI = 'armeabi-v7a' | 'arm64-v8a' | 'x86' | 'x86_64'; 16 | 17 | export interface IOptions { 18 | packageName: string; 19 | orientation: { 20 | landscapeRight: boolean; 21 | landscapeLeft: boolean; 22 | portrait: boolean; 23 | upsideDown: boolean; 24 | }, 25 | 26 | apiLevel: number; 27 | appABIs: IAppABI[]; 28 | 29 | useDebugKeystore: boolean; 30 | keystorePath: string; 31 | keystorePassword: string; 32 | keystoreAlias: string; 33 | keystoreAliasPassword: string; 34 | 35 | appBundle: boolean; 36 | androidInstant: boolean; 37 | remoteUrl: string; 38 | sdkPath: string; 39 | ndkPath: string; 40 | 41 | renderBackEnd: { 42 | vulkan: boolean; 43 | gles3: boolean; 44 | gles2: boolean; 45 | } 46 | } 47 | 48 | export interface IBuildResult extends InternalBuildResult { 49 | userFrameWorks: boolean; // 是否使用用户的配置数据 50 | } 51 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/huawei-quick-game/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export * from '@editor/library-type/packages/builder/@types/protect'; 3 | import { IInternalBuildOptions } from '@editor/library-type/packages/builder/@types/protect'; 4 | 5 | export type IOrientation = 'landscape' | 'portrait'; 6 | 7 | export interface ITaskOption extends IInternalBuildOptions { 8 | packages: { 9 | 'huawei-quick-game': IOptions; 10 | }; 11 | } 12 | 13 | export interface IOptions { 14 | package: string; 15 | icon: string; 16 | versionName: string; 17 | versionCode: string; 18 | minPlatformVersion: string; 19 | deviceOrientation: IOrientation; 20 | useDebugKey: boolean; 21 | privatePemPath: string; 22 | certificatePemPath: string; 23 | 24 | fullScreen: boolean; 25 | logLevel: string; 26 | manifestPath?: string; 27 | separateEngine: boolean; 28 | } 29 | 30 | export interface ICompileOptions { 31 | name: string; 32 | } 33 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/ios/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export * from '@editor/library-type/packages/builder/@types/protect'; 3 | 4 | import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect'; 5 | 6 | export type IOrientation = 'landscape' | 'portrait'; 7 | 8 | export interface ITaskOption extends IInternalBuildOptions { 9 | packages: { 10 | 'ios': IOptions; 11 | native: { 12 | JobSystem: 'none' | 'tbb' | 'taskFlow'; 13 | }; 14 | } 15 | } 16 | 17 | export interface IBuildResult extends InternalBuildResult { 18 | userFrameWorks: boolean; // 是否使用用户的配置数据 19 | } 20 | 21 | export interface IOptions { 22 | packageName: string; 23 | orientation: { 24 | landscapeRight: boolean; 25 | landscapeLeft: boolean; 26 | portrait: boolean; 27 | upsideDown: boolean; 28 | }, 29 | skipUpdateXcodeProject: boolean; 30 | renderBackEnd: { 31 | metal: boolean; 32 | gles3: boolean; 33 | gles2: boolean; 34 | }, 35 | osTarget: { 36 | iphoneos: boolean, 37 | simulator: boolean, 38 | }, 39 | developerTeam?: string, 40 | targetVersion: string, 41 | } 42 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/linux/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export * from '@editor/library-type/packages/builder/@types/protect'; 3 | import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect'; 4 | 5 | export interface ITaskOption extends IInternalBuildOptions { 6 | packages: { 7 | 'linux': IOptions; 8 | native: any; 9 | } 10 | } 11 | 12 | interface IOptions { 13 | renderBackEnd: { 14 | metal: boolean; 15 | gles3: boolean; 16 | gles2: boolean; 17 | }, 18 | } 19 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/gettext-parser/index.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for gettext-parser 4.0 2 | // Project: https://github.com/smhg/gettext-parser 3 | // Definitions by: Lorent Lempereur 4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped 5 | 6 | declare module 'gettext-parser' { 7 | export interface GetTextComment { 8 | translator?: string; 9 | reference?: string; 10 | extracted?: string; 11 | flag?: string; 12 | previous?: string; 13 | } 14 | 15 | export interface GetTextTranslation { 16 | msgctxt?: string | undefined; 17 | msgid: string; 18 | msgid_plural?: string; 19 | msgstr: string[]; 20 | comments: GetTextComment; 21 | } 22 | 23 | export interface GetTextTranslations { 24 | charset: string; 25 | headers: { [headerName: string]: string }; 26 | translations: { [msgctxt: string]: { [msgId: string]: GetTextTranslation } }; 27 | } 28 | 29 | export interface PoParser { 30 | parse: (buffer: Buffer | string, defaultCharset?: string) => GetTextTranslations; 31 | compile: (table: GetTextTranslations, options?: any) => Buffer; 32 | createParseStream: (buffer: any, defaultCharset?: string) => any; 33 | } 34 | 35 | export interface MoParser { 36 | parse: (buffer: Buffer | string, defaultCharset?: string) => GetTextTranslations; 37 | compile: (table: GetTextTranslations, options?: any) => Buffer; 38 | } 39 | 40 | export const po: PoParser; 41 | export const mo: MoParser; 42 | } 43 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | interface CCENodeEventMap { 2 | added (node: import('cc').Node): void 3 | change (node: import('cc').Node): void 4 | removed (node: import('cc').Node): void 5 | } 6 | 7 | interface CCEComponentEventMap { 8 | added (component: import('cc').Component): void, 9 | removed (component: import('cc').Component): void, 10 | } 11 | 12 | declare class CCENodeManager extends EventEmitter { 13 | on (message: T, callback: CCENodeEventMap[T]): this; 14 | off (message: T, callback: CCENodeEventMap[T]): this; 15 | } 16 | declare class CCEComponentManager extends EventEmitter { 17 | on (message: T, callback: CCEComponentEventMap[T]): this; 18 | off (message: T, callback: CCEComponentEventMap[T]): this; 19 | } 20 | 21 | type CCE = { 22 | Node: CCENodeManager, 23 | Component: CCEComponentManager, 24 | Prefab: { 25 | generatePrefabDataFromNode(nodeUUID: string| cc.Node): string | null 26 | } 27 | }; 28 | 29 | declare const cce: CCE; 30 | declare type UnPromise = T extends Promise ? R : T; 31 | declare type UUID = string; 32 | declare type Dump = { value: Record }; 33 | declare module 'cc/env' { 34 | export const EDITOR: boolean; 35 | export const BUILD: boolean; 36 | } 37 | declare const EditorExtends: any; 38 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/po.d.ts: -------------------------------------------------------------------------------- 1 | export type PoHeader = { 2 | /** This is the name and version of the package. */ 3 | 'Project-Id-Version'?: string 4 | /** (非必须) po 创建日期 */ 5 | 'POT-Creation-Date'?: string 6 | /** (非必须) po 修改日期*/ 7 | 'PO-Revision-Date'?: string 8 | /** 上一个翻译人员 */ 9 | 'Last-Translator'?: string 10 | /** 翻译团队的名称或者邮箱 */ 11 | 'Language-Team'?: string 12 | /** (非必须)要使 MIME 文档符合 RFC 2045,需要此字段在顶级头中值为 1.0 */ 13 | 'MIME-Version'?: '1.0' 14 | /** 译文的语言 */ 15 | Language: string 16 | /** Content-Type 定义了正文的类型,我们实际上是通过这个标识来知道正文内是什么类型的文件。比如:text/plain 表示的是无格式的文本正文,text/html 表示的 Html 文档,image/gif 表示的是 gif 格式的图片等等 */ 17 | 'Content-Type'?: 'text/plain; charset=UTF-8' 18 | /** 它表示了这个部分文档的编码方式。只有识别了这个说明,才能用正确的解码方式实现对其解码。 */ 19 | 'Content-Transfer-Encoding'?: '8bit' 20 | /** (非必须)复数的规则,*/ 21 | 'Plural-Forms'?: string 22 | } 23 | 24 | export type IPluralRulesJson = Record 25 | 26 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/components/icu-component.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/components/l10n-component.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { Component, Label } from 'cc'; 3 | export default abstract class L10nComponent extends Component { 4 | protected constructor(); 5 | get string(): string; 6 | label?: Label | null; 7 | protected onLoad(): void; 8 | protected start(): void; 9 | render(): void; 10 | preview(value: string): void; 11 | } 12 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/components/l10n-label.d.ts: -------------------------------------------------------------------------------- 1 | import L10nComponent from './l10n-component'; 2 | export default class L10nLabel extends L10nComponent { 3 | _key: string; 4 | set key(value: string); 5 | get key(): string; 6 | _count: number; 7 | set count(value: number); 8 | get count(): number; 9 | onLoad(): void; 10 | render(): void; 11 | } 12 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/core/asset-manager-initer.d.ts: -------------------------------------------------------------------------------- 1 | import { AssetManager } from 'cc'; 2 | import type { L10nManager } from './l10n-manager'; 3 | export default class AMPipeLineManager { 4 | initialized: boolean; 5 | l10n?: L10nManager; 6 | _redirectTask: this['redirectTask']; 7 | initAssetManager(l10n: L10nManager): void; 8 | uninstall(): void; 9 | redirectTask: (task: { 10 | output: AssetManager.RequestItem[]; 11 | input: AssetManager.RequestItem[]; 12 | }) => void; 13 | } 14 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/core/auto-config-intl-manager.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/core/icu-options.d.ts: -------------------------------------------------------------------------------- 1 | import { FallbackLanguage, L10nValue } from './l10n-options'; 2 | export declare type FormattedValue = string; 3 | export declare type TextInfoDirection = 'ltr' | 'rtl'; 4 | export interface StandardOption { 5 | count?: number; 6 | defaultValue?: L10nValue; 7 | language?: Intl.BCP47LanguageTag; 8 | fallbackLanguage?: FallbackLanguage; 9 | } 10 | export interface Template { 11 | [key: string]: string | { 12 | [key: string]: StandardOption; 13 | }; 14 | } 15 | export interface NumberFormatOptions extends Intl.NumberFormatOptions { 16 | style?: 'decimal' | 'percent' | 'currency' | string; 17 | /** 18 | * 货币代码,采用ISO 4217标准 19 | * @see ISO4217Tag 20 | */ 21 | currency?: string; 22 | currencySign?: 'standard' | 'accounting' | string; 23 | currencyDisplay?: 'symbol' | 'code' | 'name' | string; 24 | useGrouping?: boolean; 25 | minimumIntegerDigits?: number; 26 | minimumFractionDigits?: number; 27 | maximumFractionDigits?: number; 28 | minimumSignificantDigits?: number; 29 | maximumSignificantDigits?: number; 30 | } 31 | export interface DateTimeFormatOptions { 32 | localeMatcher?: 'best fit' | 'lookup' | undefined | string; 33 | weekday?: 'long' | 'short' | 'narrow' | undefined | string; 34 | era?: 'long' | 'short' | 'narrow' | undefined | string; 35 | year?: 'numeric' | '2-digit' | undefined | string; 36 | month?: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow' | undefined | string; 37 | day?: 'numeric' | '2-digit' | undefined | string; 38 | hour?: 'numeric' | '2-digit' | undefined | string; 39 | minute?: 'numeric' | '2-digit' | undefined | string; 40 | second?: 'numeric' | '2-digit' | undefined | string; 41 | timeZoneName?: 'long' | 'short' | undefined | string; 42 | formatMatcher?: 'best fit' | 'basic' | undefined | string; 43 | hour12?: boolean | undefined; 44 | timeZone?: string | undefined; 45 | } 46 | export declare type RelativeTimeFormatUnit = 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year' | string; 47 | export interface RelativeTimeFormatOptions { 48 | localeMatcher?: 'lookup' | 'best fit' | string; 49 | style?: 'narrow' | 'short' | 'long' | string; 50 | numeric?: 'auto' | 'always' | string; 51 | } 52 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/core/icu-type.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Intl formatting 3 | */ 4 | declare enum ICUType { 5 | DateTime = 0, 6 | Number = 1, 7 | List = 2, 8 | RelativeTime = 3, 9 | } 10 | export default ICUType; 11 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/core/l10n-listen-event.d.ts: -------------------------------------------------------------------------------- 1 | declare enum L10nListenEvent { 2 | languageChanged = 'languageChanged', 3 | onMissingKey = 'missingKey', 4 | } 5 | export default L10nListenEvent; 6 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/core/l10n-manager.d.ts: -------------------------------------------------------------------------------- 1 | import type { L10nOptions, ResourceData, L10nKey, L10nValue } from './l10n-options'; 2 | import { StandardOption, Template, TextInfoDirection } from './icu-options'; 3 | import L10nListenEvent from './l10n-listen-event'; 4 | import ResourceDataManager from './resource-data-manager'; 5 | import AMPipeLineManager from './asset-manager-initer'; 6 | export declare class L10nManager { 7 | static LOCAL_STORAGE_LANGUAGE_KEY: string; 8 | static DEFAULT_NAMESPACE: string; 9 | static l10n: L10nManager; 10 | /** 11 | * @zh 12 | * i18n 实例 13 | * @en 14 | * i18next instance 15 | */ 16 | private _intl?; 17 | private _options; 18 | private resourceList?; 19 | private resourceBundle; 20 | resourceDataManager: ResourceDataManager; 21 | amPipeLineManager: AMPipeLineManager; 22 | private constructor(); 23 | isInitialized(): boolean; 24 | createIntl(options: L10nOptions): Promise; 25 | cloneIntl(options: L10nOptions): void; 26 | reloadResourceData(): Promise; 27 | /** 初始化 i18next */ 28 | config(options: L10nOptions): void; 29 | changeLanguage(language: Intl.BCP47LanguageTag): Promise; 30 | t(key: L10nKey, options?: StandardOption | Template): L10nValue; 31 | /** 32 | * 实验性功能暂不开放 33 | * 数字类ICU 34 | */ 35 | private tn; 36 | /** 37 | * 实验性功能暂不开放 38 | * 日期/时刻类ICU 39 | */ 40 | private td; 41 | /** 42 | * 实验性功能暂不开放 43 | * 时长类ICU 44 | */ 45 | private tt; 46 | /** 47 | * 实验性功能暂不开放 48 | * 数组类ICU 49 | */ 50 | private tl; 51 | exists(key: L10nKey): boolean; 52 | get currentLanguage(): Intl.BCP47LanguageTag; 53 | get languages(): readonly Intl.BCP47LanguageTag[]; 54 | direction(language?: Intl.BCP47LanguageTag): TextInfoDirection; 55 | on(event: L10nListenEvent, callback: (...args: any[]) => void): void; 56 | off(event: L10nListenEvent, callback: (...args: any[]) => void): void; 57 | getResourceBundle(language: string): ResourceData | undefined; 58 | } 59 | declare const l10n: L10nManager; 60 | export default l10n; 61 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/core/l10n-options.d.ts: -------------------------------------------------------------------------------- 1 | export declare type L10nKey = string; 2 | export declare type L10nValue = string; 3 | export interface ResourceList { 4 | defaultLanguage?: Intl.BCP47LanguageTag; 5 | fallbackLanguage?: Intl.BCP47LanguageTag; 6 | languages: Intl.BCP47LanguageTag[]; 7 | } 8 | export interface ResourceBundle { 9 | [language: Intl.BCP47LanguageTag]: ResourceData; 10 | } 11 | export interface ResourceData { 12 | [namespace: string]: ResourceItem; 13 | } 14 | export interface ResourceItem { 15 | [key: string]: any; 16 | } 17 | export interface FallbackLanguageObjectList { 18 | [language: string]: readonly string[]; 19 | } 20 | export declare type FallbackLanguage = string | readonly string[] | FallbackLanguageObjectList | ((language: Intl.BCP47LanguageTag) => string | readonly string[] | FallbackLanguageObjectList); 21 | export interface L10nOptions { 22 | /** 23 | * Logs info level to console output. Helps finding issues with loading not working. 24 | * @default false 25 | */ 26 | /** 27 | * Resources to initialize with (if not using loading or not appending using addResourceBundle) 28 | * @default undefined 29 | */ 30 | resources?: ResourceBundle; 31 | /** 32 | * Language to use (overrides language detection) 33 | */ 34 | language?: Intl.BCP47LanguageTag; 35 | /** 36 | * Language to use if translations in user language are not available. 37 | * @default same as language 38 | */ 39 | fallbackLanguage?: false | FallbackLanguage; 40 | /** 41 | * @default IntlManager.LOCAL_STORAGE_LANGUAGE_KEY 42 | */ 43 | localStorageLanguageKey?: string; 44 | /** 45 | * @zh 46 | * 可以对key进行前置处理,返回值应该是处理后的key 47 | * 48 | * @en 49 | * Preprocess the key 50 | * 51 | * @param key 52 | * @return string 53 | * onBeforeProcessHandler 54 | */ 55 | beforeTranslate?: (key: L10nKey) => L10nValue; 56 | /** 57 | * @zh 58 | * 对value进行后置处理,返回值应该是处理后的value 59 | * 60 | * @en 61 | * Postprocess the value, return the processed value 62 | * 63 | * @param key 64 | * @param value 65 | * @return string 66 | */ 67 | afterTranslate?: (key: string, value: string) => string; 68 | /** 69 | * Allows null values as valid translation 70 | * @default true 71 | */ 72 | returnNull?: boolean; 73 | /** 74 | * Allows empty string as valid translation 75 | * @default true 76 | */ 77 | returnEmptyString?: boolean; 78 | } 79 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/core/localization-global.d.ts: -------------------------------------------------------------------------------- 1 | export declare const pluginName = 'Localization Editor'; 2 | export declare const mainName = 'localization-editor'; 3 | export declare const runtimeBundleName = 'l10n'; 4 | export declare const resourceListPath = 'resource-list'; 5 | export declare const resourceBundlePath = 'resource-bundle'; 6 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/core/resource-data-manager.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { AssetManager, JsonAsset } from 'cc'; 3 | import { ResourceBundle, ResourceList } from './l10n-options'; 4 | export default class ResourceDataManager { 5 | readResourceList(): Promise; 6 | readResourceBundle(tags: Intl.BCP47LanguageTag[]): Promise; 7 | /** 8 | * 编辑器模式下使用 9 | * @param locales 10 | */ 11 | editorLoad(locales: Intl.BCP47LanguageTag[]): Promise; 12 | /** 13 | * 构建后运行时使用 14 | * @param fileName 15 | */ 16 | runtimeLoad(fileName: string): Promise; 17 | /** 18 | * 浏览器预览使用 19 | * @param urlPath 20 | */ 21 | previewLoad(urlPath: string): Promise; 22 | checkBundle(bundleName: string): Promise; 23 | getBundle(bundleName: string): Promise; 24 | getResource(bundle: AssetManager.Bundle, resourceName: string): Promise; 25 | } 26 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/l10n.d.ts: -------------------------------------------------------------------------------- 1 | import l10n, { L10nManager } from './core/l10n-manager'; 2 | import L10nListenEvent from './core/l10n-listen-event'; 3 | import L10nLabel from './components/l10n-label'; 4 | export type { L10nKey, L10nValue, ResourceList, ResourceBundle, ResourceData, ResourceItem, FallbackLanguageObjectList, FallbackLanguage, L10nOptions } from './core/l10n-options'; 5 | export { l10n, L10nManager, L10nLabel, L10nListenEvent }; 6 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/polyfills/Intl.DateTimeFormat.d.ts: -------------------------------------------------------------------------------- 1 | import '@formatjs/intl-datetimeformat'; 2 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/polyfills/Intl.DisplayNames.d.ts: -------------------------------------------------------------------------------- 1 | import '@formatjs/intl-displaynames'; 2 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/polyfills/Intl.ListFormat.d.ts: -------------------------------------------------------------------------------- 1 | import '@formatjs/intl-listformat'; 2 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/polyfills/Intl.Locale.d.ts: -------------------------------------------------------------------------------- 1 | import '@formatjs/intl-locale'; 2 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/polyfills/Intl.NumberFormat.d.ts: -------------------------------------------------------------------------------- 1 | import '@formatjs/intl-numberformat'; 2 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/polyfills/Intl.PluralRules.d.ts: -------------------------------------------------------------------------------- 1 | import 'intl-pluralrules'; 2 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/polyfills/Intl.RelativeTimeFormat.d.ts: -------------------------------------------------------------------------------- 1 | import '@formatjs/intl-relativetimeformat'; 2 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/localization-editor/@types/runtime/polyfills/Intl.getCanonicalLocales.d.ts: -------------------------------------------------------------------------------- 1 | import '@formatjs/intl-getcanonicallocales'; 2 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/mac/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export * from '@editor/library-type/packages/builder/@types/protect'; 3 | 4 | import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect'; 5 | 6 | export type IOrientation = 'landscape' | 'portrait'; 7 | 8 | export interface ITaskOption extends IInternalBuildOptions { 9 | packages: { 10 | 'mac': IOptions; 11 | native: any; 12 | } 13 | } 14 | 15 | export interface IOptions { 16 | packageName: string; 17 | renderBackEnd: { 18 | metal: boolean; 19 | gles3: boolean; 20 | gles2: boolean; 21 | }, 22 | supportM1: boolean; 23 | skipUpdateXcodeProject: boolean; 24 | targetVersion: string; 25 | } 26 | 27 | export interface IBuildCache extends InternalBuildResult { 28 | userFrameWorks: boolean; // 是否使用用户的配置数据 29 | } 30 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/native/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export * from '@editor/library-type/packages/builder/@types/protect'; 3 | import { IInternalBuildOptions, InternalBuildResult, IPolyFills, IBuildScriptParam } from '@editor/library-type/packages/builder/@types/protect'; 4 | import { CocosParams } from 'native-pack-tool'; 5 | 6 | declare enum NetMode { 7 | client = 0, 8 | hostServer = 1, 9 | listenServer = 2, 10 | } 11 | export interface ITaskOptionPackages { 12 | native: IOptions; 13 | } 14 | 15 | interface ICustomBuildScriptParam extends IBuildScriptParam { 16 | experimentalHotReload: boolean; 17 | } 18 | 19 | export interface ITaskOption extends IInternalBuildOptions { 20 | packages: ITaskOptionPackages; 21 | buildScriptParam: ICustomBuildScriptParam; 22 | } 23 | 24 | export interface IOptions { 25 | template: string; 26 | engine?: string; 27 | runAfterMake: boolean; 28 | encrypted: boolean;// 是否加密脚本 29 | compressZip: boolean;// 是否压缩脚本 30 | xxteaKey?: string;// xxtea 加密的 key 值 31 | params?: CocosParams; // console 需要的参数 32 | JobSystem: 'none' | 'tbb' | 'taskFlow'; 33 | serverMode: boolean; 34 | netMode: NetMode; 35 | } 36 | 37 | export interface IBuildCache extends InternalBuildResult { 38 | userFrameWorks: boolean; // 是否使用用户的配置数据 39 | } 40 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/ohos/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export * from '@editor/library-type/packages/builder/@types/protect'; 3 | 4 | import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect'; 5 | 6 | export type IOrientation = 'landscape' | 'portrait'; 7 | 8 | export interface ITaskOption extends IInternalBuildOptions { 9 | packages: { 10 | 'ohos': IOptions; 11 | } 12 | } 13 | 14 | export interface IOptions { 15 | packageName: string; 16 | orientation: { 17 | landscapeRight: boolean; 18 | landscapeLeft: boolean; 19 | portrait: boolean; 20 | upsideDown: boolean; 21 | }, 22 | 23 | apiLevel: number; 24 | sdkPath: string; 25 | ndkPath: string; 26 | 27 | renderBackEnd: { 28 | // vulkan: boolean; 29 | gles3: boolean; 30 | // gles2: boolean; 31 | } 32 | } 33 | 34 | export interface IBuildResult extends InternalBuildResult { 35 | userFrameWorks: boolean; // 是否使用用户的配置数据 36 | } 37 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/open-harmonyos/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | 2 | /// 3 | /// 4 | 5 | export * from '@editor/library-type/packages/builder/@types/protect'; 6 | import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect'; 7 | export type IOrientation = 'landscape' | 'portrait'; 8 | 9 | export interface ITaskOption extends IInternalBuildOptions { 10 | packages: { 11 | 'open-harmonyos': IOptions; 12 | } 13 | } 14 | 15 | export interface IOptions { 16 | packageName: string; 17 | orientation: { 18 | landscapeRight: boolean; 19 | landscapeLeft: boolean; 20 | portrait: boolean; 21 | upsideDown: boolean; 22 | }, 23 | 24 | apiLevel: string; 25 | sdkPath: string; 26 | ndkPath: string; 27 | 28 | renderBackEnd: { 29 | // vulkan: boolean; 30 | gles3: boolean; 31 | // gles2: boolean; 32 | } 33 | } 34 | 35 | export interface IBuildResult extends InternalBuildResult { 36 | userFrameWorks: boolean; // 是否使用用户的配置数据 37 | } 38 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/oppo-mini-game/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export * from '@editor/library-type/packages/builder/@types/protect'; 3 | import { IInternalBuildOptions } from '@editor/library-type/packages/builder/@types/protect'; 4 | 5 | export type IOrientation = 'landscape' | 'portrait'; 6 | export interface ITaskOption extends IInternalBuildOptions { 7 | packages: { 8 | 'oppo-mini-game': IOptions; 9 | }; 10 | } 11 | 12 | export interface IOptions { 13 | package: string; 14 | icon: string; 15 | versionName: string; 16 | versionCode: string; 17 | minPlatformVersion: string; 18 | deviceOrientation: IOrientation; 19 | useDebugKey: boolean; 20 | privatePemPath: string; 21 | certificatePemPath: string; 22 | hasSubPackage?: boolean; 23 | separateEngine: boolean; 24 | } 25 | 26 | export interface ICompileOptions { 27 | name: string; 28 | useDebugKey: boolean; 29 | hasSubPackage: boolean; 30 | } 31 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/package-asset/@types/public.d.ts: -------------------------------------------------------------------------------- 1 | export interface MenuAssetInfo { 2 | // 资源名字 3 | name: string; 4 | // 资源用于显示的名字 5 | displayName: string; 6 | // loader 加载的层级地址 7 | url: string; 8 | // 绝对路径 9 | file: string; 10 | // 资源的唯一 ID 11 | uuid: string; 12 | // 使用的导入器名字 13 | importer: string; 14 | // 类型 15 | type: string; 16 | // 是否是文件夹 17 | isDirectory: boolean; 18 | // 是否只读 19 | readonly: boolean; 20 | // 虚拟资源可以实例化成实体的话,会带上这个扩展名 21 | instantiation?: string; 22 | // 跳转指向资源 23 | redirect?: IRedirectInfo; 24 | // 继承类型 25 | extends?: string[]; 26 | // 是否导入完成 27 | imported: boolean; 28 | // 是否导入失败 29 | invalid: boolean; 30 | } 31 | 32 | export interface IRedirectInfo { 33 | // 跳转资源的类型 34 | type: string; 35 | // 跳转资源的 uuid 36 | uuid: string; 37 | } 38 | export interface IAssetInfo { 39 | name: string; // 资源名字 40 | displayName: string; // 资源用于显示的名字 41 | source: string; // url 地址 42 | path: string; // loader 加载的层级地址 43 | url: string; // loader 加载地址会去掉扩展名,这个参数不去掉 44 | file: string; // 绝对路径 45 | uuid: string; // 资源的唯一 ID 46 | importer: string; // 使用的导入器名字 47 | imported: boolean; // 是否结束导入过程 48 | invalid: boolean; // 是否导入成功 49 | type: string; // 类型 50 | isDirectory: boolean; // 是否是文件夹 51 | library: { [key: string]: string }; // 导入资源的 map 52 | subAssets: { [key: string]: IAssetInfo }; // 子资源 map 53 | visible: boolean; // 是否显示 54 | readonly: boolean; // 是否只读 55 | 56 | instantiation?: string; // 虚拟资源可以实例化成实体的话,会带上这个扩展名 57 | redirect?: IRedirectInfo; // 跳转指向资源 58 | meta?: any, 59 | fatherInfo?: any; 60 | } 61 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/preview/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './protect'; 2 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/programming/@types/message.d.ts: -------------------------------------------------------------------------------- 1 | export interface message extends EditorMessageMap { 2 | 'query-shared-settings': { 3 | params: [], 4 | result: { 5 | useDefineForClassFields: boolean; 6 | allowDeclareFields: boolean; 7 | loose: boolean; 8 | guessCommonJsExports: boolean; 9 | exportsConditions: string[]; 10 | importMap?: { 11 | json: { 12 | imports?: Record; 13 | scopes?: Record>; 14 | }; 15 | url: string; 16 | }; 17 | } 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/runtime-dev-tools/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export * from '../../../@types/editor'; 3 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/scene/@types/engine-view.d.ts: -------------------------------------------------------------------------------- 1 | import type { WebviewTag } from 'electron'; 2 | import ISceneFacade from './scene-facade-interface'; 3 | /** 4 | * 这个是 engine-view 标签的接口 5 | */ 6 | export interface EngineView { 7 | dirty: boolean; 8 | managerReady: boolean; 9 | 10 | $scene: WebviewTag; 11 | depend: any; 12 | $floatWindow: any; 13 | 14 | // 封装的 webview 通讯模块 15 | ipc: any; 16 | 17 | info: any; 18 | 19 | /** 20 | * 初始化 21 | */ 22 | init(): Promise; 23 | 24 | /** 25 | * 调用场景进程里的方法 26 | * @param methodName 27 | * @param params 28 | * @param forced 29 | * @param timeout 30 | */ 31 | 32 | callSceneMethod(methodName: T, params: Parameters, forced?: boolean, timeout?: boolean): Promise> 33 | 34 | /** 35 | * 执行组件方法 36 | * @param options 37 | */ 38 | executeComponentMethod(options: { uuid: string, index: number, methodNames: string[] }); 39 | 40 | ////////////// 41 | 42 | attachFloatWindow(name: string, options: FloatWindowOptions) 43 | 44 | detachFloatWindow(name: string) 45 | 46 | attachToolbar(name: string, options: any) 47 | 48 | detachToolbar(name: string) 49 | 50 | attachInfobar(name: string, options: any) 51 | 52 | detachInfobar(name: string) 53 | } 54 | export interface FloatWindowOptions { 55 | type: string; 56 | width: number; 57 | height: number; 58 | top?: number; 59 | bottom?: number; 60 | left?: number; 61 | right?: number; 62 | 63 | dock?: boolean; 64 | 65 | mode?: 'dock' | 'simple'; 66 | 67 | template: string; 68 | ready?: ($window: HTMLDivElement, info: ScenePluginInfo, componentMap: { [type: string]: ScenePluginComponentInfo[] }) => void; 69 | close?: Function; 70 | update?: Function; 71 | send?: Function; 72 | } 73 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/scene/@types/message.d.ts: -------------------------------------------------------------------------------- 1 | import { 2 | SetPropertyOptions, 3 | } from './public'; 4 | 5 | export interface message extends EditorMessageMap { 6 | 'update-create-node-template': { 7 | params: [], 8 | result: any, 9 | }, 10 | 'open': { 11 | params: [], 12 | result: any, 13 | }, 14 | 'open-devtools': { 15 | params: [], 16 | result: any, 17 | }, 18 | 'graphical-tools': { 19 | params: [ 20 | boolean, 21 | ], 22 | result: void, 23 | }, 24 | 'open-scene': { 25 | params: [ 26 | string, 27 | ], 28 | result: boolean, 29 | }, 30 | 'save-scene': { 31 | params: [] | [ 32 | boolean, 33 | ], 34 | result: boolean, 35 | }, 36 | 'save-as-scene': { 37 | params: [ 38 | boolean, 39 | ], 40 | result: boolean, 41 | }, 42 | 'close-scene': { 43 | params: [], 44 | result: boolean, 45 | }, 46 | 'set-property': { 47 | params: [ 48 | SetPropertyOptions, 49 | ], 50 | result: boolean, 51 | }, 52 | 'query-node-tree': { 53 | params: [] | [ 54 | string, 55 | ], 56 | result: any, 57 | }, 58 | 'execute-scene-script': { 59 | params: [] | [ 60 | { 61 | name: string; 62 | method: string; 63 | args: any[]; 64 | } 65 | ], 66 | result: any, 67 | }, 68 | } 69 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/server/@types/package.d.ts: -------------------------------------------------------------------------------- 1 | // 消息定义 2 | interface MessageInterface { 3 | params: any[], 4 | result: any; 5 | } 6 | 7 | // host 8 | export interface HostInfo { 9 | host: string; 10 | ip: string; 11 | port: number; 12 | } 13 | 14 | // 消息定义 15 | export interface main { 16 | scene: { 17 | [x: string]: MessageInterface; 18 | 'query-port': { 19 | params: [], 20 | result: number, 21 | }; 22 | 'scan-lan': { 23 | params: [], 24 | result: HostInfo[], 25 | }; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/shortcuts/@types/shortcut.d.ts: -------------------------------------------------------------------------------- 1 | export interface ShortcutItem { 2 | when: string; 3 | message: string; 4 | shortcut: string; 5 | pkgName: string; 6 | params?: Array; 7 | rawShortcut?: string; 8 | key: string; 9 | missing?: boolean; 10 | } 11 | 12 | export type IShortcutItemMap = Record; 13 | 14 | export interface IShortcutEditInfo { 15 | key: string; 16 | shortcut: string; 17 | searches: ShortcutItem[]; 18 | conflict: boolean; 19 | when: string; 20 | } 21 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/vivo-mini-game/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export * from '@editor/library-type/packages/builder/@types/protect'; 3 | import { IInternalBuildOptions } from '@editor/library-type/packages/builder/@types/protect'; 4 | 5 | export type IOrientation = 'landscape' | 'portrait'; 6 | 7 | export interface ITaskOption extends IInternalBuildOptions { 8 | packages: { 9 | 'vivo-mini-game': IOptions; 10 | } 11 | } 12 | 13 | export interface IOptions { 14 | package: string; 15 | icon: string; 16 | versionName: string; 17 | versionCode: string; 18 | minPlatformVersion: string; 19 | deviceOrientation: IOrientation; 20 | useDebugKey: boolean; 21 | privatePemPath: string; 22 | certificatePemPath: string; 23 | logLevel: string; 24 | separateEngine: boolean; 25 | } 26 | 27 | export interface ICompileOptions { 28 | name: string; 29 | useDebugKey: boolean; 30 | } 31 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/web-desktop/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export * from '@editor/library-type/packages/builder/@types/protect'; 3 | 4 | import { appTemplateData, IInternalBuildOptions, IPolyFills } from '@editor/library-type/packages/builder/@types/protect'; 5 | 6 | export interface IOptions { 7 | resolution: { 8 | designHeight: number; 9 | designWidth: number; 10 | }, 11 | } 12 | export interface ITaskOption extends IInternalBuildOptions { 13 | packages: { 14 | 'web-desktop': IOptions; 15 | }; 16 | appTemplateData: appTemplateData; 17 | } 18 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/web-mobile/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export * from '@editor/library-type/packages/builder/@types/protect'; 3 | 4 | import { IInternalBuildOptions, IPolyFills, ISettings } from '@editor/library-type/packages/builder/@types/protect'; 5 | 6 | export type IOrientation = 'auto' | 'landscape' | 'portrait'; 7 | export interface IOptions { 8 | orientation: IOrientation; 9 | embedWebDebugger: boolean; 10 | } 11 | export interface ITaskOption extends IInternalBuildOptions { 12 | packages: { 13 | 'web-mobile': IOptions; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/wechatgame/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export * from '@editor/library-type/packages/builder/@types/protect'; 3 | export * from '../../../@types/editor'; 4 | 5 | import { IInternalBuildOptions } from '@editor/library-type/packages/builder/@types/protect'; 6 | 7 | export type IOrientation = 'auto' | 'landscape' | 'portrait'; 8 | 9 | export interface IOptions { 10 | appid: string; 11 | buildOpenDataContextTemplate: boolean; 12 | orientation: IOrientation; 13 | separateEngine: boolean; 14 | wasm: 'js' | 'wasm' | boolean; 15 | enabelWebGL2: 'off' | 'sameAsProjectSetting'; 16 | } 17 | 18 | export interface ITaskOption extends IInternalBuildOptions { 19 | packages: { 20 | wechatgame: IOptions; 21 | }; 22 | } 23 | 24 | // TODO 需要更新 editor 接口定义 25 | export type IModules = Record; 26 | 27 | export interface IFlagBaseItem { 28 | /** 29 | * Display text. 30 | */ 31 | label: string; 32 | 33 | /** 34 | * Description. 35 | */ 36 | description?: string; 37 | 38 | native?: string; 39 | 40 | wechatPlugin?: boolean; 41 | 42 | default?: string[]; 43 | } 44 | export interface IBaseItem { 45 | /** 46 | * Display text. 47 | */ 48 | label: string; 49 | 50 | /** 51 | * Description. 52 | */ 53 | description?: string; 54 | 55 | required?: boolean; 56 | 57 | native?: string; 58 | 59 | wechatPlugin?: boolean; 60 | } 61 | 62 | export interface IModuleItem extends IBaseItem { 63 | /** 64 | * Display text. 65 | */ 66 | label: string; 67 | 68 | /** 69 | * Description. 70 | */ 71 | description?: string; 72 | 73 | /** 74 | * Whether if the feature of options allow multiple selection. 75 | */ 76 | multi?: boolean; 77 | 78 | /** 79 | * If have default it will checked 80 | */ 81 | default?: string[]; 82 | 83 | options?: Record; 84 | 85 | category?: string; 86 | 87 | flags?: Record; 88 | } 89 | 90 | export interface IDisplayModuleItem extends IModuleItem { 91 | _value: boolean; 92 | _option?: string; 93 | options?: Record; 94 | } 95 | 96 | export interface IDisplayModuleCache { 97 | _value: boolean; 98 | _option?: string; 99 | flags?: Record; 100 | } 101 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/windows/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export * from '@editor/library-type/packages/builder/@types/protect'; 3 | 4 | import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect'; 5 | import { IOptions as INativeOption } from '@editor/library-type/packages/native'; 6 | 7 | export type IOrientation = 'landscape' | 'portrait'; 8 | 9 | export interface ITaskOption extends IInternalBuildOptions { 10 | packages: { 11 | 'windows': IOptions; 12 | native: INativeOption; 13 | } 14 | } 15 | 16 | export interface IOptions { 17 | renderBackEnd: { 18 | vulkan: boolean; 19 | gles3: boolean; 20 | gles2: boolean; 21 | }; 22 | targetPlatform: 'win32' | 'x64'; 23 | serverMode: boolean; 24 | targetPlatform: 'x64'; 25 | } 26 | 27 | export interface IBuildResult extends InternalBuildResult { 28 | userFrameWorks: boolean; // 是否使用用户的配置数据 29 | } 30 | -------------------------------------------------------------------------------- /extensions/app/engine/@types/packages/xiaomi-quick-game/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from '@editor/library-type/packages/builder/@types/protect'; 3 | import { IInternalBuildOptions, ISettings } from '@editor/library-type/packages/builder/@types/protect'; 4 | 5 | export type IOrientation = 'landscape' | 'portrait'; 6 | 7 | export interface ITaskOption extends IInternalBuildOptions { 8 | packages: { 9 | 'xiaomi-quick-game': IOptions; 10 | }; 11 | } 12 | 13 | export interface IOptions { 14 | package: string; 15 | icon: string; 16 | versionName: string; 17 | versionCode: string; 18 | minPlatformVersion: string; 19 | deviceOrientation: IOrientation; 20 | useDebugKey: boolean; 21 | privatePemPath: string; 22 | certificatePemPath: string; 23 | logLevel: string; 24 | 25 | encapsulation: boolean; 26 | } 27 | 28 | export interface ICompileOption { 29 | name: string; 30 | useDebugKey: boolean; 31 | tinyPackageServer: string; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /extensions/app/engine/dist/builder/hooks.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | exports.onAfterBuild = void 0; 7 | const path_1 = __importDefault(require("path")); 8 | const file_1 = require("./utils/file"); 9 | const onAfterBuild = async function (options, result) { 10 | if (options.platform !== 'web-mobile' && options.platform !== 'web-desktop') { 11 | return; 12 | } 13 | if (!options.md5Cache) { 14 | return; 15 | } 16 | file_1.adaptFileMD5(path_1.default.join(result.dest, 'index.html')); 17 | }; 18 | exports.onAfterBuild = onAfterBuild; 19 | -------------------------------------------------------------------------------- /extensions/app/engine/dist/builder/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.configs = void 0; 4 | exports.configs = { 5 | '*': { 6 | hooks: './hooks', 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /extensions/app/engine/dist/inspector/asset-directory.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.close = exports.ready = exports.update = exports.template = exports.$ = void 0; 4 | const fs_1 = require("fs"); 5 | const path_1 = require("path"); 6 | exports.$ = { 7 | 'code': '#code', 8 | 'section': '#section', 9 | }; 10 | exports.template = ` 11 | 12 | 13 | 14 | `; 15 | function update(assetList, metaList) { 16 | this.assetList = assetList; 17 | this.metaList = metaList; 18 | if (assetList.length === 0) { 19 | this.$.code.innerHTML = ''; 20 | } 21 | else { 22 | this.$.code.innerHTML = assetList 23 | .filter((asset) => { 24 | const mdFile = path_1.join(asset.file, `.${asset.name}.md`); 25 | return fs_1.existsSync(mdFile); 26 | }) 27 | .map((asset) => { 28 | const mdFile = path_1.join(asset.file, `.${asset.name}.md`); 29 | const mdStr = fs_1.readFileSync(mdFile, 'utf-8'); 30 | return assetList.length > 1 ? `${asset.url}:\n ${mdStr}` : mdStr; 31 | }) 32 | .join('\n') || ''; 33 | } 34 | if (this.$.code.innerHTML === '') { 35 | this.$.section.hidden = true; 36 | } 37 | else { 38 | this.$.section.hidden = false; 39 | } 40 | } 41 | exports.update = update; 42 | function ready() { 43 | // TODO something 44 | } 45 | exports.ready = ready; 46 | function close() { 47 | // TODO something 48 | } 49 | exports.close = close; 50 | -------------------------------------------------------------------------------- /extensions/app/engine/dist/menu/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | exports.onAssetMenu = exports.onPanelMenu = exports.onDBMenu = exports.onCreateMenu = void 0; 7 | const tinyPNG_1 = __importDefault(require("./tinyPNG")); 8 | function getMenu(assetInfo) { 9 | return [ 10 | { 11 | label: 'i18n:app.app', 12 | submenu: [ 13 | { 14 | label: 'i18n:app.tiny', 15 | click() { 16 | tinyPNG_1.default(assetInfo.file); 17 | }, 18 | } 19 | ], 20 | }, 21 | ]; 22 | } 23 | function onCreateMenu(assetInfo) { 24 | // return getMenu(); 25 | } 26 | exports.onCreateMenu = onCreateMenu; 27 | function onDBMenu(assetInfo) { 28 | // return getMenu(); 29 | } 30 | exports.onDBMenu = onDBMenu; 31 | function onPanelMenu(assetInfo) { 32 | // return getMenu(); 33 | } 34 | exports.onPanelMenu = onPanelMenu; 35 | function onAssetMenu(assetInfo) { 36 | return getMenu(assetInfo); 37 | } 38 | exports.onAssetMenu = onAssetMenu; 39 | -------------------------------------------------------------------------------- /extensions/app/engine/dist/panel/components/app-create.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | const fs_1 = require("fs"); 7 | const path_1 = require("path"); 8 | const vue_1 = __importDefault(require("../../../../vue")); 9 | const create_controller_1 = __importDefault(require("./create-controller")); 10 | const create_manager_1 = __importDefault(require("./create-manager")); 11 | const create_model_1 = __importDefault(require("./create-model")); 12 | const create_res_1 = __importDefault(require("./create-res")); 13 | const create_sound_1 = __importDefault(require("./create-sound")); 14 | const create_view_1 = __importDefault(require("./create-view")); 15 | const Assets = path_1.join(__dirname, '../../../res/panel'); 16 | const Menus = ['ViewComponent', 'ManagerComponent', 'ControllerComponent', 'ModelComponent', 'SoundComponent', 'ResComponent']; 17 | exports.default = vue_1.default.extend({ 18 | components: { ViewComponent: create_view_1.default, ManagerComponent: create_manager_1.default, ControllerComponent: create_controller_1.default, ModelComponent: create_model_1.default, SoundComponent: create_sound_1.default, ResComponent: create_res_1.default }, 19 | template: fs_1.readFileSync(path_1.join(Assets, 'components/app.html'), 'utf-8'), 20 | data() { 21 | return { 22 | menus: ['View', 'Manager', 'Controller', 'Model', 'Sound', '资源目录'], 23 | content: 'ViewComponent' 24 | }; 25 | }, 26 | methods: { 27 | onClick(index) { 28 | this.content = Menus[index]; 29 | } 30 | }, 31 | }); 32 | -------------------------------------------------------------------------------- /extensions/app/engine/dist/panel/components/app.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | const fs_1 = require("fs"); 7 | const path_1 = require("path"); 8 | const vue_1 = __importDefault(require("../../../../vue")); 9 | const create_controller_1 = __importDefault(require("./create-controller")); 10 | const create_manager_1 = __importDefault(require("./create-manager")); 11 | const create_model_1 = __importDefault(require("./create-model")); 12 | const create_res_1 = __importDefault(require("./create-res")); 13 | const create_sound_1 = __importDefault(require("./create-sound")); 14 | const create_view_1 = __importDefault(require("./create-view")); 15 | const Assets = path_1.join(__dirname, '../../../res/panel'); 16 | const Menus = ['ViewComponent', 'ManagerComponent', 'ControllerComponent', 'ModelComponent', 'SoundComponent', 'ResComponent']; 17 | exports.default = vue_1.default.extend({ 18 | components: { ViewComponent: create_view_1.default, ManagerComponent: create_manager_1.default, ControllerComponent: create_controller_1.default, ModelComponent: create_model_1.default, SoundComponent: create_sound_1.default, ResComponent: create_res_1.default }, 19 | template: fs_1.readFileSync(path_1.join(Assets, 'components/app.html'), 'utf-8'), 20 | data() { 21 | return { 22 | menus: ['View', 'Manager', 'Controller', 'Model', 'Sound', '资源目录'], 23 | content: 'ViewComponent' 24 | }; 25 | }, 26 | methods: { 27 | onClick(index) { 28 | this.content = Menus[index]; 29 | } 30 | }, 31 | }); 32 | -------------------------------------------------------------------------------- /extensions/app/engine/dist/panel/components/create-res.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | const vue_1 = __importDefault(require("../../../../vue")); 7 | const utils_1 = require("../../utils"); 8 | const typeNames = ['res-native', 'res-bundle', 'resources']; 9 | exports.default = vue_1.default.extend({ 10 | template: utils_1.getResPanel('create-res'), 11 | data() { 12 | return { 13 | inputName: '', 14 | display: '', 15 | typeSelects: ['公共静态目录', '公共动态目录', 'resources'], 16 | typeSelectIndex: 0, 17 | showLoading: false 18 | }; 19 | }, 20 | methods: { 21 | onChangeTypeSelect(index) { 22 | this.typeSelectIndex = Number(index); 23 | }, 24 | async onClickCreate() { 25 | const folderName = typeNames[this.typeSelectIndex]; 26 | const folderPath = `db://assets/${folderName}`; 27 | const name = utils_1.stringCase(this.inputName, true); 28 | if (/^[a-z][a-z0-9-]*[a-z0-9]+$/.test(this.inputName) === false) { 29 | this.display = '[错误] 名字不合法\n1、不能以数字开头\n2、不能有大写字母\n3、分隔符只能使用-\n4、不能以分隔符开头或结尾'; 30 | return; 31 | } 32 | if (name === 'resources') { 33 | this.display = '[错误] 名字不合法\n1、不能使用resources作为名字'; 34 | return; 35 | } 36 | // 创建前确认 37 | const createResponse = await Editor.Dialog.info('请确认', { detail: name, buttons: ['创建', '取消'], default: 0, cancel: 1 }); 38 | if (createResponse.response == 1) { 39 | return; 40 | } 41 | this.display = '创建中'; 42 | this.showLoading = true; 43 | if (!await utils_1.createFolderByUrl(folderPath, { 44 | readme: utils_1.getResReadme(folderName), 45 | meta: folderName === 'resources' ? utils_1.getResMeta('resources') : undefined, 46 | subFolders: [ 47 | { 48 | folder: name, 49 | meta: folderName === 'res-bundle' ? utils_1.getResMeta('custom-bundle') : undefined 50 | } 51 | ] 52 | })) { 53 | this.showLoading = false; 54 | this.display = '[错误] 创建失败'; 55 | return; 56 | } 57 | this.showLoading = false; 58 | this.display = `[成功] 创建成功\n${folderPath}`; 59 | Editor.Message.send('assets', 'twinkle', folderPath); 60 | } 61 | }, 62 | }); 63 | -------------------------------------------------------------------------------- /extensions/app/engine/dist/panel/components/create-sound.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | const vue_1 = __importDefault(require("../../../../vue")); 7 | const utils_1 = require("../../utils"); 8 | exports.default = vue_1.default.extend({ 9 | template: utils_1.getResPanel('create-sound'), 10 | data() { 11 | return { 12 | display: '', 13 | typeSelects: ['音乐', '音效'], 14 | typeSelectIndex: 0, 15 | showLoading: false 16 | }; 17 | }, 18 | methods: { 19 | onChangeTypeSelect(index) { 20 | this.typeSelectIndex = Number(index); 21 | }, 22 | async onClickCreate() { 23 | this.display = '创建中'; 24 | this.showLoading = true; 25 | const rootPath = 'db://assets/app-bundle/app-sound'; 26 | if (!await utils_1.createFolderByUrl(rootPath, { 27 | meta: utils_1.getResMeta('app-sound'), 28 | readme: utils_1.getResReadme('app-sound'), 29 | subFolders: [ 30 | { 31 | folder: this.typeSelectIndex === 0 ? 'music' : 'effect', 32 | readme: utils_1.getResReadme(this.typeSelectIndex === 0 ? 'sound-music' : 'sound-effect') 33 | } 34 | ] 35 | })) { 36 | this.showLoading = false; 37 | this.display = '[错误] 创建失败'; 38 | return; 39 | } 40 | this.showLoading = false; 41 | this.display = `[成功] 创建成功\n${rootPath}`; 42 | Editor.Message.send('assets', 'twinkle', rootPath); 43 | } 44 | }, 45 | }); 46 | -------------------------------------------------------------------------------- /extensions/app/engine/dist/panel/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | const fs_1 = require("fs"); 7 | const path_1 = require("path"); 8 | const Assets = path_1.join(__dirname, '../../res/panel'); 9 | const app_1 = __importDefault(require("./components/app")); 10 | module.exports = Editor.Panel.define({ 11 | template: fs_1.readFileSync(path_1.join(Assets, 'index.html'), 'utf-8'), 12 | style: fs_1.readFileSync(path_1.join(Assets, 'styles/index.css'), 'utf-8'), 13 | $: { 14 | app: '#app' 15 | }, 16 | listeners: { 17 | show() { console.log('show'); }, 18 | hide() { console.log('hide'); }, 19 | }, 20 | methods: {}, 21 | ready() { 22 | if (!this.$.app) 23 | return; 24 | const com = new app_1.default(); 25 | com.$mount(this.$.app); 26 | }, 27 | beforeClose() { }, 28 | close() { }, 29 | }); 30 | -------------------------------------------------------------------------------- /extensions/app/engine/dist/scene.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.methods = exports.unload = exports.load = void 0; 4 | const path_1 = require("path"); 5 | module.paths.push(path_1.join(Editor.App.path, 'node_modules')); 6 | function load() { } 7 | exports.load = load; 8 | function unload() { } 9 | exports.unload = unload; 10 | // 在其他扩展脚本中,我们可以使用如下代码调用 rotateCamera 函数 11 | // const options: ExecuteSceneScriptMethodOptions = { 12 | // name: scene.ts 所在的扩展包名, 如: App, 13 | // method: scene.ts 中定义的方法, 如: rotateCamera, 14 | // args: 参数,可选, 只传递json 15 | // }; 16 | // const result = await Editor.Message.request('scene', 'execute-scene-script', options); 17 | exports.methods = { 18 | async createPrefab(fileName, fileUrl, is3D = false) { 19 | const { Node, js, Layers } = require('cc'); 20 | const node = new Node(fileName); 21 | node.layer = is3D ? Layers.Enum.UI_3D : Layers.Enum.UI_2D; 22 | while (true) { 23 | const result = js.getClassByName(fileName); 24 | if (result) 25 | break; 26 | await new Promise((next) => { 27 | setTimeout(next, 100); 28 | }); 29 | } 30 | const com = node.addComponent(fileName); 31 | com.resetInEditor && com.resetInEditor(); 32 | const info = cce.Prefab.generatePrefabDataFromNode(node); 33 | node.destroy(); 34 | return Editor.Message.request('asset-db', 'create-asset', fileUrl, info.prefabData || info); 35 | }, 36 | async createScene(fileName, fileUrl) { 37 | const { SceneAsset, Scene, Node, js, Layers, Camera, DirectionalLight } = require('cc'); 38 | while (true) { 39 | const result = js.getClassByName(fileName); 40 | if (result) 41 | break; 42 | await new Promise((next) => { 43 | setTimeout(next, 100); 44 | }); 45 | } 46 | const scene = new Scene(fileName); 47 | // 根节点 48 | const node = new Node(fileName); 49 | node.layer = Layers.Enum.DEFAULT; 50 | node.parent = scene; 51 | // 相机 52 | const camera = new Node('Camera'); 53 | camera.addComponent(Camera); 54 | camera.layer = Layers.Enum.DEFAULT; 55 | camera.parent = node; 56 | // 灯光 57 | const light = new Node('Light'); 58 | light.addComponent(DirectionalLight); 59 | light.layer = Layers.Enum.DEFAULT; 60 | light.parent = node; 61 | const com = node.addComponent(fileName); 62 | com.resetInEditor && com.resetInEditor(); 63 | const sceneAsset = new SceneAsset(); 64 | sceneAsset.scene = scene; 65 | const info = EditorExtends.serialize(sceneAsset); 66 | camera.destroy(); 67 | light.destroy(); 68 | node.destroy(); 69 | scene.destroy(); 70 | sceneAsset.destroy(); 71 | return Editor.Message.request('asset-db', 'create-asset', fileUrl, info); 72 | }, 73 | }; 74 | -------------------------------------------------------------------------------- /extensions/app/engine/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "engine", 3 | "lockfileVersion": 2, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "name": "engine", 8 | "devDependencies": { 9 | "@types/node": "16.0.1", 10 | "typescript": "4.3.4" 11 | } 12 | }, 13 | "node_modules/@types/node": { 14 | "version": "16.0.1", 15 | "dev": true, 16 | "license": "MIT" 17 | }, 18 | "node_modules/typescript": { 19 | "version": "4.3.4", 20 | "dev": true, 21 | "license": "Apache-2.0", 22 | "bin": { 23 | "tsc": "bin/tsc", 24 | "tsserver": "bin/tsserver" 25 | }, 26 | "engines": { 27 | "node": ">=4.2.0" 28 | } 29 | } 30 | }, 31 | "dependencies": { 32 | "@types/node": { 33 | "version": "16.0.1", 34 | "dev": true 35 | }, 36 | "typescript": { 37 | "version": "4.3.4", 38 | "dev": true 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /extensions/app/engine/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "engine", 3 | "devDependencies": { 4 | "@types/node": "16.0.1", 5 | "typescript": "4.3.4" 6 | }, 7 | "scripts": { 8 | "build": "tsc -b", 9 | "watch": "tsc -w" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /extensions/app/engine/res/meta/app-admin.meta: -------------------------------------------------------------------------------- 1 | { 2 | "userData": { 3 | "isBundle": true, 4 | "bundleConfigID": "auto_398Ij6Mc1B2Y7sW3e6BgFC", 5 | "priority": 1 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /extensions/app/engine/res/meta/app-controller.meta: -------------------------------------------------------------------------------- 1 | { 2 | "userData": { 3 | "isBundle": true, 4 | "bundleConfigID": "auto_398Ij6Mc1B2Y7sW3e6BgFC", 5 | "priority": 1 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /extensions/app/engine/res/meta/app-manager.meta: -------------------------------------------------------------------------------- 1 | { 2 | "userData": { 3 | "isBundle": true, 4 | "bundleConfigID": "auto_398Ij6Mc1B2Y7sW3e6BgFC", 5 | "priority": 1 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /extensions/app/engine/res/meta/app-model.meta: -------------------------------------------------------------------------------- 1 | { 2 | "userData": { 3 | "isBundle": true, 4 | "bundleConfigID": "auto_398Ij6Mc1B2Y7sW3e6BgFC", 5 | "priority": 1 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /extensions/app/engine/res/meta/app-sound.meta: -------------------------------------------------------------------------------- 1 | { 2 | "userData": { 3 | "isBundle": true, 4 | "bundleConfigID": "auto_11aBEBWDxI/6ryvKvFthEo", 5 | "priority": 8 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /extensions/app/engine/res/meta/custom-bundle.meta: -------------------------------------------------------------------------------- 1 | { 2 | "userData": { 3 | "isBundle": true, 4 | "bundleConfigID": "default", 5 | "priority": 1 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /extensions/app/engine/res/meta/resources.meta: -------------------------------------------------------------------------------- 1 | { 2 | "userData": { 3 | "isBundle": true, 4 | "bundleConfigID": "default", 5 | "bundleName": "resources", 6 | "priority": 8 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /extensions/app/engine/res/meta/view-native.meta: -------------------------------------------------------------------------------- 1 | { 2 | "isBundle": true, 3 | "bundleConfigID": "auto_f7NI9WxFVIO6e8LbJGF72k", 4 | "priority": 1 5 | } -------------------------------------------------------------------------------- /extensions/app/engine/res/meta/view-resources.meta: -------------------------------------------------------------------------------- 1 | { 2 | "isBundle": true, 3 | "bundleConfigID": "auto_11aBEBWDxI/6ryvKvFthEo", 4 | "priority": 4 5 | } -------------------------------------------------------------------------------- /extensions/app/engine/res/panel/components/app.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{menus[0]}} 4 | {{menus[1]}} 5 | {{menus[2]}} 6 | {{menus[3]}} 7 | {{menus[4]}} 8 | {{menus[5]}} 9 | 10 | 11 |
-------------------------------------------------------------------------------- /extensions/app/engine/res/panel/components/create-controller.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 名字 9 | 11 | 12 | 13 | 14 | 15 | 创建 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 |
26 |
-------------------------------------------------------------------------------- /extensions/app/engine/res/panel/components/create-manager.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 名字 9 | 11 | 12 | 13 | 14 | 15 | 创建 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 |
26 |
-------------------------------------------------------------------------------- /extensions/app/engine/res/panel/components/create-model.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 类型 9 | 11 | 14 | 15 | 16 | 17 | 18 | 名字 19 | 21 | 22 | 23 | 24 | 25 | 创建 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 | 35 |
36 |
-------------------------------------------------------------------------------- /extensions/app/engine/res/panel/components/create-res.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 类型 9 | 11 | 14 | 15 | 16 | 17 | 18 | 名字 19 | 21 | 22 | 23 | 24 | 25 | 创建 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 | 35 |
36 |
-------------------------------------------------------------------------------- /extensions/app/engine/res/panel/components/create-sound.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 类型 9 | 11 | 14 | 15 | 16 | 17 | 18 | 创建 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 |
29 |
-------------------------------------------------------------------------------- /extensions/app/engine/res/panel/components/create-view.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 类型 9 | 11 | 14 | 15 | 16 | 17 | 18 | 模版 19 | 21 | 24 | 25 | 26 | 27 | 28 | 归属 29 | 31 | 34 | 35 | 36 | 37 | 38 | 名字 39 | 41 | 42 | 43 | 44 | 45 | 创建 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 |
54 | 55 |
56 |
-------------------------------------------------------------------------------- /extensions/app/engine/res/panel/index.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /extensions/app/engine/res/panel/styles/index.css: -------------------------------------------------------------------------------- 1 | #app { 2 | position: relative; 3 | width: 100%; 4 | } 5 | 6 | .container { 7 | position: relative; 8 | width: 100%; 9 | } 10 | 11 | .content { 12 | position: relative; 13 | width: 80%; 14 | margin: 8px auto; 15 | text-align: center; 16 | } 17 | 18 | .content-item { 19 | margin-top: 8px; 20 | } 21 | 22 | .help { 23 | position: absolute; 24 | right: 0; 25 | top: 0; 26 | } 27 | 28 | .loading { 29 | position: fixed; 30 | top: 0; 31 | left: 0; 32 | width: 100%; 33 | height: 100%; 34 | z-index: 9999; 35 | background-color: rgba(0, 0, 0, 0.6); 36 | /* 背景模糊 */ 37 | /* backdrop-filter: blur(3px); */ 38 | } 39 | 40 | .loading-item { 41 | margin-top: 50%; 42 | } -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/app-admin.md: -------------------------------------------------------------------------------- 1 | 1、一些配置类的资产(框架自动维护) 2 | 2、不可删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/app-appinit.md: -------------------------------------------------------------------------------- 1 | 1、框架初始化首屏 2 | 2、不可删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/app-builtin.md: -------------------------------------------------------------------------------- 1 | 1、存储内置功能的文件夹 2 | 2、不可删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/app-bundle.md: -------------------------------------------------------------------------------- 1 | 1、存储内置的Bundle的文件夹 2 | 2、如不再需要,可以直接删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/app-controller.md: -------------------------------------------------------------------------------- 1 | 存储控制器 2 | 1、通过app.controller或import来使用(BaseView.bindController的参数只能使用import方式) 3 | 2、通过菜单「App/创建/Controller」创建 4 | 3、如不再需要,可以直接删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/app-manager.md: -------------------------------------------------------------------------------- 1 | 存储管理器 2 | 1、通过app.manager来使用 3 | 2、通过菜单「App/创建/Manager」创建 4 | 3、如不再需要,可以直接删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/app-model.md: -------------------------------------------------------------------------------- 1 | 存储数据 2 | 1、通过app.store、app.data或app.config来使用 3 | 2、export类型数据通过import来使用, 但不可以被主包引用 4 | 3、通过菜单「App/创建/Model」创建 5 | 4、如不再需要,可以直接删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/app-scene.md: -------------------------------------------------------------------------------- 1 | 1、存储主场景的文件夹 2 | 2、不可删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/app-sound.md: -------------------------------------------------------------------------------- 1 | 存储音乐/音效资源的文件夹 2 | 1、通过app.manager.sound管理 3 | 2、通过菜单「App/创建/Sound」创建目录 4 | 3、如不再需要,可以直接删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/app-view.md: -------------------------------------------------------------------------------- 1 | 存储UI资源的文件夹 2 | 1、通过app.manager.ui管理 3 | 2、通过菜单「App/创建/View」创建 4 | 3、如不再需要,可以直接删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/app.md: -------------------------------------------------------------------------------- 1 | 1、框架配置、生命周期及全局导出 2 | 2、不可删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/res-bundle.md: -------------------------------------------------------------------------------- 1 | 存储动态资源的文件夹 2 | 1、通过app.manager.loader管理 3 | 2、所有业务自定义的Bundle文件夹存放在这里面 4 | 3、如不再需要,可以直接删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/res-native.md: -------------------------------------------------------------------------------- 1 | 存储静态资源的文件夹 2 | 1、非公共脚本资源,尽量不放到主包内 3 | 3、图片、字体等非脚本类公共资源,尽量不放到主包内(因为构建后这些资源会被拷贝到其它Bundle中) 4 | 2、如果公共脚本资源体积较大,可以考虑放到Bundle内,保证首屏体积尽量小 5 | 4、如不再需要,可以直接删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/resources.md: -------------------------------------------------------------------------------- 1 | 系统动态资源目录 2 | 1、脚本资源一定不要放在此文件夹内🔥 3 | 2、可使用app.manager.loader.load动态加载 4 | 3、如不再需要,可以直接删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/sound-effect.md: -------------------------------------------------------------------------------- 1 | 存储音效资源的文件夹 2 | 1、通过app.manager.sound.playEffect播放 3 | 2、如不再需要,可以直接删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/sound-music.md: -------------------------------------------------------------------------------- 1 | 存储音乐资源的文件夹 2 | 1、通过app.manager.sound.playMusic播放 3 | 2、如不再需要,可以直接删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/view-expansion.md: -------------------------------------------------------------------------------- 1 | 1、只能存放脚本⚠️ 2 | 2、如不再需要,可以直接删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/view-native.md: -------------------------------------------------------------------------------- 1 | 存放UI以及脚本的文件夹 2 | 1、除了UI本身外,不允许存放其它任何预置体或场景资源🔥 3 | 2、UI脚本在根目录下,其它脚本放到expansion目录下 4 | 3、不可单独删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/res/readme/view-resources.md: -------------------------------------------------------------------------------- 1 | UI资源目录 2 | 1、脚本资源一定不要放在此文件夹内🔥 3 | 2、资源会随着UI销毁自动释放 4 | 3、在UI脚本内可通过this.loadRes动态加载 5 | 4、在UI子节点的脚本内可通过app.manager.ui.loadRes(this, ...)动态加载 6 | 5、不可单独删除此文件夹 -------------------------------------------------------------------------------- /extensions/app/engine/src/builder/hooks.ts: -------------------------------------------------------------------------------- 1 | import path from 'path'; 2 | import { BuildHook } from '../../@types/packages/builder/@types'; 3 | import { adaptFileMD5 } from './utils/file'; 4 | 5 | export const onAfterBuild: BuildHook.onAfterBuild = async function (options, result) { 6 | if (options.platform !== 'web-mobile' && options.platform !== 'web-desktop') { 7 | return; 8 | } 9 | 10 | if (!options.md5Cache) { 11 | return; 12 | } 13 | 14 | adaptFileMD5(path.join(result.dest, 'index.html')); 15 | }; -------------------------------------------------------------------------------- /extensions/app/engine/src/builder/index.ts: -------------------------------------------------------------------------------- 1 | import { BuildPlugin } from "../../@types/packages/builder/@types"; 2 | 3 | export const configs: BuildPlugin.Configs = { 4 | '*': { 5 | hooks: './hooks', 6 | } 7 | }; -------------------------------------------------------------------------------- /extensions/app/engine/src/inspector/asset-directory.ts: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import { existsSync, readFileSync } from 'fs'; 4 | import { join } from 'path'; 5 | 6 | interface Asset { 7 | displayName: string; 8 | file: string; 9 | imported: boolean; 10 | importer: string; 11 | invalid: boolean; 12 | isDirectory: boolean; 13 | library: { 14 | [extname: string]: string; 15 | }; 16 | name: string; 17 | url: string; 18 | uuid: string; 19 | visible: boolean; 20 | subAssets: { 21 | [id: string]: Asset; 22 | }; 23 | } 24 | 25 | interface Meta { 26 | files: string[]; 27 | imported: boolean; 28 | importer: string; 29 | subMetas: { 30 | [id: string]: Meta; 31 | }; 32 | userData: { 33 | [key: string]: any; 34 | }; 35 | uuid: string; 36 | ver: string; 37 | } 38 | 39 | type Selector<$> = { $: Record } & { dispatch(str: string): void, assetList: Asset[], metaList: Meta[] }; 40 | 41 | export const $ = { 42 | 'code': '#code', 43 | 'section': '#section', 44 | }; 45 | 46 | export const template = ` 47 | 48 | 49 | 50 | `; 51 | 52 | type PanelThis = Selector; 53 | 54 | export function update(this: PanelThis, assetList: Asset[], metaList: Meta[]) { 55 | this.assetList = assetList; 56 | this.metaList = metaList; 57 | 58 | if (assetList.length === 0) { 59 | this.$.code.innerHTML = ''; 60 | } else { 61 | this.$.code.innerHTML = assetList 62 | .filter((asset) => { 63 | const mdFile = join(asset.file, `.${asset.name}.md`); 64 | return existsSync(mdFile); 65 | }) 66 | .map((asset) => { 67 | const mdFile = join(asset.file, `.${asset.name}.md`); 68 | const mdStr = readFileSync(mdFile, 'utf-8'); 69 | return assetList.length > 1 ? `${asset.url}:\n ${mdStr}` : mdStr; 70 | }) 71 | .join('\n') || ''; 72 | } 73 | 74 | if (this.$.code.innerHTML === '') { 75 | this.$.section.hidden = true; 76 | } else { 77 | this.$.section.hidden = false; 78 | } 79 | } 80 | 81 | export function ready(this: PanelThis) { 82 | // TODO something 83 | } 84 | 85 | export function close(this: PanelThis,) { 86 | // TODO something 87 | } -------------------------------------------------------------------------------- /extensions/app/engine/src/menu/index.ts: -------------------------------------------------------------------------------- 1 | import { AssetInfo } from '../../@types/packages/asset-db/@types/public'; 2 | import tinyPNG from './tinyPNG'; 3 | 4 | function getMenu(assetInfo: AssetInfo) { 5 | return [ 6 | { 7 | label: 'i18n:app.app', 8 | submenu: [ 9 | { 10 | label: 'i18n:app.tiny', 11 | click() { 12 | tinyPNG(assetInfo.file); 13 | }, 14 | } 15 | ], 16 | }, 17 | ]; 18 | } 19 | 20 | export function onCreateMenu(assetInfo: AssetInfo) { 21 | // return getMenu(); 22 | } 23 | 24 | export function onDBMenu(assetInfo: AssetInfo) { 25 | // return getMenu(); 26 | } 27 | 28 | export function onPanelMenu(assetInfo: AssetInfo) { 29 | // return getMenu(); 30 | } 31 | 32 | export function onAssetMenu(assetInfo: AssetInfo) { 33 | return getMenu(assetInfo); 34 | } -------------------------------------------------------------------------------- /extensions/app/engine/src/panel/components/app.ts: -------------------------------------------------------------------------------- 1 | import { readFileSync } from 'fs'; 2 | import { join } from 'path'; 3 | import Vue from '../../../../vue'; 4 | 5 | import ControllerComponent from './create-controller'; 6 | import ManagerComponent from './create-manager'; 7 | import ModelComponent from './create-model'; 8 | import ResComponent from './create-res'; 9 | import SoundComponent from './create-sound'; 10 | import ViewComponent from './create-view'; 11 | 12 | const Assets = join(__dirname, '../../../res/panel'); 13 | const Menus = ['ViewComponent', 'ManagerComponent', 'ControllerComponent', 'ModelComponent', 'SoundComponent', 'ResComponent']; 14 | 15 | export default Vue.extend({ 16 | components: { ViewComponent, ManagerComponent, ControllerComponent, ModelComponent, SoundComponent, ResComponent }, 17 | template: readFileSync(join(Assets, 'components/app.html'), 'utf-8'), 18 | data() { 19 | return { 20 | menus: ['View', 'Manager', 'Controller', 'Model', 'Sound', '资源目录'], 21 | content: 'ViewComponent' 22 | }; 23 | }, 24 | methods: { 25 | onClick(index: number) { 26 | this.content = Menus[index]; 27 | } 28 | }, 29 | }); -------------------------------------------------------------------------------- /extensions/app/engine/src/panel/components/create-res.ts: -------------------------------------------------------------------------------- 1 | import Vue from '../../../../vue'; 2 | import { createFolderByUrl, getResMeta, getResPanel, getResReadme, stringCase } from '../../utils'; 3 | 4 | const typeNames: ('res-bundle' | 'res-native' | 'resources')[] = ['res-native', 'res-bundle', 'resources']; 5 | export default Vue.extend({ 6 | template: getResPanel('create-res'), 7 | data() { 8 | return { 9 | inputName: '', 10 | display: '', 11 | 12 | typeSelects: ['公共静态目录', '公共动态目录', 'resources'], 13 | typeSelectIndex: 0, 14 | 15 | showLoading: false 16 | }; 17 | }, 18 | methods: { 19 | onChangeTypeSelect(index: string) { 20 | this.typeSelectIndex = Number(index); 21 | }, 22 | async onClickCreate() { 23 | const folderName = typeNames[this.typeSelectIndex]; 24 | const folderPath = `db://assets/${folderName}`; 25 | const name = stringCase(this.inputName, true); 26 | 27 | if (/^[a-z][a-z0-9-]*[a-z0-9]+$/.test(this.inputName) === false) { 28 | this.display = '[错误] 名字不合法\n1、不能以数字开头\n2、不能有大写字母\n3、分隔符只能使用-\n4、不能以分隔符开头或结尾'; 29 | return; 30 | } 31 | if (name === 'resources') { 32 | this.display = '[错误] 名字不合法\n1、不能使用resources作为名字'; 33 | return; 34 | } 35 | 36 | // 创建前确认 37 | const createResponse = await Editor.Dialog.info('请确认', { detail: name, buttons: ['创建', '取消'], default: 0, cancel: 1 }); 38 | if (createResponse.response == 1) { 39 | return; 40 | } 41 | 42 | this.display = '创建中'; 43 | this.showLoading = true; 44 | 45 | if (!await createFolderByUrl(folderPath, { 46 | readme: getResReadme(folderName), 47 | meta: folderName === 'resources' ? getResMeta('resources') : undefined, 48 | subFolders: [ 49 | { 50 | folder: name, 51 | meta: folderName === 'res-bundle' ? getResMeta('custom-bundle') : undefined 52 | } 53 | ] 54 | })) { 55 | this.showLoading = false; 56 | this.display = '[错误] 创建失败'; 57 | return; 58 | } 59 | 60 | this.showLoading = false; 61 | this.display = `[成功] 创建成功\n${folderPath}`; 62 | 63 | Editor.Message.send('assets', 'twinkle', folderPath); 64 | } 65 | }, 66 | }); -------------------------------------------------------------------------------- /extensions/app/engine/src/panel/components/create-sound.ts: -------------------------------------------------------------------------------- 1 | import Vue from '../../../../vue'; 2 | import { createFolderByUrl, getResMeta, getResPanel, getResReadme } from '../../utils'; 3 | 4 | export default Vue.extend({ 5 | template: getResPanel('create-sound'), 6 | data() { 7 | return { 8 | display: '', 9 | 10 | typeSelects: ['音乐', '音效'], 11 | typeSelectIndex: 0, 12 | 13 | showLoading: false 14 | }; 15 | }, 16 | methods: { 17 | onChangeTypeSelect(index: string) { 18 | this.typeSelectIndex = Number(index); 19 | }, 20 | async onClickCreate() { 21 | this.display = '创建中'; 22 | this.showLoading = true; 23 | 24 | const rootPath = 'db://assets/app-bundle/app-sound'; 25 | 26 | if (!await createFolderByUrl(rootPath, { 27 | meta: getResMeta('app-sound'), 28 | readme: getResReadme('app-sound'), 29 | subFolders: [ 30 | { 31 | folder: this.typeSelectIndex === 0 ? 'music' : 'effect', 32 | readme: getResReadme(this.typeSelectIndex === 0 ? 'sound-music' : 'sound-effect') 33 | } 34 | ] 35 | })) { 36 | this.showLoading = false; 37 | this.display = '[错误] 创建失败'; 38 | return; 39 | } 40 | 41 | this.showLoading = false; 42 | this.display = `[成功] 创建成功\n${rootPath}`; 43 | 44 | Editor.Message.send('assets', 'twinkle', rootPath); 45 | } 46 | }, 47 | }); -------------------------------------------------------------------------------- /extensions/app/engine/src/panel/index.ts: -------------------------------------------------------------------------------- 1 | import { readFileSync } from 'fs'; 2 | import { join } from 'path'; 3 | 4 | const Assets = join(__dirname, '../../res/panel'); 5 | 6 | import App from './components/app'; 7 | 8 | module.exports = Editor.Panel.define({ 9 | template: readFileSync(join(Assets, 'index.html'), 'utf-8'), 10 | style: readFileSync(join(Assets, 'styles/index.css'), 'utf-8'), 11 | $: { 12 | app: '#app' 13 | }, 14 | listeners: { 15 | show() { console.log('show'); }, 16 | hide() { console.log('hide'); }, 17 | }, 18 | methods: {}, 19 | ready() { 20 | if (!this.$.app) return; 21 | 22 | const com = new App(); 23 | com.$mount(this.$.app); 24 | }, 25 | beforeClose() { }, 26 | close() { }, 27 | }); 28 | -------------------------------------------------------------------------------- /extensions/app/engine/src/scene.ts: -------------------------------------------------------------------------------- 1 | import { join } from 'path'; 2 | module.paths.push(join(Editor.App.path, 'node_modules')); 3 | 4 | export function load() { } 5 | 6 | export function unload() { } 7 | 8 | // 在其他扩展脚本中,我们可以使用如下代码调用 rotateCamera 函数 9 | // const options: ExecuteSceneScriptMethodOptions = { 10 | // name: scene.ts 所在的扩展包名, 如: App, 11 | // method: scene.ts 中定义的方法, 如: rotateCamera, 12 | // args: 参数,可选, 只传递json 13 | // }; 14 | // const result = await Editor.Message.request('scene', 'execute-scene-script', options); 15 | export const methods = { 16 | async createPrefab(fileName: string, fileUrl: string, is3D = false) { 17 | const { Node, js, Layers } = require('cc'); 18 | 19 | const node = new Node(fileName); 20 | node.layer = is3D ? Layers.Enum.UI_3D : Layers.Enum.UI_2D; 21 | 22 | while (true) { 23 | const result = js.getClassByName(fileName); 24 | if (result) break; 25 | 26 | await new Promise((next) => { 27 | setTimeout(next, 100); 28 | }); 29 | } 30 | 31 | const com = node.addComponent(fileName); 32 | com.resetInEditor && com.resetInEditor(); 33 | 34 | const info = cce.Prefab.generatePrefabDataFromNode(node) as any; 35 | node.destroy(); 36 | 37 | return Editor.Message.request('asset-db', 'create-asset', fileUrl, info.prefabData || info); 38 | }, 39 | async createScene(fileName: string, fileUrl: string) { 40 | const { SceneAsset, Scene, Node, js, Layers, Camera, DirectionalLight } = require('cc'); 41 | 42 | while (true) { 43 | const result = js.getClassByName(fileName); 44 | if (result) break; 45 | 46 | await new Promise((next) => { 47 | setTimeout(next, 100); 48 | }); 49 | } 50 | 51 | const scene = new Scene(fileName); 52 | 53 | // 根节点 54 | const node = new Node(fileName); 55 | node.layer = Layers.Enum.DEFAULT; 56 | node.parent = scene; 57 | 58 | // 相机 59 | const camera = new Node('Camera'); 60 | camera.addComponent(Camera); 61 | camera.layer = Layers.Enum.DEFAULT; 62 | camera.parent = node; 63 | 64 | // 灯光 65 | const light = new Node('Light'); 66 | light.addComponent(DirectionalLight); 67 | light.layer = Layers.Enum.DEFAULT; 68 | light.parent = node; 69 | 70 | const com = node.addComponent(fileName); 71 | com.resetInEditor && com.resetInEditor(); 72 | 73 | const sceneAsset = new SceneAsset(); 74 | sceneAsset.scene = scene; 75 | 76 | const info = EditorExtends.serialize(sceneAsset); 77 | camera.destroy(); 78 | light.destroy(); 79 | node.destroy(); 80 | scene.destroy(); 81 | sceneAsset.destroy(); 82 | 83 | return Editor.Message.request('asset-db', 'create-asset', fileUrl, info); 84 | }, 85 | }; -------------------------------------------------------------------------------- /extensions/app/engine/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'vue/dist/vue' { 2 | import Vue from 'vue'; 3 | export default Vue; 4 | } 5 | -------------------------------------------------------------------------------- /extensions/app/engine/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "module": "CommonJS", 5 | "outDir": "./dist", 6 | "rootDir": "./src", 7 | "strict": false, 8 | "moduleResolution": "node", 9 | "esModuleInterop": true, 10 | "skipLibCheck": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "resolveJsonModule": true, 13 | "experimentalDecorators": true 14 | } 15 | } -------------------------------------------------------------------------------- /extensions/app/i18n/en.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = { 3 | description: 'The core of the framework', 4 | app: 'App', 5 | create: 'Create', 6 | refresh: 'Refresh', 7 | help: 'Help', 8 | tiny: 'TinyPNG', 9 | menuCreateView: 'CreateUI', 10 | menuCreateManager: 'CreateManager', 11 | menuCreateControl: 'CreateControl', 12 | menuCreateModel: 'CreateModel', 13 | }; -------------------------------------------------------------------------------- /extensions/app/i18n/zh.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = { 3 | description: '框架核心', 4 | app: 'App', 5 | create: '创建', 6 | refresh: '刷新', 7 | help: '帮助', 8 | tiny: '压缩图片', 9 | menuCreateView: '创建UI', 10 | menuCreateManager: '创建Manager', 11 | menuCreateControl: '创建Control', 12 | menuCreateModel: '创建Model', 13 | }; -------------------------------------------------------------------------------- /extensions/app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../temp/tsconfig.cocos.json", 3 | "compilerOptions": { 4 | "strict": false, 5 | "types": [ 6 | "../../temp/declarations/cc.custom-macro", 7 | "../../temp/declarations/jsb", 8 | "../../temp/declarations/cc", 9 | "../../temp/declarations/cc.env" 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /extensions/app/vue/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-present, Yuxi (Evan) You 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /extensions/app/vue/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue", 3 | "version": "2.6.14", 4 | "main": "dist/vue.js", 5 | "module": "dist/vue.js", 6 | "types": "./types/index.d.ts", 7 | "exports": { 8 | ".": { 9 | "types": "./types/index.d.ts", 10 | "import": "./dist/vue.js", 11 | "default": "./dist/vue.js" 12 | } 13 | }, 14 | "keywords": [ 15 | "vue" 16 | ], 17 | "author": "Evan You", 18 | "license": "MIT" 19 | } -------------------------------------------------------------------------------- /extensions/app/vue/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import { Vue } from "./vue"; 2 | import "./umd"; 3 | 4 | export default Vue; 5 | 6 | export { 7 | CreateElement, 8 | VueConstructor 9 | } from "./vue"; 10 | 11 | export { 12 | Component, 13 | AsyncComponent, 14 | ComponentOptions, 15 | FunctionalComponentOptions, 16 | RenderContext, 17 | PropType, 18 | PropOptions, 19 | ComputedOptions, 20 | WatchHandler, 21 | WatchOptions, 22 | WatchOptionsWithHandler, 23 | DirectiveFunction, 24 | DirectiveOptions 25 | } from "./options"; 26 | 27 | export { 28 | PluginFunction, 29 | PluginObject 30 | } from "./plugin"; 31 | 32 | export { 33 | VNodeChildren, 34 | VNodeChildrenArrayContents, 35 | VNode, 36 | VNodeComponentOptions, 37 | VNodeData, 38 | VNodeDirective 39 | } from "./vnode"; 40 | -------------------------------------------------------------------------------- /extensions/app/vue/types/plugin.d.ts: -------------------------------------------------------------------------------- 1 | import { Vue as _Vue } from "./vue"; 2 | 3 | export type PluginFunction = (Vue: typeof _Vue, options?: T) => void; 4 | 5 | export interface PluginObject { 6 | install: PluginFunction; 7 | [key: string]: any; 8 | } 9 | -------------------------------------------------------------------------------- /extensions/app/vue/types/umd.d.ts: -------------------------------------------------------------------------------- 1 | import * as V from "./index"; 2 | import { 3 | DefaultData, 4 | DefaultProps, 5 | DefaultMethods, 6 | DefaultComputed, 7 | PropsDefinition 8 | } from "./options"; 9 | 10 | // Expose some types for backward compatibility... 11 | declare namespace Vue { 12 | // vue.d.ts 13 | export type CreateElement = V.CreateElement; 14 | export type VueConstructor = V.VueConstructor; 15 | 16 | // options.d.ts 17 | export type Component, Methods=DefaultMethods, Computed=DefaultComputed, Props=DefaultProps> = V.Component; 18 | export type AsyncComponent, Methods=DefaultMethods, Computed=DefaultComputed, Props=DefaultProps> = V.AsyncComponent; 19 | export type ComponentOptions, Methods=DefaultMethods, Computed=DefaultComputed, PropsDef=PropsDefinition, Props=DefaultProps> = V.ComponentOptions; 20 | export type FunctionalComponentOptions> = V.FunctionalComponentOptions; 21 | export type RenderContext = V.RenderContext; 22 | export type PropType = V.PropType; 23 | export type PropOptions = V.PropOptions; 24 | export type ComputedOptions = V.ComputedOptions; 25 | export type WatchHandler = V.WatchHandler; 26 | export type WatchOptions = V.WatchOptions; 27 | export type WatchOptionsWithHandler = V.WatchOptionsWithHandler; 28 | export type DirectiveFunction = V.DirectiveFunction; 29 | export type DirectiveOptions = V.DirectiveOptions; 30 | 31 | // plugin.d.ts 32 | export type PluginFunction = V.PluginFunction; 33 | export type PluginObject = V.PluginObject; 34 | 35 | // vnode.d.ts 36 | export type VNodeChildren = V.VNodeChildren; 37 | export type VNodeChildrenArrayContents = V.VNodeChildrenArrayContents; 38 | export type VNode = V.VNode; 39 | export type VNodeComponentOptions = V.VNodeComponentOptions; 40 | export type VNodeData = V.VNodeData; 41 | export type VNodeDirective = V.VNodeDirective; 42 | } 43 | 44 | declare class Vue extends V.default {} 45 | 46 | export = Vue; 47 | 48 | export as namespace Vue; 49 | -------------------------------------------------------------------------------- /extensions/app/vue/types/vnode.d.ts: -------------------------------------------------------------------------------- 1 | import { Vue } from "./vue"; 2 | 3 | export type ScopedSlot = (props: any) => ScopedSlotReturnValue; 4 | type ScopedSlotReturnValue = VNode | string | boolean | null | undefined | ScopedSlotReturnArray; 5 | interface ScopedSlotReturnArray extends Array {} 6 | 7 | // Scoped slots are guaranteed to return Array of VNodes starting in 2.6 8 | export type NormalizedScopedSlot = (props: any) => ScopedSlotChildren; 9 | export type ScopedSlotChildren = VNode[] | undefined; 10 | 11 | // Relaxed type compatible with $createElement 12 | export type VNodeChildren = VNodeChildrenArrayContents | [ScopedSlot] | string | boolean | null | undefined; 13 | export interface VNodeChildrenArrayContents extends Array {} 14 | 15 | export interface VNode { 16 | tag?: string; 17 | data?: VNodeData; 18 | children?: VNode[]; 19 | text?: string; 20 | elm?: Node; 21 | ns?: string; 22 | context?: Vue; 23 | key?: string | number | symbol | boolean; 24 | componentOptions?: VNodeComponentOptions; 25 | componentInstance?: Vue; 26 | parent?: VNode; 27 | raw?: boolean; 28 | isStatic?: boolean; 29 | isRootInsert: boolean; 30 | isComment: boolean; 31 | } 32 | 33 | export interface VNodeComponentOptions { 34 | Ctor: typeof Vue; 35 | propsData?: object; 36 | listeners?: object; 37 | children?: VNode[]; 38 | tag?: string; 39 | } 40 | 41 | export interface VNodeData { 42 | key?: string | number; 43 | slot?: string; 44 | scopedSlots?: { [key: string]: ScopedSlot | undefined }; 45 | ref?: string; 46 | refInFor?: boolean; 47 | tag?: string; 48 | staticClass?: string; 49 | class?: any; 50 | staticStyle?: { [key: string]: any }; 51 | style?: string | object[] | object; 52 | props?: { [key: string]: any }; 53 | attrs?: { [key: string]: any }; 54 | domProps?: { [key: string]: any }; 55 | hook?: { [key: string]: Function }; 56 | on?: { [key: string]: Function | Function[] }; 57 | nativeOn?: { [key: string]: Function | Function[] }; 58 | transition?: object; 59 | show?: boolean; 60 | inlineTemplate?: { 61 | render: Function; 62 | staticRenderFns: Function[]; 63 | }; 64 | directives?: VNodeDirective[]; 65 | keepAlive?: boolean; 66 | } 67 | 68 | export interface VNodeDirective { 69 | name: string; 70 | value?: any; 71 | oldValue?: any; 72 | expression?: string; 73 | arg?: string; 74 | oldArg?: string; 75 | modifiers?: { [key: string]: boolean }; 76 | } 77 | -------------------------------------------------------------------------------- /extensions/pkg/README.md: -------------------------------------------------------------------------------- 1 | # 注意 2 | 通用模块开发完毕后,在发布之前一定要打开CocosCreator生成meta文件(否则如果有依赖关系编辑器无法正确识别)。 3 | 4 | # 添加和移除 5 | * 添加: 执行 npm run add xxx 6 | * 移除: 执行 npm run emove xxx -------------------------------------------------------------------------------- /extensions/pkg/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "package_version": 2, 3 | "name": "pkg", 4 | "version": "1.0.0", 5 | "author": "向前", 6 | "license": "MIT", 7 | "editor": ">=3.6.0", 8 | "description": "用于存放扩展包", 9 | "contributions": { 10 | "asset-db": { 11 | "mount": { 12 | "path": "./node_modules", 13 | "readonly": true 14 | } 15 | } 16 | }, 17 | "scripts": { 18 | "add": "node ./index.js add", 19 | "remove": "node ./index.js remove", 20 | "update": "node ./index.js update" 21 | } 22 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "3.8", 3 | "name": "xforge", 4 | "uuid": "ab72af5f-29c4-446f-8911-e4a0a6e3b139", 5 | "creator": { 6 | "version": "3.8.3" 7 | }, 8 | "devDependencies": { 9 | "@typescript-eslint/eslint-plugin": "^5.52.0", 10 | "@typescript-eslint/parser": "^5.52.0", 11 | "eslint": "^8.34.0" 12 | }, 13 | "scripts": { 14 | "cli": "npx --registry=https://registry.npmmirror.com @gamex/cc-cli@latest", 15 | "upgrade": "npm run cli upgrade 快捷指令:升级框架", 16 | "package": "npm run cli package 快捷指令:管理扩展", 17 | "pkg:add": "node ./extensions/pkg add", 18 | "pkg:remove": "node ./extensions/pkg remove", 19 | "pkg:update": "node ./extensions/pkg update" 20 | } 21 | } -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ## 交流与支持 2 | 欢迎加入 QQ 群:795231926,一起探讨和交流 XForge 开发经验。 3 | 4 | # XForge:CocosCreator 前端开发框架 5 | 6 | ### 概览 7 | 8 | **XForge** 是一个专为 CocosCreator 设计的前端开发框架。诞生于于2019年,经历过 CocosCreator 众多版本更新,也进行了多次精心重构。 9 | 10 | ### 设计理念 11 | **XForge** 致力于提供一个轻量级核心,搭配可扩展的插件体系,旨在为开发者构建一个清晰、可持续发展的开发生态环境。它不仅仅是一个 UI 框架,而是一个完整的开发解决方案。 12 | 13 | ### 核心优势 14 | 15 | - **稳定验证**:多年迭代,跨平台,众多游戏的实战检验。 16 | - **新手友好**:经过多年优化,框架易于新手理解和使用。 17 | - **开发规范**:自动化统一开发规范,降低code review人力成本。 18 | - **团队协作**:优秀的多人协同开发能力,最大程度杜绝Prefab/Scene冲突。 19 | - **渐进开发**:提供核心功能的同时,通过扩展包为开发者按需引入更多高级功能。 20 | - **框架生态**:鼓励开发者自主开发扩展包,并通过共享机制促进生态繁荣(基于npm)。 21 | - **私有生态**:**公司内部项目可基于扩展包快速构建专属生态(基于npm)** 。 22 | 23 | ### 快速入门 24 | 25 | 请参阅开发文档,了解如何快速开始使用 `XForge`:[快速开始](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017445&doc_id=6236543) 26 | 27 |
28 | 29 | ## 核心功能 30 | ### 脚手架 31 | - 创建空项目及示例项目 32 | - 自动升级项目框架版本 33 | - 添加/删除/更新扩展包 34 | 35 | > 详细文档:[脚手架](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017448&doc_id=6236543) 36 | 37 | ### 分包自动化 38 | - 无需过多关心,就可实现极小的首包体积 39 | - 天然支持大厅子游戏模式,不需要任何额外配置 40 | 41 | > 查看文档:[微信小游戏分包策略最佳实践](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017432&doc_id=6236543) 42 | 43 | ### UI类型与安全 44 | - 简化 UI 管理,支持 多Scene 和 多Prefab 配置。 45 | - 格外强调UI安全,避免UI被外部因素无意修改或破坏。 46 | 47 | > 详细文档:[界面](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017440&doc_id=6236543) [管理器](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017436&doc_id=6236543) [控制器](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017438&doc_id=6236543) 48 | 49 | ### 扩展包 50 | - [网络请求](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017505&doc_id=6236543) 51 | - [种子随机](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017504&doc_id=6236543) 52 | - [状态管理](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017509&doc_id=6236543) 53 | - [ECS架构](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017498&doc_id=6236543) 54 | - [A星巡路](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017470&doc_id=6236543) 55 | - [SAT碰撞检测](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017508&doc_id=6236543) 56 | - [SAP碰撞检测](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017507&doc_id=6236543) 57 | - [四叉树碰撞检测](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017503&doc_id=6236543) 58 | - [定点数](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017497&doc_id=6236543) 59 | - [二维向量(定点数)](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017495&doc_id=6236543) 60 | - [三维向量(定点数)](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017496&doc_id=6236543) 61 | - [种子随机(定点数)](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017492&doc_id=6236543) 62 | - [SAT碰撞检测(定点数)](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017494&doc_id=6236543) 63 | - [SAP碰撞检测(定点数)](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017493&doc_id=6236543) 64 | - [XML解析](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017510&doc_id=6236543) 65 | - [富文本组件](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017476&doc_id=6236543) 66 | - 持续更新中... 67 | 68 | > 实践项目:[帧同步联机对战](https://store.cocos.com/app/zh/detail/5987) 69 | 70 | ## 示例项目 71 | - UI管理(`2D与3D开发`) 72 | - 飞机大战(`ECS+SAP`) 73 | - 碰撞检测(`SAP+SAT`) 74 | - 持续更新中... 75 | 76 | 示例项目在逐步开发中,通过脚手架可以创建示例项目,查看开发文档:[快速开始](https://gitee.com/cocos2d-zp/xforge/wikis/pages?sort_id=13017445&doc_id=6236543) 77 | -------------------------------------------------------------------------------- /settings/v2/packages/cocos-service.json: -------------------------------------------------------------------------------- 1 | { 2 | "game": { 3 | "name": "未知游戏", 4 | "app_id": "UNKNOW", 5 | "c_id": "0" 6 | }, 7 | "appConfigMaps": [ 8 | { 9 | "app_id": "UNKNOW", 10 | "config_id": "9c4cbd" 11 | } 12 | ], 13 | "configs": [ 14 | { 15 | "app_id": "UNKNOW", 16 | "config_id": "9c4cbd", 17 | "config_name": "Default", 18 | "config_remarks": "", 19 | "services": [ 20 | { 21 | "service_id": "315", 22 | "enable": false, 23 | "param": {} 24 | }, 25 | { 26 | "service_id": "303", 27 | "enable": false, 28 | "param": {} 29 | }, 30 | { 31 | "service_id": "305", 32 | "enable": false, 33 | "param": {} 34 | }, 35 | { 36 | "service_id": "309", 37 | "enable": false, 38 | "param": {} 39 | } 40 | ] 41 | } 42 | ], 43 | "__version__": "3.0.7" 44 | } 45 | -------------------------------------------------------------------------------- /settings/v2/packages/device.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.1" 3 | } 4 | -------------------------------------------------------------------------------- /settings/v2/packages/engine.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.9", 3 | "modules": { 4 | "cache": { 5 | "base": { 6 | "_value": true 7 | }, 8 | "graphcis": { 9 | "_value": true 10 | }, 11 | "gfx-webgl": { 12 | "_value": true 13 | }, 14 | "gfx-webgl2": { 15 | "_value": true 16 | }, 17 | "animation": { 18 | "_value": true 19 | }, 20 | "skeletal-animation": { 21 | "_value": true 22 | }, 23 | "3d": { 24 | "_value": true 25 | }, 26 | "2d": { 27 | "_value": true 28 | }, 29 | "xr": { 30 | "_value": false 31 | }, 32 | "ui": { 33 | "_value": true 34 | }, 35 | "particle": { 36 | "_value": true 37 | }, 38 | "physics": { 39 | "_value": false, 40 | "_option": "physics-ammo" 41 | }, 42 | "physics-ammo": { 43 | "_value": false 44 | }, 45 | "physics-cannon": { 46 | "_value": false 47 | }, 48 | "physics-physx": { 49 | "_value": false 50 | }, 51 | "physics-builtin": { 52 | "_value": false 53 | }, 54 | "physics-2d": { 55 | "_value": true, 56 | "_option": "physics-2d-box2d" 57 | }, 58 | "physics-2d-box2d": { 59 | "_value": false 60 | }, 61 | "physics-2d-builtin": { 62 | "_value": false 63 | }, 64 | "intersection-2d": { 65 | "_value": true 66 | }, 67 | "primitive": { 68 | "_value": true 69 | }, 70 | "profiler": { 71 | "_value": true 72 | }, 73 | "occlusion-query": { 74 | "_value": false 75 | }, 76 | "geometry-renderer": { 77 | "_value": false 78 | }, 79 | "debug-renderer": { 80 | "_value": false 81 | }, 82 | "particle-2d": { 83 | "_value": true 84 | }, 85 | "audio": { 86 | "_value": true 87 | }, 88 | "video": { 89 | "_value": true 90 | }, 91 | "webview": { 92 | "_value": true 93 | }, 94 | "tween": { 95 | "_value": true 96 | }, 97 | "terrain": { 98 | "_value": false 99 | }, 100 | "tiled-map": { 101 | "_value": false 102 | }, 103 | "spine": { 104 | "_value": true 105 | }, 106 | "dragon-bones": { 107 | "_value": false 108 | }, 109 | "marionette": { 110 | "_value": true 111 | }, 112 | "custom-pipeline": { 113 | "_value": false 114 | }, 115 | "graphics": { 116 | "_value": true 117 | } 118 | }, 119 | "includeModules": [ 120 | "2d", 121 | "3d", 122 | "animation", 123 | "audio", 124 | "base", 125 | "gfx-webgl", 126 | "gfx-webgl2", 127 | "intersection-2d", 128 | "light-probe", 129 | "marionette", 130 | "meshopt", 131 | "particle", 132 | "particle-2d", 133 | "physics-2d-box2d", 134 | "primitive", 135 | "profiler", 136 | "skeletal-animation", 137 | "spine", 138 | "tween", 139 | "ui", 140 | "video", 141 | "websocket", 142 | "webview" 143 | ], 144 | "noDeprecatedFeatures": { 145 | "value": false, 146 | "version": "" 147 | }, 148 | "flags": {} 149 | }, 150 | "macroConfig": { 151 | "ENABLE_WEBGL_ANTIALIAS": false 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /settings/v2/packages/information.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.1", 3 | "information": { 4 | "customSplash": { 5 | "id": "customSplash", 6 | "label": "customSplash", 7 | "enable": true, 8 | "customSplash": { 9 | "complete": true, 10 | "form": "https://creator-api.cocos.com/api/form/show?sid=a7f723de483ae5bcb0a416b7371b0e9c" 11 | } 12 | }, 13 | "removeSplash": { 14 | "id": "removeSplash", 15 | "label": "removeSplash", 16 | "enable": true, 17 | "removeSplash": { 18 | "complete": true, 19 | "form": "https://creator-api.cocos.com/api/form/show?sid=a7f723de483ae5bcb0a416b7371b0e9c" 20 | } 21 | }, 22 | "build-web-mobile": { 23 | "id": "build-web-mobile", 24 | "label": "build-web-mobile", 25 | "enable": false, 26 | "build-web-mobile": { 27 | "complete": false, 28 | "form": "https://creator-api.cocos.com/api/form/show?" 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /settings/v2/packages/program.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.4" 3 | } 4 | -------------------------------------------------------------------------------- /settings/v2/packages/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "general": { 3 | "designResolution": { 4 | "width": 750, 5 | "height": 1334, 6 | "fitHeight": false, 7 | "fitWidth": true 8 | }, 9 | "downloadMaxConcurrency": 100 10 | }, 11 | "__version__": "1.0.6", 12 | "fbx": { 13 | "legacyFbxImporter": { 14 | "visible": true 15 | } 16 | }, 17 | "script": { 18 | "preserveSymlinks": true 19 | }, 20 | "custom_joint_texture_layouts": [] 21 | } 22 | -------------------------------------------------------------------------------- /settings/v2/packages/scene.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.0", 3 | "current-scene": "5298bb0b-166e-4978-af98-0047d43757de" 4 | } 5 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | /* Base configuration. Do not edit this field. */ 3 | "extends": "./temp/tsconfig.cocos.json", 4 | /* Add your custom configuration here. */ 5 | "compilerOptions": { 6 | "strict": false, 7 | "noImplicitAny": true 8 | }, 9 | "exclude": [ 10 | "node_modules", 11 | "library", 12 | "local", 13 | "temp", 14 | "build", 15 | "settings", 16 | "extensions" 17 | ] 18 | } --------------------------------------------------------------------------------