├── .eslintignore ├── .eslintrc.js ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── bug_report_zh.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── ci.yaml ├── .gitignore ├── .npmignore ├── .npmrc ├── .prettierrc.js ├── LICENSE.txt ├── README.md ├── README.zh-CN.md ├── extensions ├── localization-editor │ ├── .editor.js │ ├── .eslintignore │ ├── .gitignore │ ├── .projections.json │ ├── .swcrc │ ├── @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 │ ├── README.md │ ├── README.zh-CN.md │ ├── bin │ │ ├── build │ │ ├── generate-icu-options.ts │ │ ├── generate-main-ipc.ts │ │ ├── generateLanguageMap.ts │ │ ├── install │ │ └── pack.ts │ ├── clear.js │ ├── en-US.xlsx │ ├── extension_cover.png │ ├── i18n │ │ ├── en.js │ │ └── zh.js │ ├── index.yaml │ ├── jest.config.ts │ ├── jest.setup.ts │ ├── localization-editor-api.md │ ├── package.json │ ├── pre-swc-loader.js │ ├── resources │ │ ├── SupportTags.txt │ │ ├── currency.txt │ │ ├── language.csv │ │ ├── language.txt │ │ └── youdao.json │ ├── runtime-node-modules │ │ └── package.json │ ├── src │ │ ├── lib │ │ │ ├── builder │ │ │ │ ├── IBuilder.ts │ │ │ │ ├── ILanguageInfo.ts │ │ │ │ ├── ILocalizationEditorOptions.ts │ │ │ │ ├── IPolyfillInfo.ts │ │ │ │ ├── ITaskOptions.ts │ │ │ │ ├── builder.ts │ │ │ │ ├── hooks.ts │ │ │ │ └── internal.ts │ │ │ ├── core │ │ │ │ ├── container-registry.ts │ │ │ │ ├── entity │ │ │ │ │ ├── config │ │ │ │ │ │ ├── EditorConfig.ts │ │ │ │ │ │ ├── IEditorConfig.ts │ │ │ │ │ │ ├── IProjectConfig.ts │ │ │ │ │ │ ├── ITranslateProviderConfig.ts │ │ │ │ │ │ ├── ITranslateProviderConfigMap.ts │ │ │ │ │ │ ├── ProjectConfig.ts │ │ │ │ │ │ ├── TranslateProviderConfig.ts │ │ │ │ │ │ └── TranslateProviderConfigMap.ts │ │ │ │ │ ├── csv │ │ │ │ │ │ └── ICSVTranslateItem.ts │ │ │ │ │ ├── directory-structure │ │ │ │ │ │ └── directory-structure.ts │ │ │ │ │ ├── gettext │ │ │ │ │ │ ├── IPoHeader.ts │ │ │ │ │ │ └── PoHeader.ts │ │ │ │ │ ├── messages │ │ │ │ │ │ ├── IScanOption.ts │ │ │ │ │ │ ├── MainMessage.ts │ │ │ │ │ │ └── ScanOption.ts │ │ │ │ │ └── translate │ │ │ │ │ │ ├── Association.ts │ │ │ │ │ │ ├── IAssociation.ts │ │ │ │ │ │ ├── ILanguageConfig.ts │ │ │ │ │ │ ├── ITranslateData.ts │ │ │ │ │ │ ├── ITranslateItem.ts │ │ │ │ │ │ ├── IWrapperAssociation.ts │ │ │ │ │ │ ├── IWrapperLanguageConfig.ts │ │ │ │ │ │ ├── IWrapperTranslateItem.ts │ │ │ │ │ │ ├── IWrapperTranslateItemMap.ts │ │ │ │ │ │ ├── LanguageConfig.ts │ │ │ │ │ │ ├── TranslateData.ts │ │ │ │ │ │ ├── TranslateItem.ts │ │ │ │ │ │ ├── TranslateItemType.ts │ │ │ │ │ │ └── WrapperTranslateItem.ts │ │ │ │ ├── error │ │ │ │ │ └── Errors.ts │ │ │ │ ├── factory │ │ │ │ │ └── TranslateProviderFactory.ts │ │ │ │ ├── ipc │ │ │ │ │ ├── MainIPC.ts │ │ │ │ │ ├── SceneIPC.ts │ │ │ │ │ └── WrapperMainIPC.ts │ │ │ │ ├── reader │ │ │ │ │ ├── CSVReader.ts │ │ │ │ │ ├── POReader.ts │ │ │ │ │ ├── Reader.ts │ │ │ │ │ └── XLSXReader.ts │ │ │ │ ├── repository │ │ │ │ │ └── translate │ │ │ │ │ │ ├── GoogleRepository.ts │ │ │ │ │ │ ├── TranslateRepository.ts │ │ │ │ │ │ ├── TranslateRequest.ts │ │ │ │ │ │ ├── TranslateResponse.ts │ │ │ │ │ │ └── YouDaoRepository.ts │ │ │ │ ├── service │ │ │ │ │ ├── EditorMessageService.ts │ │ │ │ │ ├── component │ │ │ │ │ │ └── l10n-component-manager-service.ts │ │ │ │ │ ├── external-translate │ │ │ │ │ │ └── TranslateFileService.ts │ │ │ │ │ ├── persistent │ │ │ │ │ │ ├── CompileService.ts │ │ │ │ │ │ ├── EditorConfigService.ts │ │ │ │ │ │ ├── IPersistentService.ts │ │ │ │ │ │ ├── ProjectConfigService.ts │ │ │ │ │ │ └── TranslateDataSourceService.ts │ │ │ │ │ ├── scanner │ │ │ │ │ │ ├── FileScanService.ts │ │ │ │ │ │ ├── ScanService.ts │ │ │ │ │ │ ├── processor │ │ │ │ │ │ │ ├── ComponentUnLoader.ts │ │ │ │ │ │ │ ├── IProcessor.ts │ │ │ │ │ │ │ ├── MediaProcessor.ts │ │ │ │ │ │ │ ├── SceneProcessor.ts │ │ │ │ │ │ │ └── ScriptProcessor.ts │ │ │ │ │ │ └── serialize │ │ │ │ │ │ │ └── AssetSerializeService.ts │ │ │ │ │ ├── track │ │ │ │ │ │ └── track-service.ts │ │ │ │ │ ├── translate │ │ │ │ │ │ ├── TranslateService.ts │ │ │ │ │ │ └── Youdao.txt │ │ │ │ │ └── util │ │ │ │ │ │ ├── CCPropertyService.ts │ │ │ │ │ │ ├── EditorCheckService.ts │ │ │ │ │ │ ├── EventBusService.ts │ │ │ │ │ │ ├── IEventMap.ts │ │ │ │ │ │ ├── UUIDService.ts │ │ │ │ │ │ └── global.ts │ │ │ │ ├── type │ │ │ │ │ └── type.ts │ │ │ │ ├── wrapper │ │ │ │ │ ├── il10n-manager-wrapper.ts │ │ │ │ │ └── l10n-manager-wrapper.ts │ │ │ │ └── writer │ │ │ │ │ ├── CSVWriter.ts │ │ │ │ │ ├── POWriter.ts │ │ │ │ │ ├── Writer.ts │ │ │ │ │ └── XLSXWriter.ts │ │ │ ├── inspector │ │ │ │ ├── ICUComponentInspector.ts │ │ │ │ └── ICUOptionEnumItem.ts │ │ │ ├── main │ │ │ │ ├── IMainThread.ts │ │ │ │ ├── IWrapperMainThread.ts │ │ │ │ ├── MainAop.ts │ │ │ │ ├── MainThread.ts │ │ │ │ └── main.ts │ │ │ ├── parse.ts │ │ │ ├── scene │ │ │ │ ├── ISceneThread.ts │ │ │ │ ├── SceneThread.ts │ │ │ │ └── scene.ts │ │ │ └── server │ │ │ │ └── server.ts │ │ └── panel │ │ │ ├── builder │ │ │ ├── component │ │ │ │ ├── build-app.less │ │ │ │ ├── build-app.vue │ │ │ │ └── panel │ │ │ │ │ ├── build-home.vue │ │ │ │ │ └── build.home.less │ │ │ └── index.ts │ │ │ ├── default │ │ │ ├── component │ │ │ │ ├── default-app.less │ │ │ │ ├── default-app.vue │ │ │ │ └── panel │ │ │ │ │ ├── default-home.less │ │ │ │ │ ├── default-home.vue │ │ │ │ │ ├── default-mask.less │ │ │ │ │ ├── default-mask.vue │ │ │ │ │ ├── default-translate.less │ │ │ │ │ └── default-translate.vue │ │ │ └── index.ts │ │ │ ├── l10n-label-inspector │ │ │ ├── component │ │ │ │ ├── inspector-app.less │ │ │ │ └── inspector-app.vue │ │ │ └── index.ts │ │ │ └── share │ │ │ ├── less │ │ │ ├── color.less │ │ │ ├── font.less │ │ │ ├── index.less │ │ │ └── ui-label.less │ │ │ ├── scripts │ │ │ ├── ICollection.ts │ │ │ ├── Iterator.ts │ │ │ ├── PanelTranslateData.ts │ │ │ ├── libs │ │ │ │ └── languageMap.ts │ │ │ ├── menu.ts │ │ │ └── utils.ts │ │ │ └── ui │ │ │ ├── m-button.less │ │ │ ├── m-button.vue │ │ │ ├── m-container.less │ │ │ ├── m-container.vue │ │ │ ├── m-file.less │ │ │ ├── m-file.vue │ │ │ ├── m-icon.less │ │ │ ├── m-icon.vue │ │ │ ├── m-input.less │ │ │ ├── m-input.vue │ │ │ ├── m-menu.less │ │ │ ├── m-menu.vue │ │ │ ├── m-process.less │ │ │ ├── m-process.vue │ │ │ ├── m-section.less │ │ │ └── m-section.vue │ ├── states.json │ ├── static │ │ ├── assets │ │ │ ├── components.meta │ │ │ ├── components │ │ │ │ ├── icu-component.ts │ │ │ │ ├── icu-component.ts.meta │ │ │ │ ├── l10n-component.ts │ │ │ │ ├── l10n-component.ts.meta │ │ │ │ ├── l10n-label.ts │ │ │ │ └── l10n-label.ts.meta │ │ │ ├── core.meta │ │ │ ├── core │ │ │ │ ├── asset-manager-initer.ts.meta │ │ │ │ ├── auto-config-intl-manager.ts │ │ │ │ ├── auto-config-intl-manager.ts.meta │ │ │ │ ├── icu-options.ts │ │ │ │ ├── icu-options.ts.meta │ │ │ │ ├── icu-type.ts │ │ │ │ ├── icu-type.ts.meta │ │ │ │ ├── l10n-listen-event.ts │ │ │ │ ├── l10n-listen-event.ts.meta │ │ │ │ ├── l10n-manager.ts │ │ │ │ ├── l10n-manager.ts.meta │ │ │ │ ├── l10n-options.ts │ │ │ │ ├── l10n-options.ts.meta │ │ │ │ ├── localization-global.ts │ │ │ │ ├── localization-global.ts.meta │ │ │ │ ├── resource-data-manager.ts │ │ │ │ └── resource-data-manager.ts.meta │ │ │ ├── l10n.meta │ │ │ ├── l10n.ts │ │ │ ├── l10n.ts.meta │ │ │ ├── l10n │ │ │ │ ├── resource-bundle.json │ │ │ │ ├── resource-bundle.json.meta │ │ │ │ ├── resource-list.json │ │ │ │ └── resource-list.json.meta │ │ │ ├── polyfills.meta │ │ │ └── polyfills │ │ │ │ ├── Intl.DateTimeFormat.ts.meta │ │ │ │ ├── Intl.DisplayNames.ts.meta │ │ │ │ ├── Intl.ListFormat.ts.meta │ │ │ │ ├── Intl.Locale.ts.meta │ │ │ │ ├── Intl.NumberFormat.ts.meta │ │ │ │ ├── Intl.PluralRules.ts │ │ │ │ ├── Intl.PluralRules.ts.meta │ │ │ │ ├── Intl.RelativeTimeFormat.ts.meta │ │ │ │ └── Intl.getCanonicalLocales.ts.meta │ │ ├── icon-2x.png │ │ ├── icon.png │ │ ├── plural-rules │ │ │ └── plural-rules.json │ │ └── tsconfig.json │ ├── tests │ │ ├── gettext-extractor.test.ts │ │ ├── glob.test.ts │ │ ├── repository │ │ │ └── GoogleRepositort.test.ts │ │ ├── service │ │ │ └── LocalizeTool.test.ts │ │ ├── translate-file │ │ │ ├── csv │ │ │ │ └── csv.test.ts │ │ │ └── xlsx │ │ │ │ └── xlsx.test.ts │ │ └── yaml │ │ │ ├── js-yaml.test.ts │ │ │ └── yaml.test.ts │ ├── tsconfig.eslintrc.json │ ├── tsconfig.json │ └── webpack.config.ts └── shader-graph │ ├── .editor.js │ ├── .gitignore │ ├── .workflow.build.js │ ├── .workflow.clear.js │ ├── @types │ ├── shader-node-type.d.ts │ └── vue.d.ts │ ├── README.md │ ├── README.zh-CN.md │ ├── i18n │ ├── en.js │ └── zh.js │ ├── lib │ └── pack.ts │ ├── package.json │ ├── readme │ ├── 使用属性节点.png │ ├── 使用普通节点.png │ ├── 创建后的资源.png │ ├── 创建属性窗口.png │ ├── 创建节点菜单.png │ ├── 初始面板.png │ ├── 右键创建资源.png │ ├── 导入扩展文件.png │ ├── 导入扩展文件夹.png │ ├── 属性检查器选择effect.png │ ├── 属性类型节点.png │ ├── 效果图.png │ ├── 整体结构-EN.png │ ├── 整体结构.png │ ├── 普通类型节点.png │ ├── 自定义节点.png │ ├── 自定义节点菜单.png │ └── 预览窗口.png │ ├── shader-node │ ├── README.md │ ├── README.zh-CN.md │ ├── assets │ │ ├── graph.meta │ │ ├── graph │ │ │ ├── index.ts │ │ │ ├── index.ts.meta │ │ │ ├── register.ts │ │ │ └── register.ts.meta │ │ ├── operation.meta │ │ └── operation │ │ │ ├── base.ts │ │ │ ├── base.ts.meta │ │ │ ├── context.ts │ │ │ ├── context.ts.meta │ │ │ ├── generated.meta │ │ │ ├── generated │ │ │ ├── input.meta │ │ │ ├── input │ │ │ │ ├── basic.meta │ │ │ │ └── basic │ │ │ │ │ ├── boolean.ts │ │ │ │ │ ├── boolean.ts.meta │ │ │ │ │ ├── float.ts │ │ │ │ │ ├── float.ts.meta │ │ │ │ │ ├── slider.ts │ │ │ │ │ ├── slider.ts.meta │ │ │ │ │ ├── vector2.ts │ │ │ │ │ ├── vector2.ts.meta │ │ │ │ │ ├── vector3.ts │ │ │ │ │ ├── vector3.ts.meta │ │ │ │ │ ├── vector4.ts │ │ │ │ │ └── vector4.ts.meta │ │ │ ├── math.meta │ │ │ ├── math │ │ │ │ ├── advanced.meta │ │ │ │ ├── advanced │ │ │ │ │ ├── absolute.ts │ │ │ │ │ ├── absolute.ts.meta │ │ │ │ │ ├── exponential.ts │ │ │ │ │ ├── exponential.ts.meta │ │ │ │ │ ├── length.ts │ │ │ │ │ ├── length.ts.meta │ │ │ │ │ ├── log.ts │ │ │ │ │ ├── log.ts.meta │ │ │ │ │ ├── modulo.ts │ │ │ │ │ ├── modulo.ts.meta │ │ │ │ │ ├── negate.ts │ │ │ │ │ ├── negate.ts.meta │ │ │ │ │ ├── normalize.ts │ │ │ │ │ ├── normalize.ts.meta │ │ │ │ │ ├── posterize.ts │ │ │ │ │ ├── posterize.ts.meta │ │ │ │ │ ├── reciprocal-square.ts │ │ │ │ │ ├── reciprocal-square.ts.meta │ │ │ │ │ ├── reciprocal.ts │ │ │ │ │ └── reciprocal.ts.meta │ │ │ │ ├── basic.meta │ │ │ │ ├── basic │ │ │ │ │ ├── add.ts │ │ │ │ │ ├── add.ts.meta │ │ │ │ │ ├── divide.ts │ │ │ │ │ ├── divide.ts.meta │ │ │ │ │ ├── multiply.ts │ │ │ │ │ ├── multiply.ts.meta │ │ │ │ │ ├── power.ts │ │ │ │ │ ├── power.ts.meta │ │ │ │ │ ├── square.ts │ │ │ │ │ ├── square.ts.meta │ │ │ │ │ ├── substract.ts │ │ │ │ │ └── substract.ts.meta │ │ │ │ ├── derivative.meta │ │ │ │ ├── derivative │ │ │ │ │ ├── ddx.ts │ │ │ │ │ ├── ddx.ts.meta │ │ │ │ │ ├── ddxy.ts │ │ │ │ │ ├── ddxy.ts.meta │ │ │ │ │ ├── ddy.ts │ │ │ │ │ └── ddy.ts.meta │ │ │ │ ├── interpolation.meta │ │ │ │ ├── interpolation │ │ │ │ │ ├── inverse-lerp.ts │ │ │ │ │ ├── inverse-lerp.ts.meta │ │ │ │ │ ├── lerp.ts │ │ │ │ │ ├── lerp.ts.meta │ │ │ │ │ ├── smoothstep.ts │ │ │ │ │ └── smoothstep.ts.meta │ │ │ │ ├── range.meta │ │ │ │ ├── range │ │ │ │ │ ├── clamp.ts │ │ │ │ │ ├── clamp.ts.meta │ │ │ │ │ ├── fraction.ts │ │ │ │ │ ├── fraction.ts.meta │ │ │ │ │ ├── max.ts │ │ │ │ │ ├── max.ts.meta │ │ │ │ │ ├── min.ts │ │ │ │ │ ├── min.ts.meta │ │ │ │ │ ├── one-minus.ts │ │ │ │ │ ├── one-minus.ts.meta │ │ │ │ │ ├── random-range.ts │ │ │ │ │ ├── random-range.ts.meta │ │ │ │ │ ├── remap.ts │ │ │ │ │ ├── remap.ts.meta │ │ │ │ │ ├── saturate.ts │ │ │ │ │ └── saturate.ts.meta │ │ │ │ ├── round.meta │ │ │ │ ├── round │ │ │ │ │ ├── ceil.ts │ │ │ │ │ ├── ceil.ts.meta │ │ │ │ │ ├── floor.ts │ │ │ │ │ ├── floor.ts.meta │ │ │ │ │ ├── round.ts │ │ │ │ │ ├── round.ts.meta │ │ │ │ │ ├── sign.ts │ │ │ │ │ ├── sign.ts.meta │ │ │ │ │ ├── step.ts │ │ │ │ │ ├── step.ts.meta │ │ │ │ │ ├── truncate.ts │ │ │ │ │ └── truncate.ts.meta │ │ │ │ ├── trigonometry.meta │ │ │ │ ├── trigonometry │ │ │ │ │ ├── arccosine.ts │ │ │ │ │ ├── arccosine.ts.meta │ │ │ │ │ ├── arcsine.ts │ │ │ │ │ ├── arcsine.ts.meta │ │ │ │ │ ├── arctangent.ts │ │ │ │ │ ├── arctangent.ts.meta │ │ │ │ │ ├── arctangent2.ts │ │ │ │ │ ├── arctangent2.ts.meta │ │ │ │ │ ├── cosine.ts │ │ │ │ │ ├── cosine.ts.meta │ │ │ │ │ ├── degrees-to-radians.ts │ │ │ │ │ ├── degrees-to-radians.ts.meta │ │ │ │ │ ├── hyperbolic-cosine.ts │ │ │ │ │ ├── hyperbolic-cosine.ts.meta │ │ │ │ │ ├── hyperbolic-sine.ts │ │ │ │ │ ├── hyperbolic-sine.ts.meta │ │ │ │ │ ├── hyperbolic.ts │ │ │ │ │ ├── hyperbolic.ts.meta │ │ │ │ │ ├── radians-to-degrees.ts │ │ │ │ │ ├── radians-to-degrees.ts.meta │ │ │ │ │ ├── sine.ts │ │ │ │ │ ├── sine.ts.meta │ │ │ │ │ ├── tangent.ts │ │ │ │ │ └── tangent.ts.meta │ │ │ │ ├── vector.meta │ │ │ │ ├── vector │ │ │ │ │ ├── cross-product.ts │ │ │ │ │ ├── cross-product.ts.meta │ │ │ │ │ ├── distance.ts │ │ │ │ │ ├── distance.ts.meta │ │ │ │ │ ├── dot-product.ts │ │ │ │ │ ├── dot-product.ts.meta │ │ │ │ │ ├── fresnel.ts │ │ │ │ │ ├── fresnel.ts.meta │ │ │ │ │ ├── projection.ts │ │ │ │ │ ├── projection.ts.meta │ │ │ │ │ ├── reflection.ts │ │ │ │ │ ├── reflection.ts.meta │ │ │ │ │ ├── rejection.ts │ │ │ │ │ ├── rejection.ts.meta │ │ │ │ │ ├── sphere-mask.ts │ │ │ │ │ └── sphere-mask.ts.meta │ │ │ │ ├── wave.meta │ │ │ │ └── wave │ │ │ │ │ ├── noise-sine-wave.ts │ │ │ │ │ ├── noise-sine-wave.ts.meta │ │ │ │ │ ├── sawtooth-wave.ts │ │ │ │ │ ├── sawtooth-wave.ts.meta │ │ │ │ │ ├── square-wave.ts │ │ │ │ │ ├── square-wave.ts.meta │ │ │ │ │ ├── triangle-wave.ts │ │ │ │ │ └── triangle-wave.ts.meta │ │ │ ├── procedural.meta │ │ │ ├── procedural │ │ │ │ ├── noise.meta │ │ │ │ ├── noise │ │ │ │ │ ├── gradient-noise.ts │ │ │ │ │ ├── gradient-noise.ts.meta │ │ │ │ │ ├── simple-noise.ts │ │ │ │ │ └── simple-noise.ts.meta │ │ │ │ ├── shape.meta │ │ │ │ └── shape │ │ │ │ │ ├── ellipse.ts │ │ │ │ │ ├── ellipse.ts.meta │ │ │ │ │ ├── rectangle.ts │ │ │ │ │ ├── rectangle.ts.meta │ │ │ │ │ ├── round-rectangle.ts │ │ │ │ │ └── round-rectangle.ts.meta │ │ │ ├── uv.meta │ │ │ └── uv │ │ │ │ ├── polar-coordinates.ts │ │ │ │ ├── polar-coordinates.ts.meta │ │ │ │ ├── rotate-coordinates.ts │ │ │ │ ├── rotate-coordinates.ts.meta │ │ │ │ ├── tilling-and-offset.ts │ │ │ │ └── tilling-and-offset.ts.meta │ │ │ ├── index.ts │ │ │ ├── index.ts.meta │ │ │ ├── manual.meta │ │ │ ├── manual │ │ │ ├── artistic.meta │ │ │ ├── channel.meta │ │ │ ├── channel │ │ │ │ ├── combine.ts │ │ │ │ ├── combine.ts.meta │ │ │ │ ├── split.ts │ │ │ │ └── split.ts.meta │ │ │ ├── index.ts │ │ │ ├── index.ts.meta │ │ │ ├── input.meta │ │ │ ├── input │ │ │ │ ├── InputNode.ts.meta │ │ │ │ ├── basic.meta │ │ │ │ ├── basic │ │ │ │ │ ├── color.ts │ │ │ │ │ ├── color.ts.meta │ │ │ │ │ ├── time.ts │ │ │ │ │ └── time.ts.meta │ │ │ │ ├── geometry.meta │ │ │ │ ├── geometry │ │ │ │ │ ├── normal-vector.ts │ │ │ │ │ ├── normal-vector.ts.meta │ │ │ │ │ ├── position.ts │ │ │ │ │ ├── position.ts.meta │ │ │ │ │ ├── uv.ts │ │ │ │ │ ├── uv.ts.meta │ │ │ │ │ ├── vertex-color.ts │ │ │ │ │ ├── vertex-color.ts.meta │ │ │ │ │ ├── view-direction.ts │ │ │ │ │ └── view-direction.ts.meta │ │ │ │ ├── input-node.ts │ │ │ │ ├── input-node.ts.meta │ │ │ │ ├── property-node.ts │ │ │ │ ├── property-node.ts.meta │ │ │ │ ├── texture.meta │ │ │ │ ├── texture │ │ │ │ │ ├── cubemap-asset.ts │ │ │ │ │ ├── cubemap-asset.ts.meta │ │ │ │ │ ├── sample-cubemap.ts │ │ │ │ │ ├── sample-cubemap.ts.meta │ │ │ │ │ ├── sample-texture2d.ts │ │ │ │ │ ├── sample-texture2d.ts.meta │ │ │ │ │ ├── texture-asset.ts │ │ │ │ │ ├── texture-asset.ts.meta │ │ │ │ │ ├── texture2d-asset.ts │ │ │ │ │ └── texture2d-asset.ts.meta │ │ │ │ ├── variable.meta │ │ │ │ └── variable │ │ │ │ │ ├── get-local-var.ts │ │ │ │ │ ├── get-local-var.ts.meta │ │ │ │ │ ├── register-local-var.ts │ │ │ │ │ └── register-local-var.ts.meta │ │ │ ├── logic.meta │ │ │ ├── logic │ │ │ │ ├── all.ts │ │ │ │ ├── all.ts.meta │ │ │ │ ├── and.ts │ │ │ │ ├── and.ts.meta │ │ │ │ ├── any.ts │ │ │ │ ├── any.ts.meta │ │ │ │ ├── branch.ts │ │ │ │ ├── branch.ts.meta │ │ │ │ ├── comparison.ts │ │ │ │ ├── comparison.ts.meta │ │ │ │ ├── is-nan.ts │ │ │ │ ├── is-nan.ts.meta │ │ │ │ ├── not.ts │ │ │ │ ├── not.ts.meta │ │ │ │ ├── or.ts │ │ │ │ └── or.ts.meta │ │ │ ├── master.meta │ │ │ ├── master │ │ │ │ ├── MasterNode.ts │ │ │ │ ├── MasterNode.ts.meta │ │ │ │ ├── SurfaceMasterNode.ts │ │ │ │ ├── SurfaceMasterNode.ts.meta │ │ │ │ ├── UnlitMasterNode.ts │ │ │ │ └── UnlitMasterNode.ts.meta │ │ │ ├── math.meta │ │ │ ├── procedural.meta │ │ │ ├── subgraph.meta │ │ │ ├── subgraph │ │ │ │ ├── SubGraphNode.ts │ │ │ │ ├── SubGraphNode.ts.meta │ │ │ │ ├── SubGraphOutputNode.ts │ │ │ │ └── SubGraphOutputNode.ts.meta │ │ │ ├── utility.meta │ │ │ ├── utility │ │ │ │ ├── PreviewNode.ts │ │ │ │ └── PreviewNode.ts.meta │ │ │ └── uv.meta │ │ │ ├── nodes.meta │ │ │ ├── nodes │ │ │ ├── math.meta │ │ │ ├── math │ │ │ │ ├── advanced.meta │ │ │ │ ├── basic.meta │ │ │ │ ├── derivative.meta │ │ │ │ ├── interpolation.meta │ │ │ │ ├── range.meta │ │ │ │ ├── round.meta │ │ │ │ ├── trigonometry.meta │ │ │ │ ├── vector.meta │ │ │ │ └── wave.meta │ │ │ ├── procedural.meta │ │ │ ├── procedural │ │ │ │ ├── noise.meta │ │ │ │ └── shape.meta │ │ │ ├── subgraph.meta │ │ │ ├── utility.meta │ │ │ └── uv.meta │ │ │ ├── property.ts │ │ │ ├── property.ts.meta │ │ │ ├── shadergraph.ts │ │ │ ├── shadergraph.ts.meta │ │ │ ├── slot.ts │ │ │ ├── slot.ts.meta │ │ │ ├── type.ts │ │ │ ├── type.ts.meta │ │ │ ├── utils.ts │ │ │ └── utils.ts.meta │ ├── compile-shader │ │ ├── scripts │ │ │ ├── generate.js │ │ │ └── utils.js │ │ └── shader-templates │ │ │ ├── chunks │ │ │ ├── common.chunk │ │ │ ├── input_basic.chunk │ │ │ ├── math.chunk │ │ │ ├── noise.chunk │ │ │ ├── range.chunk │ │ │ ├── shape.chunk │ │ │ └── uv.chunk │ │ │ └── master │ │ │ ├── SurfaceMasterNode.effect │ │ │ └── UnlitMasterNode.effect │ └── test │ ├── src │ ├── block-forge │ │ ├── block.ts │ │ ├── enum.ts │ │ ├── event.ts │ │ ├── forge.ts │ │ ├── graph.ts │ │ ├── index.ts │ │ ├── interface │ │ │ ├── block.ts │ │ │ ├── forge.ts │ │ │ ├── graph.ts │ │ │ ├── index.ts │ │ │ └── pin.ts │ │ ├── internal │ │ │ ├── index.ts │ │ │ ├── pin-boolean.ts │ │ │ ├── pin-color.ts │ │ │ ├── pin-dynamic-enum.ts │ │ │ ├── pin-enum.ts │ │ │ ├── pin-float.ts │ │ │ ├── pin-int.ts │ │ │ ├── pin-mat3.ts │ │ │ ├── pin-mat4.ts │ │ │ ├── pin-string.ts │ │ │ ├── pin-texture2D.ts │ │ │ ├── pin-textureCube.ts │ │ │ ├── pin-unknown.ts │ │ │ ├── pin-vec2.ts │ │ │ ├── pin-vec3.ts │ │ │ └── pin-vec4.ts │ │ ├── module │ │ │ └── forge.ts │ │ ├── pin.ts │ │ ├── undo.ts │ │ └── utils.ts │ ├── contributions │ │ ├── assets-menu.ts │ │ ├── effect-header.ts │ │ ├── internal.ts │ │ ├── preview-scene.ts │ │ ├── preview │ │ │ ├── Interactive-preview.ts │ │ │ ├── buffer.ts │ │ │ ├── index.ts │ │ │ ├── preview-base.ts │ │ │ └── shader-graph-preview.ts │ │ └── scene.ts │ ├── effect-utils.ts │ ├── hooks.ts │ ├── importer │ │ ├── index.ts │ │ ├── shader-graph-3.8.ts │ │ ├── shader-graph-handler.ts │ │ ├── shader-graph.ts │ │ └── utils-3.8.ts │ ├── main.ts │ ├── panels │ │ └── shader-graph │ │ │ ├── components │ │ │ └── float-window │ │ │ │ ├── base │ │ │ │ ├── const.ts │ │ │ │ ├── header.ts │ │ │ │ ├── index.ts │ │ │ │ └── resizer.ts │ │ │ │ ├── common.ts │ │ │ │ ├── create-node │ │ │ │ └── index.ts │ │ │ │ ├── custom-nodes │ │ │ │ └── index.ts │ │ │ │ ├── graph-property │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── internal.ts │ │ │ │ ├── preview │ │ │ │ └── index.ts │ │ │ │ └── utils.ts │ │ │ ├── float-windows.ts │ │ │ ├── index.ts │ │ │ ├── mask.ts │ │ │ ├── shortcuts.ts │ │ │ └── view.ts │ └── shader-graph │ │ ├── base │ │ ├── base-mgr.ts │ │ ├── forge-mgr.ts │ │ ├── graph-asset-mgr.ts │ │ ├── graph-config-mgr.ts │ │ ├── graph-data-mgr.ts │ │ ├── graph-editor-mgr.ts │ │ ├── graph-property-mgr.ts │ │ ├── index.ts │ │ ├── internal.ts │ │ ├── mask-mgr.ts │ │ └── message-mgr.ts │ │ ├── declare │ │ ├── block.ts │ │ ├── graph.ts │ │ └── index.ts │ │ ├── global-exports.ts │ │ ├── index.ts │ │ ├── interface.ts │ │ ├── internal.ts │ │ ├── menu │ │ ├── index.ts │ │ └── template │ │ │ └── base-menu.ts │ │ └── utils.ts │ ├── static │ ├── asset-icon.png │ ├── icon.png │ └── shader-graph │ │ ├── create-node.less │ │ ├── float-window.less │ │ ├── graph-property.less │ │ ├── index.html │ │ ├── preview.less │ │ ├── style.css │ │ └── style.less │ ├── tests │ └── base.test.ts │ └── tsconfig.json ├── package.json └── workflow └── scripts ├── build.js ├── common.js ├── pack.js ├── postinstall.js ├── publish.js └── test.js /.eslintignore: -------------------------------------------------------------------------------- 1 | scripts -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: ['prettier'], 3 | extends: ['plugin:prettier/recommended'], 4 | }; -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: 'bug' 6 | assignees: '' 7 | --- 8 | 9 | **Describe the bug** 10 | 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | 15 | Steps to reproduce the behavior: 16 | 1. Go to '...' 17 | 2. Click on '....' 18 | 3. Scroll down to '....' 19 | 4. See error 20 | 21 | **Expected behavior** 22 | 23 | A clear and concise description of what you expected to happen. 24 | 25 | **Screenshots** 26 | 27 | If applicable, add screenshots to help explain your problem. 28 | 29 | **Desktop (please complete the following information):** 30 | 31 | - OS: [e.g. iOS] 32 | - Browser [e.g. chrome, safari] 33 | - Version [e.g. 22] 34 | 35 | **Additional context** 36 | 37 | Add any other context about the problem here. 38 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report_zh.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 问题反馈 3 | about: 创建报告以帮助我们改进 4 | title: '' 5 | labels: 'bug' 6 | assignees: '' 7 | --- 8 | 9 | **描述错误** 10 | 11 | 对 bug 的简要概述。 12 | 13 | **复现** 14 | 15 | 再现行为的步骤: 16 | 1. 转到“…” 17 | 2. 单击“….” 18 | 3. 向下滚动至“….” 19 | 4. 参见错误 20 | 21 | **预期行为** 22 | 23 | 对你期望发生的事情进行清晰且简要的概述。 24 | 25 | **屏幕截图** 26 | 27 | 如果可以,请添加屏幕截图以帮助解释您的问题。 28 | 29 | **桌面(请填写以下信息):** 30 | 31 | - 操作系统:[例如iOS] 32 | - 系统版本:[例如windows11] 33 | - 浏览器:[例如chrome、safari] 34 | - 浏览器版本:[例如100] 35 | 36 | **附加上下文** 37 | 38 | 在此处添加有关该问题的任何其他上下文。 39 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | ## PR 类型 3 | 4 | - [ ] 问题修复 5 | - [ ] 优化 6 | - [ ] 新功能 7 | - [ ] 测试用例 8 | 9 | 10 | ## PR 描述 11 | 12 | 13 | ### 修改说明 14 | 1. 15 | -------------------------------------------------------------------------------- /.github/workflows/ci.yaml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: {} 5 | merge_group: 6 | pull_request: 7 | types: 8 | - opened 9 | - synchronize 10 | - ready_for_review 11 | paths: 12 | - 'source/**.ts' 13 | - 'source/scripts/*.js' 14 | - '.github/workfows/ci.yaml' 15 | 16 | permissions: 17 | contents: read 18 | 19 | jobs: 20 | check-tests: 21 | runs-on: ubuntu-latest 22 | strategy: 23 | matrix: 24 | node-version: [18.x] 25 | steps: 26 | - uses: actions/checkout@v3 27 | 28 | - name: Setup Node.js ${{ matrix.node-version }} 29 | uses: actions/setup-node@v3 30 | with: 31 | node-version: ${{ matrix.node-version }} 32 | 33 | - name: Run CI 34 | run: npm run ci 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # 忽略操作系统生成的文件 2 | .DS_Store 3 | Thumbs.db 4 | 5 | # 忽略 Node.js 生成的文件夹 6 | node_modules/ 7 | npm-debug.log 8 | yarn-error.log 9 | 10 | # 忽略本地配置文件(例如,配置文件包含敏感信息) 11 | config.js 12 | .env 13 | 14 | # 忽略依赖管理文件(可以用于避免冲突) 15 | package-lock.json 16 | yarn.lock 17 | 18 | # 忽略构建输出和临时文件 19 | dist/ 20 | build/ 21 | .tmp/ 22 | .cache/ 23 | .history/ 24 | 25 | # 忽略日志文件 26 | logs/ 27 | *.log 28 | npm-debug.log* 29 | 30 | # 忽略测试结果 31 | coverage/ 32 | 33 | # 忽略编辑器生成的文件 34 | .vscode/ 35 | .idea/ 36 | *.swp 37 | 38 | # 忽略自动生成的文档和注释 39 | extensions/shader-graph/.npmrc 40 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # 使用 .gitignore 中的规则排除不需要包含在 npm 包中的文件 2 | /source 3 | /test 4 | /script 5 | 6 | # 如果需要在 npm 包中包含特定文件,请在下面取消注释并添加文件路径 7 | !/build 8 | !/dist -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | electron_mirror=https://npmmirror.com/mirrors/electron/ 2 | ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ 3 | @base:registry=http://creator-npm.cocos.org:7001/ 4 | @editor:registry=http://creator-npm.cocos.org:7001/ 5 | registry=https://registry.npmmirror.com 6 | 7 | strict-ssl=false 8 | email=root@cocos.com 9 | //creator-npm.cocos.org:7001/:_authToken=cnpm_1MOeWwSZ6xKadyX5bBJza0EPcP9WJDH8i_2tVhXy -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tabWidth: 4, 3 | singleQuote: true, 4 | }; 5 | -------------------------------------------------------------------------------- /extensions/localization-editor/.editor.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * 打包的时候不需要打到 asar 的文件夹 5 | * 如果不填,则所有的代码都会进入 asar 6 | * @returns {{files: string[], folders: string[]}} 7 | */ 8 | exports.unpacked = function() { 9 | return { 10 | folders: [ 11 | './static/assets', 12 | './node_modules' 13 | ] 14 | }; 15 | }; 16 | 17 | exports.xxtea = function() { 18 | return [ 19 | [ 20 | 'panel-dist/**/*.js', 21 | ], 22 | [ 23 | 'dist/**/*.js', 24 | ], 25 | ]; 26 | }; 27 | 28 | exports.clearSource = function() { 29 | return [ 30 | './src', 31 | './panel', 32 | ]; 33 | } -------------------------------------------------------------------------------- /extensions/localization-editor/.eslintignore: -------------------------------------------------------------------------------- 1 | @types 2 | /*.json 3 | *.config.ts 4 | *.setup.ts 5 | dist 6 | panel-dist 7 | -------------------------------------------------------------------------------- /extensions/localization-editor/.projections.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true 3 | } 4 | -------------------------------------------------------------------------------- /extensions/localization-editor/.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/swcrc", 3 | "minify": false, 4 | "module": { 5 | "type": "commonjs" 6 | }, 7 | "jsc": { 8 | "parser": { 9 | "syntax": "typescript", 10 | "tsx": false, 11 | "decorators": true, 12 | "dynamicImport": true, 13 | "decoratorsBeforeExport": true 14 | }, 15 | "transform": { 16 | "legacyDecorator": true, 17 | "decoratorMetadata": true 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /extensions/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/localization-editor/@types/runtime/components/icu-component.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /extensions/localization-editor/@types/runtime/components/l10n-component.d.ts: -------------------------------------------------------------------------------- 1 | import { Component, Label } from 'cc'; 2 | export default abstract class L10nComponent extends Component { 3 | protected constructor(); 4 | get string(): string; 5 | label?: Label | null; 6 | protected onLoad(): void; 7 | protected start(): void; 8 | render(): void; 9 | preview(value: string): void; 10 | } 11 | -------------------------------------------------------------------------------- /extensions/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/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/localization-editor/@types/runtime/core/auto-config-intl-manager.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /extensions/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/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/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/localization-editor/@types/runtime/core/resource-data-manager.d.ts: -------------------------------------------------------------------------------- 1 | import { AssetManager, JsonAsset } from 'cc'; 2 | import { ResourceBundle, ResourceList } from './l10n-options'; 3 | export default class ResourceDataManager { 4 | readResourceList(): Promise; 5 | readResourceBundle(tags: Intl.BCP47LanguageTag[]): Promise; 6 | /** 7 | * 编辑器模式下使用 8 | * @param locales 9 | */ 10 | editorLoad(locales: Intl.BCP47LanguageTag[]): Promise; 11 | /** 12 | * 构建后运行时使用 13 | * @param fileName 14 | */ 15 | runtimeLoad(fileName: string): Promise; 16 | /** 17 | * 浏览器预览使用 18 | * @param urlPath 19 | */ 20 | previewLoad(urlPath: string): Promise; 21 | checkBundle(bundleName: string): Promise; 22 | getBundle(bundleName: string): Promise; 23 | getResource(bundle: AssetManager.Bundle, resourceName: string): Promise; 24 | } 25 | -------------------------------------------------------------------------------- /extensions/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/localization-editor/@types/runtime/polyfills/Intl.DateTimeFormat.d.ts: -------------------------------------------------------------------------------- 1 | import '@formatjs/intl-datetimeformat'; 2 | -------------------------------------------------------------------------------- /extensions/localization-editor/@types/runtime/polyfills/Intl.DisplayNames.d.ts: -------------------------------------------------------------------------------- 1 | import '@formatjs/intl-displaynames'; 2 | -------------------------------------------------------------------------------- /extensions/localization-editor/@types/runtime/polyfills/Intl.ListFormat.d.ts: -------------------------------------------------------------------------------- 1 | import '@formatjs/intl-listformat'; 2 | -------------------------------------------------------------------------------- /extensions/localization-editor/@types/runtime/polyfills/Intl.Locale.d.ts: -------------------------------------------------------------------------------- 1 | import '@formatjs/intl-locale'; 2 | -------------------------------------------------------------------------------- /extensions/localization-editor/@types/runtime/polyfills/Intl.NumberFormat.d.ts: -------------------------------------------------------------------------------- 1 | import '@formatjs/intl-numberformat'; 2 | -------------------------------------------------------------------------------- /extensions/localization-editor/@types/runtime/polyfills/Intl.PluralRules.d.ts: -------------------------------------------------------------------------------- 1 | import 'intl-pluralrules'; 2 | -------------------------------------------------------------------------------- /extensions/localization-editor/@types/runtime/polyfills/Intl.RelativeTimeFormat.d.ts: -------------------------------------------------------------------------------- 1 | import '@formatjs/intl-relativetimeformat'; 2 | -------------------------------------------------------------------------------- /extensions/localization-editor/@types/runtime/polyfills/Intl.getCanonicalLocales.d.ts: -------------------------------------------------------------------------------- 1 | import '@formatjs/intl-getcanonicallocales'; 2 | -------------------------------------------------------------------------------- /extensions/localization-editor/bin/build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | rm -rf @types/runtime 3 | cd static || exit 4 | npx tsc -b 5 | cd .. 6 | rm -rf dist 7 | rm -rf panel-dist 8 | npx tsc -b --verbose 9 | npx vite build --mode "$1" 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/bin/install: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | #rm -rf node_modules 3 | npm clean-install --ignore-scripts "$1" 4 | -------------------------------------------------------------------------------- /extensions/localization-editor/clear.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { readdirSync, statSync, unlinkSync } = require('fs'); 4 | const { join } = require('path'); 5 | 6 | (() => { 7 | const dir = join(__dirname, './node_modules'); 8 | 9 | let total = 0; 10 | 11 | function step(dir) { 12 | total++; 13 | const names = readdirSync(dir); 14 | 15 | names.forEach((name) => { 16 | const file = join(dir, name); 17 | const stat = statSync(file); 18 | if (stat.isDirectory()) { 19 | step(file); 20 | } else { 21 | if (/.d.ts$/.test(file)) { 22 | unlinkSync(file); 23 | } else { 24 | total++; 25 | } 26 | } 27 | }); 28 | } 29 | 30 | step(dir); 31 | console.log(total); 32 | })(); 33 | -------------------------------------------------------------------------------- /extensions/localization-editor/en-US.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/localization-editor/en-US.xlsx -------------------------------------------------------------------------------- /extensions/localization-editor/extension_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/localization-editor/extension_cover.png -------------------------------------------------------------------------------- /extensions/localization-editor/jest.setup.ts: -------------------------------------------------------------------------------- 1 | import 'reflect-metadata'; 2 | import './src/lib/core/container-registry'; 3 | import '@formatjs/intl-numberformat'; 4 | import 'intl-pluralrules'; 5 | import '@formatjs/intl-datetimeformat'; 6 | import '@formatjs/intl-relativetimeformat'; 7 | import '@formatjs/intl-displaynames'; 8 | import '@formatjs/intl-getcanonicallocales'; 9 | import '@formatjs/intl-locale'; 10 | import '@formatjs/intl-listformat'; 11 | -------------------------------------------------------------------------------- /extensions/localization-editor/pre-swc-loader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 对vue文件的前置处理 3 | * 当vue-loader解析出 29 | -------------------------------------------------------------------------------- /extensions/localization-editor/src/panel/share/less/color.less: -------------------------------------------------------------------------------- 1 | @selected-color: #40aaca; 2 | @strong-white-color: rgba(250, 250, 250, 1); 3 | @white-color: rgba(204, 204, 204, 1); 4 | @bit-weak-white-color: rgba(163, 163, 163, 1); 5 | @weak-white-color: rgba(143, 143, 143, 1); 6 | @weaker-white-color: rgba(112, 112, 112, 1); 7 | @weak-gray-color: rgba(82, 82, 82, 1); 8 | @gray-color: rgba(61, 61, 61, 1); 9 | @strong-gray-color: rgba(43, 43, 43, 1); 10 | @weak-dark-color: rgba(31, 31, 31, 1); 11 | @dark-color: rgba(20, 20, 20, 1); 12 | @red-color: rgba(216, 95, 111, 1); 13 | @yellow-color: #f1a348; 14 | @bright-blue-color: rgba(101, 189, 215, 1); 15 | @blue-color: rgba(64, 170, 202, 1); 16 | @black-blue-color: rgba(34, 127, 155, 1); 17 | @blackest-blue-color: rgba(19, 92, 115, 1); 18 | @yellow-color: rgba(241, 163, 72, 1); 19 | @pink-color: rgba(216, 95, 111, 1); 20 | -------------------------------------------------------------------------------- /extensions/localization-editor/src/panel/share/less/font.less: -------------------------------------------------------------------------------- 1 | @normal-font: "Source Han Sans CN"; 2 | @ping-fang-font: "PingFang SC"; 3 | -------------------------------------------------------------------------------- /extensions/localization-editor/src/panel/share/less/index.less: -------------------------------------------------------------------------------- 1 | 2 | ui-button { 3 | &>ui-label { 4 | height: 100%; 5 | line-height: 24px; 6 | } 7 | } 8 | 9 | @import './color.less'; 10 | @import './font.less'; 11 | @import './ui-label.less'; 12 | @import '../ui/m-button.less'; 13 | @import '../ui/m-file.less'; 14 | @import '../ui/m-icon.less'; 15 | @import '../ui/m-input.less'; 16 | @import '../ui/m-process.less'; 17 | @import '../ui/m-section.less'; 18 | @import '../ui/m-menu.less'; -------------------------------------------------------------------------------- /extensions/localization-editor/src/panel/share/scripts/ICollection.ts: -------------------------------------------------------------------------------- 1 | export interface ICollection { 2 | /** 3 | * 多份搜索的路径 4 | */ 5 | dirs: string[]; 6 | /** 7 | * 多份扩展名 8 | */ 9 | extNames: string[]; 10 | /** 11 | * 排除的目录路径 12 | */ 13 | excludes: string[]; 14 | } 15 | -------------------------------------------------------------------------------- /extensions/localization-editor/src/panel/share/scripts/Iterator.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 能够被面板索引的数组的每一项 3 | */ 4 | export default class Iterator { 5 | public __key: string; 6 | constructor(public value: T) { 7 | this.__key = `${Date.now().toString()}-${Math.random()}`; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/src/panel/share/ui/m-button.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 38 | -------------------------------------------------------------------------------- /extensions/localization-editor/src/panel/share/ui/m-container.less: -------------------------------------------------------------------------------- 1 | .scroll-container { 2 | 3 | .virtual-list { 4 | position: absolute; 5 | width: 100%; 6 | left: 0; 7 | top: 0; 8 | } 9 | } -------------------------------------------------------------------------------- /extensions/localization-editor/src/panel/share/ui/m-file.less: -------------------------------------------------------------------------------- 1 | div.mFile { 2 | display: flex; 3 | align-items: center; 4 | height: 16px; 5 | &> .mInput { 6 | flex: 1; 7 | } 8 | 9 | &> div.label { 10 | min-width: 200px; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/localization-editor/src/panel/share/ui/m-icon.less: -------------------------------------------------------------------------------- 1 | div.mIcon { 2 | user-select: none; 3 | font-size: 12px; 4 | display: flex; 5 | align-items: center; 6 | justify-content: center; 7 | border-radius: 4px; 8 | color: @bit-weak-white-color; 9 | border: 1px solid; 10 | width: 16px; 11 | height: 16px; 12 | &:hover { 13 | background-color: @weak-gray-color; 14 | border-color: @weak-gray-color; 15 | cursor: pointer; 16 | } 17 | &:active { 18 | background-color: @weaker-white-color; 19 | border-color: @weaker-white-color; 20 | cursor: pointer; 21 | } 22 | &[disabled="true"] { 23 | background-color: @strong-gray-color; 24 | color: @weak-gray-color; 25 | } 26 | &[background="false"] { 27 | background-color: transparent; 28 | } 29 | &[border="false"] { 30 | border-color: transparent; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /extensions/localization-editor/src/panel/share/ui/m-icon.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 32 | -------------------------------------------------------------------------------- /extensions/localization-editor/src/panel/share/ui/m-menu.less: -------------------------------------------------------------------------------- 1 | div.mMenu { 2 | position: absolute; 3 | border-radius: 4px; 4 | border: 1px solid #000000; 5 | background: #1f1f1f; 6 | box-shadow: 0 4px 8px 0 #000000; 7 | padding: 4px 4px 2px 4px; 8 | min-width: 120px; 9 | &> div { 10 | height: 24; 11 | padding-left: 6px; 12 | margin-bottom: 2px; 13 | &> ui-label { 14 | line-height: 24px; 15 | } 16 | &:hover { 17 | background-color: @gray-color; 18 | cursor: pointer; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /extensions/localization-editor/src/panel/share/ui/m-process.less: -------------------------------------------------------------------------------- 1 | div.mProcess { 2 | height: 4px; 3 | background-color: @weak-gray-color; 4 | border-radius: 12px; 5 | & > div.content { 6 | height: 100%; 7 | border-radius: 12px; 8 | &[color="pink"] { 9 | background-color: @pink-color; 10 | } 11 | &[color="blue"] { 12 | background-color: @blue-color; 13 | } 14 | &[color="yellow"] { 15 | background-color: @yellow-color; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /extensions/localization-editor/src/panel/share/ui/m-process.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 21 | 22 | 26 | -------------------------------------------------------------------------------- /extensions/localization-editor/src/panel/share/ui/m-section.less: -------------------------------------------------------------------------------- 1 | div.mSection { 2 | &>div.header { 3 | display: flex; 4 | cursor: pointer; 5 | padding-top: 2px; 6 | padding-bottom: 2px; 7 | align-items: center; 8 | 9 | &>.icon:not([upside-down="true"]) { 10 | transform: rotate(-90deg); 11 | } 12 | 13 | &>.icon { 14 | transform: rotate(0deg); 15 | } 16 | } 17 | 18 | &>div.content { 19 | padding-left: 14px; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /extensions/localization-editor/src/panel/share/ui/m-section.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 38 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/components.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "e20945fc-1f04-4216-a044-2652e1ebdf78", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/components/icu-component.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "7a970d99-7d42-4b01-895c-a1fd06c411b5", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/components/l10n-component.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "64a567b7-70a8-4921-894e-b2b550a6ba6f", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/components/l10n-label.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "30d83ab3-45f6-472d-8305-9f8280f4f1b8", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/core.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "ef8d37e0-634c-4106-a3ee-13df564c46a3", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {}, 11 | "bundleName": "1" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/core/asset-manager-initer.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "8726de39-9138-4457-8098-f4b669c27882", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/core/auto-config-intl-manager.ts: -------------------------------------------------------------------------------- 1 | import l10n from './l10n-manager'; 2 | import { game, cclegacy } from 'cc'; 3 | // @ts-expect-error 4 | import { EDITOR } from 'cc/env'; 5 | if (cclegacy.GAME_VIEW || EDITOR) { // for Editor 6 | // @ts-expect-error we need top level await in Editor 7 | await l10n.createIntl({}); 8 | 9 | } else { // for Runtime or Preview 10 | game.onPostProjectInitDelegate.add( 11 | () => l10n.createIntl({}), 12 | ); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/core/auto-config-intl-manager.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "2f21bc78-8001-4d8f-a75c-b7da831c91c7", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/core/icu-options.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "dc153188-b6f7-4234-8025-20163cbd0f8c", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/core/icu-type.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Intl formatting 3 | */ 4 | enum ICUType { 5 | DateTime, 6 | Number, 7 | List, 8 | RelativeTime, 9 | } 10 | 11 | export default ICUType; 12 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/core/icu-type.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "e5dc4963-9221-45a4-8f4b-a8af210423e5", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/core/l10n-listen-event.ts: -------------------------------------------------------------------------------- 1 | enum L10nListenEvent { 2 | languageChanged = 'languageChanged', 3 | onMissingKey = 'missingKey', 4 | 5 | /** 6 | * store events 7 | */ 8 | // onAdded = 'added', 9 | // onRemoved = 'removed', 10 | } 11 | 12 | export default L10nListenEvent; 13 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/core/l10n-listen-event.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "3415306a-cc9f-4b47-8961-2437afa40e1f", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/core/l10n-manager.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "2856aec6-495f-456d-be77-9ce8a6277dc9", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/core/l10n-options.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "b461821b-b11b-4b2d-b469-d9d42b137108", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/core/localization-global.ts: -------------------------------------------------------------------------------- 1 | export const pluginName = 'Localization Editor'; 2 | export const mainName = 'localization-editor'; 3 | export const runtimeBundleName = 'l10n'; 4 | export const resourceListPath = 'resource-list'; 5 | export const resourceBundlePath = 'resource-bundle'; 6 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/core/localization-global.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "02d9eb4a-80d0-46a8-b3e9-bd4ed15f6f68", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/core/resource-data-manager.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "0a95ad24-8abb-499c-99cc-9d959245a167", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/l10n.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "5edb8c82-d058-4174-84ae-a6624ae65a90", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "isBundle": true, 10 | "bundleConfigID": "default" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/l10n.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 { 5 | L10nKey, 6 | L10nValue, 7 | ResourceList, 8 | ResourceBundle, 9 | ResourceData, 10 | ResourceItem, 11 | FallbackLanguageObjectList, 12 | FallbackLanguage, 13 | L10nOptions, 14 | } from './core/l10n-options'; 15 | 16 | export { 17 | l10n, 18 | L10nManager, 19 | L10nLabel, 20 | L10nListenEvent, 21 | }; 22 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/l10n.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "07b549ce-14f5-4964-9fc4-366b956df8d8", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/l10n/resource-bundle.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/l10n/resource-bundle.json.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "2.0.0", 3 | "importer": "json", 4 | "imported": true, 5 | "uuid": "fa0fa81e-eaf8-4eb4-8a48-181676ceff01", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/l10n/resource-list.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/l10n/resource-list.json.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "2.0.0", 3 | "importer": "json", 4 | "imported": true, 5 | "uuid": "d2f18e87-d231-4e20-9e54-06a7aa2bd5c1", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/polyfills.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "43fd725b-630f-4c60-a864-7cea14073726", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/polyfills/Intl.DateTimeFormat.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "e9a803d0-7f83-426e-b187-6d1caa791dc6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/polyfills/Intl.DisplayNames.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "495ecfe5-9e27-4b3e-a048-df0d67da1f21", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/polyfills/Intl.ListFormat.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "9ff49c15-8e75-44e3-955c-3d31f42d783d", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/polyfills/Intl.Locale.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "3d4a4001-ed8e-4131-b245-b6b580406771", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/polyfills/Intl.NumberFormat.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "60bb8e28-ea3e-45ee-8314-911ce01dc8b0", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/polyfills/Intl.PluralRules.ts: -------------------------------------------------------------------------------- 1 | import 'intl-pluralrules'; 2 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/polyfills/Intl.PluralRules.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "c959445d-20e1-483c-8aa7-08ca07d74dd4", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/polyfills/Intl.RelativeTimeFormat.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "1d313b84-d501-43d7-8173-4315142c25d3", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/assets/polyfills/Intl.getCanonicalLocales.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "306c90e6-641a-46df-8383-07e477f49b91", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/static/icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/localization-editor/static/icon-2x.png -------------------------------------------------------------------------------- /extensions/localization-editor/static/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/localization-editor/static/icon.png -------------------------------------------------------------------------------- /extensions/localization-editor/static/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "CommonJS", 4 | "target": "ES2017", 5 | "lib": [ 6 | "DOM", 7 | "ES5", 8 | "ES6", 9 | "ES7", 10 | "ES2015", 11 | "ES2016", 12 | "ES2017", 13 | "ES2018", 14 | "ES2019", 15 | "ES2020", 16 | "ES2021", 17 | "ESNext" 18 | ], 19 | "rootDir": "./assets", 20 | "declaration": true, 21 | "declarationDir": "../@types/runtime", 22 | "emitDeclarationOnly": true, 23 | "experimentalDecorators": true, 24 | "skipLibCheck": true, 25 | "typeRoots": ["../@types"], 26 | "types": [ 27 | "intl", 28 | "@cocos/creator-types/editor", 29 | "@cocos/creator-types/engine" 30 | ], 31 | }, 32 | "exclude": [ 33 | "../@types/**/*" 34 | ], 35 | } 36 | -------------------------------------------------------------------------------- /extensions/localization-editor/tests/gettext-extractor.test.ts: -------------------------------------------------------------------------------- 1 | import { GettextExtractor, JsExtractors } from 'gettext-extractor'; 2 | import { join } from 'path'; 3 | 4 | // describe('', () => { 5 | // test('', () => { 6 | // const extractor = new GettextExtractor(); 7 | // extractor 8 | // .createJsParser([ 9 | // JsExtractors.callExpression('i18n.t', { 10 | // arguments: { 11 | // text: 0, 12 | // }, 13 | // }), 14 | // ]) 15 | // .parseFile(join(__dirname, './intl/i18next.test.ts')); 16 | // extractor.printStats() 17 | // }); 18 | // }); 19 | 20 | const extractor = new GettextExtractor(); 21 | extractor 22 | .createJsParser([ 23 | JsExtractors.callExpression('i18n.t', { 24 | arguments: { 25 | text: 0, 26 | }, 27 | }), 28 | ]) 29 | .parseFile('./intl/i18next.test.ts'); 30 | console.log(extractor.getMessages()); 31 | -------------------------------------------------------------------------------- /extensions/localization-editor/tests/glob.test.ts: -------------------------------------------------------------------------------- 1 | import glob from 'glob'; 2 | import * as path from 'path'; 3 | 4 | describe('测试glob', () => { 5 | test('src', async (): Promise => { 6 | const files = glob.sync('src/**/*.{ts,js,vue,less,css,json}'); 7 | for (const file of files) { 8 | console.log(path.basename(file, path.extname(file))); 9 | console.log(file.replace(/^src/, 'webpack-dist')); 10 | } 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /extensions/localization-editor/tests/repository/GoogleRepositort.test.ts: -------------------------------------------------------------------------------- 1 | import { container } from 'tsyringe'; 2 | import GoogleRepository from '../../src/lib/core/repository/translate/GoogleRepository'; 3 | import YouDaoRepository from '../../src/lib/core/repository/translate/YouDaoRepository'; 4 | 5 | describe('Google Translate Test', () => { 6 | test('translate', async () => { 7 | const repo = container.resolve(YouDaoRepository); 8 | const result = await repo.translate({ 9 | appKey: '2aab55e212acb39f', 10 | appSecret: 'GbgSmGopbnGHoGJqRgOwRGGnTvAv0WLm', 11 | url: 'https://openapi.youdao.com/api', 12 | // appKey: 'google-translate1.p.rapidapi.com', 13 | // appSecret: '0055a908a8mshceae4722859c0e9p16c8a5jsn6db2e7bd4a08', 14 | // url: 'https://google-translate1.p.rapidapi.com/language/translate/v2', 15 | from: 'zh-CN', 16 | to: 'en', 17 | query: ['你好', '世界'], 18 | }); 19 | console.log(result); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /extensions/localization-editor/tests/service/LocalizeTool.test.ts: -------------------------------------------------------------------------------- 1 | import { container } from 'tsyringe'; 2 | import UUIDService from '../../src/lib/core/service/util/UUIDService'; 3 | 4 | describe('测试本地化工具', () => { 5 | test('测试获取所有国际语言', () => { 6 | const uuidService = container.resolve(UUIDService); 7 | const uuid = uuidService.v4(); 8 | console.log(uuid); 9 | console.log(uuidService.compress(uuid)); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /extensions/localization-editor/tests/yaml/js-yaml.test.ts: -------------------------------------------------------------------------------- 1 | import { load } from 'js-yaml'; 2 | import { readFileSync } from 'fs-extra'; 3 | 4 | describe('js-yaml', () => { 5 | test('parse', () => { 6 | const doc = load(readFileSync('index.yaml', 'utf-8')); 7 | console.log(doc); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/tests/yaml/yaml.test.ts: -------------------------------------------------------------------------------- 1 | import { parse } from 'yaml'; 2 | import { readFileSync } from 'fs-extra'; 3 | 4 | describe('yaml', () => { 5 | test('parse', () => { 6 | const doc = parse(readFileSync('index.yaml', 'utf8')); 7 | console.log(doc); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /extensions/localization-editor/tsconfig.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "types": [ 5 | "@types" 6 | ] 7 | }, 8 | "include": [ 9 | "src" 10 | ], 11 | "exclude": [ 12 | "*.config.ts", 13 | "resources", 14 | // "src/assets" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /extensions/shader-graph/.editor.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * 打包的时候删除源码 5 | * 如果不填,会默认过滤一些可能需要删除的代码 6 | * @returns {string[]} 7 | */ 8 | exports.clearSource = function() { 9 | return []; 10 | }; 11 | 12 | /** 13 | * 加密源码 14 | * 返回一个字符串数组,glob 搜索语法 15 | * 如果不填或者返回空数组,会加密所有扫描到的 js 文件(ts 编译后的 js) 16 | * @returns {string[]} 17 | */ 18 | exports.xxtea = function() { 19 | return []; 20 | }; 21 | 22 | /** 23 | * 打包的时候不需要打到 asar 的文件夹 24 | * 如果不填,则所有的代码都会进入 asar 25 | * @returns {string[]} 26 | */ 27 | exports.unpacked = function() { 28 | return []; 29 | }; 30 | 31 | /** 32 | * 打包的时候的预处理方法 33 | * 可以在 generate 里做一些需要在打包的时候处理的特殊逻辑 34 | */ 35 | exports.generate = async function() { 36 | 37 | }; 38 | -------------------------------------------------------------------------------- /extensions/shader-graph/.gitignore: -------------------------------------------------------------------------------- 1 | # git@github.com:moshuying/cocos-msy-dev-test.git 2 | 3 | #/////////////////////////// 4 | # Cocos Creator Extension 5 | #/////////////////////////// 6 | dist 7 | src/config/secrets.json 8 | -------------------------------------------------------------------------------- /extensions/shader-graph/.workflow.build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * 需要编译的 ts 文件夹 5 | * @returns {string[]} 6 | */ 7 | exports.tsc = function() { 8 | return [ 9 | './', 10 | ]; 11 | }; 12 | 13 | /** 14 | * 需要编译的 less 文件夹 15 | * @returns {{source: string, dist: string}[]} 16 | */ 17 | exports.lessc = function() { 18 | return [ 19 | { 20 | source: './static/shader-graph/style.less', 21 | dist: './static/shader-graph/style.css', 22 | }, 23 | ]; 24 | }; 25 | 26 | /** 27 | * 需要复制的静态文件夹 28 | * @returns {string[]} 29 | */ 30 | exports.file = function() { 31 | return []; 32 | }; 33 | 34 | /** 35 | * 需要执行的 npm 命令 36 | * 所有命令串行执行 37 | * @returns {{message: string, params: string[], path: string, detail: string}[]} 38 | */ 39 | exports.npm = function() { 40 | return []; 41 | }; 42 | -------------------------------------------------------------------------------- /extensions/shader-graph/.workflow.clear.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 清理项目的时候删除的文件 3 | * @returns {string[]} 4 | */ 5 | exports.clear = function() { 6 | return [ 7 | './dist', 8 | ]; 9 | }; 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/@types/vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'vue/dist/vue.js' { 2 | import Vue from 'vue'; 3 | export * from 'vue'; 4 | export default Vue; 5 | } 6 | -------------------------------------------------------------------------------- /extensions/shader-graph/lib/pack.ts: -------------------------------------------------------------------------------- 1 | import AdmZip from 'adm-zip'; 2 | import { basename, join } from 'path'; 3 | 4 | // creating archives 5 | const zip = new AdmZip(); 6 | 7 | // add folders 8 | [ 9 | join(__dirname, '../node_modules'), 10 | join(__dirname, '../dist'), 11 | join(__dirname, '../i18n'), 12 | join(__dirname, '../static'), 13 | join(__dirname, '../shader-node'), 14 | join(__dirname, '../readme'), 15 | ].forEach((folder) => { 16 | zip.addLocalFolder(folder, basename(folder)); 17 | }); 18 | 19 | // add files 20 | [ 21 | join(__dirname, '../package.json'), 22 | join(__dirname, '../README.zh-CN.md'), 23 | join(__dirname, '../README.md'), 24 | 25 | ].forEach((file) => { 26 | zip.addLocalFile(file); 27 | }); 28 | 29 | zip.writeZip(process.argv[2] ? join(process.argv[2], 'shader-graph.zip') : join(__dirname, '../shader-graph.zip')); 30 | -------------------------------------------------------------------------------- /extensions/shader-graph/readme/使用属性节点.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/使用属性节点.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/使用普通节点.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/使用普通节点.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/创建后的资源.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/创建后的资源.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/创建属性窗口.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/创建属性窗口.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/创建节点菜单.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/创建节点菜单.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/初始面板.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/初始面板.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/右键创建资源.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/右键创建资源.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/导入扩展文件.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/导入扩展文件.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/导入扩展文件夹.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/导入扩展文件夹.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/属性检查器选择effect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/属性检查器选择effect.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/属性类型节点.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/属性类型节点.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/效果图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/效果图.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/整体结构-EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/整体结构-EN.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/整体结构.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/整体结构.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/普通类型节点.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/普通类型节点.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/自定义节点.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/自定义节点.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/自定义节点菜单.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/自定义节点菜单.png -------------------------------------------------------------------------------- /extensions/shader-graph/readme/预览窗口.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/readme/预览窗口.png -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/graph.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "821bb093-72ff-445b-be14-5567cc18294b", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/graph/index.ts: -------------------------------------------------------------------------------- 1 | export * from './register'; 2 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/graph/index.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "ca80820d-3bb1-4b1a-b242-34a454f928e7", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/graph/register.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "663ba445-e906-458b-ace1-73c42deba345", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "53001bff-e1cf-41fb-8ed5-4e29cd9e05a6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/base.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "d07516ab-6735-4c76-bbe7-42be2b00c242", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/context.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNode } from './base'; 2 | import { ShaderProperty } from './property'; 3 | 4 | export class ShaderContext { 5 | shaderTemplatesDir: ''; 6 | allNodes: ShaderNode[] = []; 7 | properties: ShaderProperty[] = []; 8 | 9 | localVars: any[] = []; 10 | getLocalVars: any[] = []; 11 | 12 | reset() { 13 | this.allNodes.length = 0; 14 | this.properties.length = 0; 15 | 16 | this.localVars.length = 0; 17 | this.getLocalVars.length = 0; 18 | } 19 | } 20 | 21 | export const shaderContext = new ShaderContext(); 22 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/context.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "130e02eb-46f3-4eab-b18e-15fe7fe48195", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "81cb0745-02de-4f7f-95d1-4bed08b32051", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/input.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "f5125ddf-a5de-4ee3-a3b7-e558d914689a", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/input/basic.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "369858dc-a91f-488b-8ece-c45680b354b6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/input/basic/boolean.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "21fbeb3d-6cc2-4dea-805b-dd3455319677", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/input/basic/float.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "68e4b515-5124-472a-8e41-ddb98c6ec315", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/input/basic/slider.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "263a8562-9525-42a7-8132-a3c62d2c99d7", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/input/basic/vector2.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "7f0589e6-a7e6-4843-a14f-2322c9df0a4a", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/input/basic/vector3.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "994865a9-980a-483e-850b-6465caf5d092", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/input/basic/vector4.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "4e4e9560-8527-4c02-8871-4b80090c5d26", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "07f4c502-d376-4702-ac51-7ce71a189f8f", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "b3ac6e02-3e8c-4f1a-98f6-33a0505f9687", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/absolute.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Advanced/Absolute', 10 | title: 'Absolute', 11 | }) 12 | export default class Absolute extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = abs(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/absolute.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "bf087fce-808f-4721-a20a-3fe656a7fb54", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/exponential.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Advanced/Exponential', 10 | title: 'Exponential', 11 | }) 12 | export default class Exponential extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = exp(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/exponential.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "5c491dca-4c22-468e-a6dc-4f1702fd4990", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/length.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Advanced/Length', 10 | title: 'Length', 11 | }) 12 | export default class Length extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = length(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/length.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "d1665f0e-0eee-4d3c-a514-ef8694e5b039", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/log.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Advanced/Log', 10 | title: 'Log', 11 | }) 12 | export default class Log extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = log(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/log.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "40ca6c8e-8da2-44f0-9faa-45dbbadbf25d", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/modulo.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "208071b5-6e2a-4646-b885-386c862716d6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/negate.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Advanced/Negate', 10 | title: 'Negate', 11 | }) 12 | export default class Negate extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = -${input0}; 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/negate.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "1b741c8f-1109-4454-bf75-d71498d2a1a2", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/normalize.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "007751f2-0424-4a62-a8ed-81314c12d228", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/posterize.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "83ac43a3-fc83-4763-bb42-09fc2e69ae9d", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/reciprocal-square.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "eae1ead7-8abc-445e-ae3a-b25d05a71574", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/reciprocal.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Advanced/Reciprocal', 10 | title: 'Reciprocal', 11 | }) 12 | export default class Reciprocal extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = 1. / ${input0}; 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/advanced/reciprocal.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "5e330af6-c060-407e-8b8b-2f48e9b2aba5", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/basic.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "0acf5b0d-9a32-4758-98bf-c18cc51fad38", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/basic/add.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "377629de-bfb0-4b80-8461-f54eeb25790f", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/basic/divide.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "02792e9d-ebc3-41ee-bc76-6114db874c2e", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/basic/multiply.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "eb609477-de09-437e-92f6-2b2b661d441e", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/basic/power.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "94eaa0b8-a267-4771-a4c7-ac35fad3eb6a", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/basic/square.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Basic/Square', 10 | title: 'Square', 11 | }) 12 | export default class Square extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('A', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = sqrt(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/basic/square.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "861ee8c0-c44f-4a93-9307-9336ce757948", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/basic/substract.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "5fbb90cd-1632-4e0d-9147-75b0def9cb2f", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/derivative.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "b218c091-a9db-4031-a11a-07b7d92154b1", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/derivative/ddx.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Derivative/DDX', 10 | title: 'DDX', 11 | }) 12 | export default class DDX extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = dFdx(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/derivative/ddx.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "a9e8cbbf-f00c-4982-a2fa-327e8663bb20", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/derivative/ddxy.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "ec1af9fb-f70a-448b-94fb-39814df8e228", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/derivative/ddy.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Derivative/DDY', 10 | title: 'DDY', 11 | }) 12 | export default class DDY extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = dFdy(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/derivative/ddy.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "8231c7ad-b08e-4900-a97f-938e78ff8f63", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/interpolation.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "2a30962a-d33d-4344-a979-b1b9c622a245", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/interpolation/inverse-lerp.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "c589f46c-8f09-4e6f-9173-c741bae3297f", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/interpolation/lerp.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "0583a685-71f1-437e-bdd2-ba0acb2d7e2d", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/interpolation/smoothstep.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "d4d9c32e-3690-4728-8095-2555d3c9744e", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/range.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "8949b5a7-071c-4c5d-bbfd-f680961b51da", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/range/clamp.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "4637ab9d-8ec1-4f10-a681-26f9d4b0ee6d", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/range/fraction.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Range/Fraction', 10 | title: 'Fraction', 11 | }) 12 | export default class Fraction extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = fract(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/range/fraction.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "1be9ae52-5b7f-4faf-b629-baaeb3b82f43", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/range/max.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "6e8a0bc9-3096-472d-a4e4-3b7cc80717e5", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/range/min.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "65629c20-5fb6-4596-8b1a-ad77cf32e7f0", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/range/one-minus.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Range/OneMinus', 10 | title: 'OneMinus', 11 | }) 12 | export default class OneMinus extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = 1. - ${input0}; 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/range/one-minus.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "cd61f55d-ed42-4107-a9e0-5cefb7d27552", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/range/random-range.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "33710454-4d3d-495d-90f3-ab2860451c52", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/range/remap.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "c8987537-cd49-425d-99fc-396fa64f3f23", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/range/saturate.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Range/Saturate', 10 | title: 'Saturate', 11 | }) 12 | export default class Saturate extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = saturate(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/range/saturate.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "28c0b6b0-f43d-43c2-b0de-cdf9f0b8628d", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/round.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "57b4e659-8d45-4b82-b772-0722e9eb0158", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/round/ceil.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Round/Ceil', 10 | title: 'Ceil', 11 | }) 12 | export default class Ceil extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = ceil(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/round/ceil.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "9c519823-a62b-45e9-86c4-6904cb384bde", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/round/floor.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Round/Floor', 10 | title: 'Floor', 11 | }) 12 | export default class Floor extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = floor(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/round/floor.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "ee049883-fd94-4c02-a620-717b303e5d17", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/round/round.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Round/Round', 10 | title: 'Round', 11 | }) 12 | export default class Round extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = floor(${input0} + 0.5); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/round/round.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "62b43fb3-25d4-42a9-a084-c8a49814ab45", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/round/sign.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Round/Sign', 10 | title: 'Sign', 11 | }) 12 | export default class Sign extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = sign(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/round/sign.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "48af62b1-8e02-43ac-b1be-875e7becca02", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/round/step.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "2b4cbf65-0510-4caa-b413-3ea7357be5cd", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/round/truncate.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Round/Truncate', 10 | title: 'Truncate', 11 | }) 12 | export default class Truncate extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = trunc(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/round/truncate.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "96ddf63e-3704-4d29-af85-d3f9c7257230", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "f8e1ea91-8bf0-4deb-9b93-805f20294004", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/arccosine.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "d296ea3c-7a38-40cf-8489-f807e1dc27a8", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/arcsine.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Trigonometry/Arcsine', 10 | title: 'Arcsine', 11 | }) 12 | export default class Arcsine extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = asin(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/arcsine.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "63135766-8b34-49e0-97fc-06954a17e5a6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/arctangent.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "29869f7d-3799-4e1b-8df7-332605de5058", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/arctangent2.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "2a9c8ae7-e3e5-4759-ae01-5e9b1405fd51", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/cosine.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Trigonometry/Cosine', 10 | title: 'Cosine', 11 | }) 12 | export default class Cosine extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = cos(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/cosine.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "2e9b7994-8a4e-428f-bfc7-b701b91a33a0", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/degrees-to-radians.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "54ccc2e7-c9a9-4dfa-b194-f5155d7f439b", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/hyperbolic-cosine.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "d1158cd4-c65e-4aec-a4af-94bd85efec12", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/hyperbolic-sine.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "d0e30c9c-1317-4097-8a0b-23beb925f4d2", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/hyperbolic.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "b180bb2b-53a7-4238-a771-e6c953879a7d", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/radians-to-degrees.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "12229d2c-2f96-41a2-90b2-00fd9ba60f13", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/sine.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Trigonometry/Sine', 10 | title: 'Sine', 11 | }) 12 | export default class Sine extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = sin(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/sine.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "203eade2-3249-4050-af45-cc979abd6245", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/tangent.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../../graph/register'; 4 | import { ShaderNode } from '../../../base'; 5 | import { ConcretePrecisionType } from '../../../type'; 6 | import { slot } from '../../../utils'; 7 | 8 | @register({ 9 | menu: 'Math/Trigonometry/Tangent', 10 | title: 'Tangent', 11 | }) 12 | export default class Tangent extends ShaderNode { 13 | 14 | data = { 15 | inputs: [ 16 | slot('In', Vec4.ZERO, 'vec4', 'vector'), 17 | ], 18 | outputs: [ 19 | slot('Out', Vec4.ZERO, 'vec4', 'vector'), 20 | ], 21 | }; 22 | 23 | calcConcretePrecision() { 24 | super.calcConcretePrecision(); 25 | } 26 | 27 | generateCode() { 28 | 29 | const input0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | return ` 33 | ${output0} = tan(${input0}); 34 | `; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/trigonometry/tangent.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "adcb4b6b-7ffd-42eb-adbb-cb3ed87935e7", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/vector.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "ed404d59-a2fa-47f2-a2a4-08f8042ad5c7", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/vector/cross-product.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "13009a40-e2f9-4a23-98d2-ba157db80255", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/vector/distance.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "1d67f823-16de-4f60-8228-48813bb8fd37", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/vector/dot-product.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "fe81faec-eb9b-4baa-aa76-40f7c5d6d089", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/vector/fresnel.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "861c8258-c5a9-4a07-aea9-b5b9c3e9674c", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/vector/projection.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "76ce87de-4880-4c2f-bc7a-531299fe20c9", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/vector/reflection.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "83264b3c-1f60-4a95-bf35-3c8b3a7db2e6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/vector/rejection.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "3617675c-4218-489b-bb60-f298a11a19b4", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/vector/sphere-mask.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "2fd4c014-d224-4815-b0f8-a7c99e5878f1", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/wave.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "f4cc74c5-a0f1-4b20-9fd8-46f99626e9d2", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/wave/noise-sine-wave.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "fdd3a7c6-8eca-4a21-beed-d38143a58565", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/wave/sawtooth-wave.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "00c7bc00-69ff-4765-8a60-7fd5b385b65a", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/wave/square-wave.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "d9905844-bdf5-4887-a230-a3efffad97d5", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/math/wave/triangle-wave.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "92a3e64f-1a16-466e-9c60-5813442801ac", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/procedural.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "d5c15a8e-de77-477c-af71-5c7636cb23e9", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/procedural/noise.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "0a45c81e-d549-4c8b-9fe4-f5e766e3f83c", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/procedural/noise/gradient-noise.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "5ccd4955-9f62-4bb0-a37e-d4358da48173", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/procedural/noise/simple-noise.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "35746bee-b451-44fd-8d35-092f0044c1ea", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/procedural/shape.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "d16b7f04-4727-49b5-9740-51c535f82d07", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/procedural/shape/ellipse.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "71cb8a34-bfbc-44bc-90c4-681d4f08784c", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/procedural/shape/rectangle.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "c5bfec72-1f7f-45c3-8ce8-0be6b68aa544", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/procedural/shape/round-rectangle.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "ce89be7b-2c0e-424e-9108-6b7095ee29a2", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/uv.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "12090d26-979b-42a3-92d1-f3da021aaa16", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/uv/polar-coordinates.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "db4275ec-d2ae-4231-b440-4acf2ab87a98", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/uv/rotate-coordinates.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "d691278b-7075-418e-bab8-53f6f5aa9a64", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/generated/uv/tilling-and-offset.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "5f40ef91-59af-4e41-826c-fe4020774793", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/index.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "00450c9d-2c84-414b-a6f3-4c234d4639a6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "d84c0713-acbc-4ba3-8303-f44c1f6169b2", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/artistic.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "3d4755f8-2ca1-4826-b050-f97df95c41a3", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/channel.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "7f28f4c8-26b6-4de9-8d14-469a0a0092da", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/channel/combine.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "c9cd7714-c732-467e-aac1-c72a3a8bd1a6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/channel/split.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "3da06cb8-854d-4ec3-87c7-32e69587d3b1", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/index.ts: -------------------------------------------------------------------------------- 1 | // import { ShaderNode } from '../base'; 2 | // import globby from 'globby'; 3 | // import path from 'fire-path'; 4 | 5 | // let nodePaths = globby.sync([ 6 | // path.join(__dirname, './**').replace(/\\/g, '/'), 7 | // path.join(__dirname, '!./index.*').replace(/\\/g, '/'), 8 | // ]) 9 | // let nodes = {}; 10 | // for (let i = 0; i < nodePaths.length; i++) { 11 | // let nodePath = nodePaths[i]; 12 | // let nodeName = path.basenameNoExt(nodePath); 13 | // nodes[nodeName] = require(nodePath).default; 14 | // } 15 | 16 | // export function createNode (data: any) { 17 | // let type = data.typeInfo; 18 | // let name = type.fullName; 19 | // name = name.replace('UnityEditor.ShaderGraph.', ''); 20 | 21 | // let ctor = nodes[name]; 22 | // if (!ctor) { 23 | // console.warn(`Can not find Node with Name [${name}]`) 24 | // ctor = ShaderNode 25 | // } 26 | // return ctor && new ctor(data); 27 | // } 28 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/index.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "ce045985-d7fc-4550-aa8a-73b6144e0a39", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "9b4e7d66-8af4-4cd6-b21e-9e6b29bd4834", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/InputNode.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "89e26a63-4e80-4c5c-bd93-94024a1c81b7", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/basic.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "b01ae50d-31ff-40d3-8dfe-405a944fa882", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/basic/color.ts: -------------------------------------------------------------------------------- 1 | import { Color, Vec4 } from 'cc'; 2 | import InputNode from '../input-node'; 3 | import { prop, slot } from '../../../utils'; 4 | import { register } from '../../../../graph'; 5 | 6 | @register({ 7 | menu: 'Input/Basic/Color', 8 | title: 'Color', 9 | }) 10 | export default class ColorNode extends InputNode { 11 | fixedConcretePrecision = 4; 12 | 13 | data = { 14 | props: [ 15 | prop('Color', new Vec4, 'color'), 16 | ], 17 | outputs: [ 18 | slot('Out', new Vec4, 'vec4', 'vector'), 19 | ], 20 | }; 21 | 22 | generateCode() { 23 | const prop = this.getPropWithName('Color'); 24 | const c = prop.value as Color; 25 | return `vec4 ${this.getOutputVarName(0)} = vec4(${c.x}, ${c.y}, ${c.z}, ${c.w});`; 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/basic/color.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "e3d3490d-0e60-490b-b3f9-95d300e7281a", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/basic/time.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "d78e78a8-c222-475d-b568-d89fa38525e8", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/geometry.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "c9afd016-01cf-497d-96e5-9b04607e80ba", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/geometry/normal-vector.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "f4d52b63-1826-4ad4-9b0a-b19e10503342", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/geometry/position.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "c4117179-6029-4858-a425-f8696d08da90", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/geometry/uv.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "95b7b48d-922d-416b-93e4-e004175dc1b9", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/geometry/vertex-color.ts: -------------------------------------------------------------------------------- 1 | import { Vec4 } from 'cc'; 2 | import { ShaderNode } from '../../../base'; 3 | import { ConcretePrecisionType } from '../../../type'; 4 | import { prop, slot } from '../../../utils'; 5 | import { register } from '../../../../graph'; 6 | 7 | @register({ 8 | menu: 'Input/Geometry/VertexColor', 9 | title: 'VertexColor', 10 | }) 11 | export default class VertexColorNode extends ShaderNode { 12 | concretePrecisionType = ConcretePrecisionType.Fixed; 13 | fixedConcretePrecision = 4; 14 | 15 | data = { 16 | outputs: [ 17 | slot('Out', new Vec4, 'vec4', 'vector'), 18 | ], 19 | }; 20 | 21 | generateCode() { 22 | return `${this.getOutputVarDefine(0)} = FSInput_vertexColor;`; 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/geometry/vertex-color.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "57f73c67-41c9-4d26-81ff-2d90db0a8f0d", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/geometry/view-direction.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "fbe7300f-e8dc-414e-a3ab-2f4ee7836cc3", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/input-node.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNode } from '../../base'; 2 | import { ConcretePrecisionType } from '../../type'; 3 | 4 | export default class InputNode extends ShaderNode { 5 | concretePrecisionType = ConcretePrecisionType.Fixed; 6 | } 7 | 8 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/input-node.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "fcee978c-06f2-41b7-9483-2db584a5b6ce", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/property-node.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "9319472c-3043-49fa-8582-3f1142c7ef5c", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/texture.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "a4a78e41-b567-4e7d-855f-ba68ce22dfa8", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/texture/cubemap-asset.ts: -------------------------------------------------------------------------------- 1 | import TextureAsset from './texture-asset'; 2 | 3 | export default class CubemapAsset extends TextureAsset { 4 | generateCode() { 5 | return `samplerCube ${this.getOutputVarName(0)} = ${this.getInputValue(0)};`; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/texture/cubemap-asset.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "f593bebc-7a34-476e-8613-70f0cbedd65e", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/texture/sample-cubemap.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "6f28aec4-0ff8-4694-b483-83545dfe739f", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/texture/sample-texture2d.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "5895a329-8c92-440f-96d8-18d9b426652a", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/texture/texture-asset.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNode } from '../../../base'; 2 | import { ConcretePrecisionType } from '../../../type'; 3 | 4 | export default class TextureAsset extends ShaderNode { 5 | concretePrecisionType = ConcretePrecisionType.Texture; 6 | } 7 | 8 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/texture/texture-asset.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "ae6c5758-47f7-4cde-a30d-ae194163d1ec", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/texture/texture2d-asset.ts: -------------------------------------------------------------------------------- 1 | import TextureAssetNode from './texture-asset'; 2 | 3 | export default class Texture2DAsset extends TextureAssetNode { 4 | generateCode() { 5 | return `sampler2D ${this.getOutputVarName(0)} = ${this.getInputValue(0)};`; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/texture/texture2d-asset.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "1e7d587f-7693-4a38-a3f2-70f7557e20d9", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/variable.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "e160a4e8-d9ba-4ea5-b78e-d9d7b2e5d287", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/variable/get-local-var.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "30fea624-74ab-4eb3-9768-4a131c803280", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/input/variable/register-local-var.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "b61a90ef-15cc-4448-adbf-7cd16da98d21", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/logic.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "768c726a-a499-4173-984a-9022d1afa9ff", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/logic/all.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "08b1e905-4683-4b43-9503-063e98b4138e", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/logic/and.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "ad796a9a-277e-4ad6-956d-02888b010c27", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/logic/any.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "c213e378-aa5d-45a3-9102-928ac63866a6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/logic/branch.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "2f31ffe5-2ba8-467c-89cc-55535d4bc4b2", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/logic/comparison.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "29cf0756-1c72-48a3-8755-25cbfcaba224", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/logic/is-nan.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "c8ed686c-193d-4738-a27d-42bf72f3e68c", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/logic/not.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Vec2, Vec3, Vec4 } from 'cc'; 3 | import { register } from '../../../graph/register'; 4 | import { ShaderNode } from '../../base'; 5 | import { ConcretePrecisionType } from '../../type'; 6 | import { prop, slot } from '../../utils'; 7 | 8 | @register({ 9 | menu: 'Logic/Not', 10 | title: 'Not', 11 | }) 12 | export default class Not extends ShaderNode { 13 | concretePrecisionType = ConcretePrecisionType.Max; 14 | 15 | data = { 16 | inputs: [ 17 | slot('In', false, 'boolean', 'boolean'), 18 | ], 19 | outputs: [ 20 | slot('Out', false, 'boolean', 'boolean'), 21 | ], 22 | }; 23 | 24 | calcConcretePrecision() { 25 | super.calcConcretePrecision(); 26 | } 27 | 28 | generateCode() { 29 | const i0 = this.getInputValue(0); 30 | 31 | const output0 = this.getOutputVarDefine(0); 32 | 33 | return ` 34 | ${output0} = (!${i0}); 35 | `; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/logic/not.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "aad298d5-0ef6-495f-b787-8150a4cee4b1", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/logic/or.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "a2b3f474-fe0f-440b-b85a-4fee8da9310b", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/master.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "40116e55-e3a9-49a9-ba20-1c6aacbe2ee5", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/master/MasterNode.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "1eab7a6d-080d-4a88-af82-ead98c54e37f", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/master/SurfaceMasterNode.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "3dc0b965-6e4c-40b0-acef-520bf372b81b", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/master/UnlitMasterNode.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "f3fa2908-eae9-4124-ac94-7db7d3093d8f", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/math.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "73d60c62-7f72-4970-8842-362d88f8761c", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/procedural.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "961356a6-060b-44e5-af55-e4cf258e2afa", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/subgraph.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "6b6b28a7-6d20-4478-9457-e4f20421c504", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/subgraph/SubGraphNode.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "159aba9f-8dc9-4262-9d20-aa3cca232ebd", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/subgraph/SubGraphOutputNode.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNode } from '../../base'; 2 | import { register } from '../../../graph'; 3 | import { slot } from '../../utils'; 4 | 5 | @register({ 6 | title: 'Output', 7 | master: true, 8 | style: { 9 | headerColor: '#81ff2f', 10 | }, 11 | }) 12 | export default class SubGraphOutputNode extends ShaderNode { 13 | data = { 14 | inputs: [ 15 | slot('Out', 0, 'any', 'any'), 16 | ], 17 | }; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/subgraph/SubGraphOutputNode.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "a7a1d5a5-f763-4523-b37a-0795941c170e", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/utility.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "c46cd314-c43d-4d44-8ead-9d0966430e67", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/utility/PreviewNode.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNode } from '../../base'; 2 | 3 | export default class PreviewNode extends ShaderNode { 4 | generateCode() { 5 | return `${this.getOutputVarDefine(0)} = ${this.getInputValue(0)};`; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/utility/PreviewNode.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "f8b0f765-8953-417a-b78b-44d84b8af4df", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/manual/uv.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "51eddf44-3965-4a7f-b48f-a4e84314fba9", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "b505bf78-444e-44a8-9656-4cb08b45cd9a", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/math.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "7ba923ae-1846-449d-95ec-49315f08fbd3", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/math/advanced.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "63d22451-008b-4e03-a950-b5f829113d1c", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/math/basic.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "6a4f6ef4-513e-4bdf-921f-d22f93141f39", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/math/derivative.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "c1dcd5aa-a99e-451d-b42c-f1dec0cd0709", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/math/interpolation.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "41960e02-4bf1-40ae-994b-e052e9e82ae6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/math/range.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "1dd0ff67-5e75-45f4-9f1e-1836de1a90f4", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/math/round.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "4b214877-6c6c-4281-a8f7-91020409b611", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/math/trigonometry.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "1a3df9f5-ac78-4d6c-bddc-55023b426b25", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/math/vector.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "588e2fb0-509a-44f8-b87a-fd11cee766b5", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/math/wave.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "2ab50b7f-a1c9-4f35-9bda-323f9da4b0c4", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/procedural.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "98e0b37b-f186-4092-af09-82ae447ad426", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/procedural/noise.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "4b803390-09a7-48b1-9333-46e084e134c0", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/procedural/shape.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "c488881f-9e1f-452b-b4b4-d5ff354a5c2f", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/subgraph.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "4513f5f7-65b4-450a-847b-3f91fc2b1718", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/utility.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "de7c8b6a-0f2b-4737-9739-7d0219ceebcf", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/nodes/uv.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "aa89aef2-19c7-47e7-b417-998a0ce7f744", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/property.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "b05a879a-ef88-434d-bef0-02b4f9d4ac67", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/shadergraph.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "c03d0c99-6c8e-423c-9c88-be99e26b974e", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/slot.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "37bc895c-264a-40b9-916b-ba4c1c020f87", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/type.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "298c3210-ad90-4fe8-bc7b-5c4f8ddfddf3", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/assets/operation/utils.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "7ceab5c1-cffb-4005-aec2-4d70c0331267", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/compile-shader/scripts/utils.js: -------------------------------------------------------------------------------- 1 | 2 | function makeFirstCharUppcase(str) { 3 | const f = str[0].toUpperCase(); 4 | str = f + str.substring(1, str.length); 5 | return str; 6 | } 7 | 8 | function getFileName(str) { 9 | let res = str.match(/[A-Z]+[a-z0-9]*/g); 10 | if (!res) return ''; 11 | res = res.map(f => f.toLowerCase()); 12 | return res.join('-'); 13 | } 14 | 15 | module.exports = { 16 | makeFirstCharUppcase, 17 | getFileName, 18 | }; -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/compile-shader/shader-templates/chunks/common.chunk: -------------------------------------------------------------------------------- 1 | 2 | 3 | CCProgram shader_graph_common %{ 4 | 5 | // #include 6 | #define frac(uv) fract(uv) 7 | #define lerp(min, max, t) mix(min, max, t) 8 | 9 | }% 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/compile-shader/shader-templates/chunks/input_basic.chunk: -------------------------------------------------------------------------------- 1 | 2 | CCProgram shader_graph_input_basic %{ 3 | // @folder input/basic 4 | 5 | /** 6 | * @inline 7 | * @presicion fixed 8 | */ 9 | float Boolean (float In) { 10 | return In; 11 | } 12 | 13 | /** 14 | * @inline 15 | * @presicion fixed 16 | */ 17 | float Float (float In) { 18 | return In; 19 | } 20 | 21 | /** 22 | * @inline 23 | * @presicion fixed 24 | */ 25 | vec2 Vector2 (float X, float Y) { 26 | return vec2(X, Y); 27 | } 28 | 29 | /** 30 | * @inline 31 | * @presicion fixed 32 | */ 33 | vec3 Vector3 (float X, float Y, float Z) { 34 | return vec3(X, Y, Z); 35 | } 36 | 37 | /** 38 | * @inline 39 | * @presicion fixed 40 | */ 41 | vec4 Vector4 (float X, float Y, float Z, float W) { 42 | return vec4(X, Y, Z, W); 43 | } 44 | 45 | /** 46 | * @inline 47 | * @type Slider 48 | * @presicion fixed 49 | */ 50 | float Slider (float In) { 51 | return In; 52 | } 53 | }% 54 | -------------------------------------------------------------------------------- /extensions/shader-graph/shader-node/compile-shader/shader-templates/chunks/range.chunk: -------------------------------------------------------------------------------- 1 | // @depChunk 2 | CCProgram shader_graph_range %{ 3 | // @folder math/range 4 | 5 | /* 6 | * @presicion fixed 7 | */ 8 | float RandomRange (vec2 seed, float minv, float maxv) { 9 | float randomno = fract(sin(dot(seed, vec2(12.9898, 78.233)))*43758.5453); 10 | return mix(minv, maxv, randomno); 11 | } 12 | 13 | }% 14 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/block-forge/index.ts: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import './internal'; 4 | import './forge'; 5 | 6 | export { 7 | HTMLGraphForgeElement, 8 | } from './forge'; 9 | 10 | export { 11 | declareGraph, 12 | hasDeclareGraph, 13 | getDeclareGraph, 14 | } from './graph'; 15 | 16 | export { 17 | declareBlock, 18 | hasDeclareBlock, 19 | getDeclareBlock, 20 | removeDeclareBlock, 21 | removeAllDeclareBlock, 22 | } from './block'; 23 | 24 | export { 25 | declarePin, 26 | } from './pin'; 27 | 28 | export { 29 | generateUUID, 30 | createGraph, 31 | createBlock, 32 | createPin, 33 | } from './utils'; 34 | 35 | export { 36 | Forge, 37 | Block, 38 | Pin, 39 | } from './module/forge'; 40 | 41 | export { 42 | declareEnum, 43 | clearDynamicEnum, 44 | declareDynamicEnumToType, 45 | removeDynamicEnumToType, 46 | addEnumObserver, 47 | removeEnumObserver, 48 | getEnumByType, 49 | getDynamicEnumByType, 50 | } from './enum'; 51 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/block-forge/interface/forge.ts: -------------------------------------------------------------------------------- 1 | import type { GraphData } from './graph'; 2 | 3 | /* 4 | * 序列化需要的数据 5 | */ 6 | 7 | // Forge 的序列化数据 8 | export interface ForgeData { 9 | graph: { 10 | [uuid: string]: GraphData; 11 | }; 12 | details: D; 13 | } 14 | 15 | /** 16 | * 注册时的定义 17 | */ 18 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/block-forge/interface/index.ts: -------------------------------------------------------------------------------- 1 | export * from './forge'; 2 | export * from './graph'; 3 | export * from './block'; 4 | export * from './pin'; 5 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/block-forge/interface/pin.ts: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * 序列化需要的数据 4 | */ 5 | 6 | // Pin 的序列化数据 7 | export interface PinData { 8 | dataType: string; 9 | value: V; 10 | details: D; 11 | } 12 | 13 | /** 14 | * 运行时数据 15 | */ 16 | 17 | /** 18 | * 注册时的定义 19 | */ 20 | 21 | // 在注册 Block 定义的时候描述的 Pin 数据 22 | export interface IPinDescription { 23 | // 参数名,必须唯一 24 | tag: string; 25 | // 数据类型 26 | dataType: string; 27 | // 显示在界面上的 title 28 | name?: string; 29 | // 鼠标移动到界面上弹出的提示 30 | tooltip?: string; 31 | // 数据的值 32 | value?: V; 33 | // 显示的图标 34 | icon?: string; 35 | // 隐藏输入输出的针脚 36 | hidePin?: boolean; 37 | details: D; 38 | } 39 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/block-forge/internal/index.ts: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import './pin-unknown'; 4 | import './pin-float'; 5 | import './pin-int'; 6 | import './pin-string'; 7 | import './pin-boolean'; 8 | import './pin-vec2'; 9 | import './pin-vec3'; 10 | import './pin-vec4'; 11 | import './pin-mat3'; 12 | import './pin-mat4'; 13 | import './pin-color'; 14 | import './pin-texture2D'; 15 | import './pin-textureCube'; 16 | import './pin-enum'; 17 | import './pin-dynamic-enum'; 18 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/block-forge/internal/pin-unknown.ts: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import { Pin, declarePin, PinAction } from '../pin'; 4 | 5 | /** 6 | * Unknown 7 | * 未知类型的引脚 8 | */ 9 | class UnknownPin extends Pin< 10 | { 11 | value: any; 12 | } 13 | > { 14 | static type = 'unknown'; 15 | 16 | color = ''; 17 | line = 'normal'; 18 | details = { 19 | value: null, 20 | }; 21 | 22 | contentSlot = /*html*/``; 23 | childrenSlot = []; 24 | } 25 | declarePin(UnknownPin); 26 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/contributions/internal.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface PreviewConfig { 3 | lightEnable: boolean; 4 | primitive: string; 5 | } 6 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/contributions/preview-scene.ts: -------------------------------------------------------------------------------- 1 | import { Material } from 'cc'; 2 | 3 | import previewManager from './preview'; 4 | import { shaderGraphPreview } from './preview/shader-graph-preview'; 5 | import { PreviewConfig } from './internal'; 6 | 7 | class PreviewScene { 8 | async init(config: PreviewConfig) { 9 | await previewManager.load(); 10 | shaderGraphPreview.resetCamera(); 11 | shaderGraphPreview.setPrimitive(config.primitive); 12 | shaderGraphPreview.setLightEnable(config.lightEnable); 13 | return true; 14 | } 15 | 16 | setMaterial(material: Material) { 17 | shaderGraphPreview.setMaterial(material); 18 | } 19 | } 20 | 21 | const previewScene = new PreviewScene(); 22 | export default previewScene; 23 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/contributions/preview/index.ts: -------------------------------------------------------------------------------- 1 | import { shaderGraphPreview } from './shader-graph-preview'; 2 | declare const cce: any; 3 | 4 | export class PreviewManager { 5 | loaded = false; 6 | async load() { 7 | if (!this.loaded) { 8 | // 要确保编辑器预览插件比这个先注册 9 | const ccePreview = cce.Preview; 10 | await ccePreview.initPreview('shader-graph-preview', 'query-shader-graph-preview-data', shaderGraphPreview); 11 | this.loaded = true; 12 | } 13 | } 14 | unload() {} 15 | } 16 | const previewManager = new PreviewManager(); 17 | export default previewManager; 18 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/contributions/preview/preview-base.ts: -------------------------------------------------------------------------------- 1 | import { PreviewBuffer } from './buffer'; 2 | 3 | class PreviewBase { 4 | protected previewBuffer!: PreviewBuffer; 5 | public async queryPreviewData(info: any) { 6 | return (await this.previewBuffer.getImageData( info.width, info.height)); 7 | } 8 | 9 | public queryPreviewDataQueue(info: any, event: any) { 10 | this.previewBuffer.getImageDataInQueue( info.width, info.height, event); 11 | } 12 | clearPreviewBuffer() { 13 | this.previewBuffer.clear(); 14 | } 15 | 16 | public init(registerName: string, queryName: string) { } 17 | } 18 | 19 | export { PreviewBase }; 20 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/effect-utils.ts: -------------------------------------------------------------------------------- 1 | import { gte } from 'semver'; 2 | 3 | export async function buildEffect(name: string, content: string) { 4 | if (gte(Editor.App.version, '3.8.3')) { 5 | return await Editor.Message.request('asset-db', 'execute-custom-operation', 'effect', 'build-effect', name, content); 6 | } else { 7 | return await Editor.Message.request('engine-extends', 'build-effect', name, content); 8 | } 9 | } 10 | 11 | export async function addChunk(name: string, content: string) { 12 | if (gte(Editor.App.version, '3.8.3')) { 13 | await Editor.Message.request('asset-db', 'execute-custom-operation', 'effect', 'add-chunk', name, content); 14 | } else { 15 | return await Editor.Message.request('engine-extends', 'add-chunk', name, content); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/hooks.ts: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import { gte } from 'semver'; 4 | 5 | /** 6 | * 插件 register 的时候,触发这个钩子 7 | * 钩子内可以动态更改 package.json 内定义的数据 8 | * 9 | * @param info 10 | */ 11 | exports.register = async function(info: { [key: string]: any}) { 12 | const version = Editor.App.version; 13 | // 3.8.3 使用新版本的添加菜单方式,移除旧的方式 14 | if (gte(version, '3.8.3')) { 15 | delete info.contributions.assets.menu; 16 | // 移除旧的导入器 17 | if (info.contributions['asset-db']) { 18 | delete info.contributions['asset-db'].importer; 19 | } 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/importer/index.ts: -------------------------------------------------------------------------------- 1 | import { ShaderGraph380 } from './shader-graph-3.8'; 2 | 3 | export const methods = { 4 | async registerShaderGraphImporter380() { 5 | const { ShaderGraph380 } = await import('./shader-graph-3.8'); 6 | return { 7 | extname: ['.shadergraph'], 8 | importer: ShaderGraph380, 9 | }; 10 | }, 11 | 12 | async registerShaderGraphImporter() { 13 | return (await import('./shader-graph-handler')).default; 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/panels/shader-graph/components/float-window/base/const.ts: -------------------------------------------------------------------------------- 1 | let minWidth = 0; 2 | let minHeight = 0; 3 | 4 | export function setMinSize(width: number, height: number) { 5 | minWidth = width; 6 | minHeight = height; 7 | } 8 | 9 | export function getMinSize() { 10 | return { 11 | width: minWidth, 12 | height: minHeight, 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/shader-graph/base/forge-mgr.ts: -------------------------------------------------------------------------------- 1 | import { BaseMgr } from './index'; 2 | import { Forge } from '../../block-forge'; 3 | 4 | /** 5 | * 用于把 shader-graph 数据转成具体的对象,方便操作跟获取,主要是二次封装 Forge 这个类 6 | */ 7 | export class ForgeMgr extends BaseMgr { 8 | 9 | static _instance: ForgeMgr | null = null; 10 | 11 | public static get Instance(): ForgeMgr { 12 | if (!this._instance) { 13 | this._instance = new ForgeMgr(); 14 | } 15 | return this._instance; 16 | } 17 | 18 | private _forge: Forge | null = null; 19 | private get forge(): Forge { 20 | this._forge = new Forge(this.graphForge.getRootGraph()!); 21 | return this._forge; 22 | } 23 | 24 | public getGraph() { 25 | return this.forge.getGraph(); 26 | } 27 | 28 | public getBlockMap() { 29 | return this.getGraph().getBlockMap(); 30 | } 31 | 32 | public getBlockByUuid(uuid: string) { 33 | return this.getBlockMap()[uuid]; 34 | } 35 | 36 | release() { 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/shader-graph/base/index.ts: -------------------------------------------------------------------------------- 1 | export { BaseMgr } from './base-mgr'; 2 | export { GraphEditorMgr } from './graph-editor-mgr'; 3 | export { GraphDataMgr } from './graph-data-mgr'; 4 | export { GraphPropertyMgr } from './graph-property-mgr'; 5 | export { ForgeMgr } from './forge-mgr'; 6 | export { MaskMgr } from './mask-mgr'; 7 | export { MessageMgr } from './message-mgr'; 8 | export { GraphAssetMgr } from './graph-asset-mgr'; 9 | export { GraphConfigMgr } from './graph-config-mgr'; 10 | export * from './internal'; 11 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/shader-graph/global-exports.ts: -------------------------------------------------------------------------------- 1 | import { join } from 'path'; 2 | // @ts-ignore 3 | import PACKAGE_JSON from '../../package.json'; 4 | 5 | const PROJECT_PATH = join(Editor.Project.path, 'assets'); 6 | 7 | const PACKAGE_NAME = PACKAGE_JSON.name; 8 | 9 | const PANEL_NAME = `${PACKAGE_NAME}.shader-graph`; 10 | 11 | const DEFAULT_NAME = 'New Shader Graph'; 12 | 13 | const DEFAULT_ASSET_NAME = `${DEFAULT_NAME}.shadergraph`; 14 | 15 | const SUB_GRAPH_NODE_TYPE = 'SubGraphNode'; 16 | 17 | export { 18 | PACKAGE_JSON, 19 | PROJECT_PATH, 20 | DEFAULT_NAME, 21 | DEFAULT_ASSET_NAME, 22 | SUB_GRAPH_NODE_TYPE, 23 | PANEL_NAME, 24 | PACKAGE_NAME, 25 | }; 26 | 27 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/shader-graph/index.ts: -------------------------------------------------------------------------------- 1 | export { Menu, MenuTemplateItem } from './menu'; 2 | export * from './declare'; 3 | export * from './base'; 4 | export * from './internal'; 5 | export * from './interface'; 6 | export * from './global-exports'; 7 | export * from './utils'; 8 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/shader-graph/interface.ts: -------------------------------------------------------------------------------- 1 | import type { PinData } from '../block-forge/interface'; 2 | import { generateUUID } from './utils'; 3 | 4 | /** 5 | * 用存储 Graph Property 数据 6 | */ 7 | export class PropertyData { 8 | id: string = generateUUID(); 9 | type = ''; 10 | name = ''; 11 | /** 12 | * 声明的类型,目前是 PropertyNode 13 | */ 14 | declareType = 'PropertyNode'; 15 | outputPins: PinData[] = []; 16 | } 17 | 18 | /** 19 | * 节点的一些附带信息 20 | */ 21 | export interface INodeDetails { 22 | propertyID?: string; 23 | title?: string; 24 | subGraph?: string; 25 | inputPins?: PinData[], 26 | outputPins?: PinData[], 27 | 28 | [key: string]: any; 29 | } 30 | -------------------------------------------------------------------------------- /extensions/shader-graph/src/shader-graph/internal.ts: -------------------------------------------------------------------------------- 1 | import type { BlockData, IBlockDescription } from '../block-forge/interface'; 2 | import type { NodeDefine, PropertyDefine } from '../../@types/shader-node-type'; 3 | 4 | /** 5 | * Block 模版数据 6 | */ 7 | export interface BlockTemplateData { 8 | // 是否主节点,该节点不可被删除,不可被复制,唯一一份 9 | isMaster?: boolean; 10 | description: IBlockDescription; 11 | data: BlockData; 12 | details?: { 13 | [key: string]: any 14 | }; 15 | } 16 | 17 | /** 18 | * 存储 Shader Node 与 Shader Property 19 | */ 20 | export interface IModuleOptions { 21 | shaderNodeMap: Map; 22 | shaderPropertyMap: Map; 23 | shaderNodeClassMap: Map;// class 24 | } 25 | -------------------------------------------------------------------------------- /extensions/shader-graph/static/asset-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/static/asset-icon.png -------------------------------------------------------------------------------- /extensions/shader-graph/static/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocos/cocos-creator-extensions/8538d8ef768cfaacc6d4a48daf642b353e9ae142/extensions/shader-graph/static/icon.png -------------------------------------------------------------------------------- /extensions/shader-graph/static/shader-graph/create-node.less: -------------------------------------------------------------------------------- 1 | .create-node { 2 | box-shadow: rgb(63 63 63 / 30%) 0px 0px 10px 2px; 3 | 4 | display: flex; 5 | 6 | .header { 7 | display: flex; 8 | align-items: center; 9 | background-color: #141414; 10 | width: 100%; 11 | height: 25px; 12 | } 13 | 14 | .title-label { 15 | margin-left: 8px; 16 | } 17 | 18 | .close { 19 | position: absolute; 20 | right: 8px; 21 | cursor: pointer; 22 | } 23 | 24 | .section { 25 | height: 100%; 26 | display: flex; 27 | flex-direction: column; 28 | overflow-y: auto; 29 | padding: 4px; 30 | } 31 | 32 | .search-group { 33 | display: flex; 34 | .icon { 35 | margin-left: 4px; 36 | margin-right: 4px; 37 | } 38 | .input { 39 | flex: 1; 40 | margin-right: 4px; 41 | } 42 | } 43 | 44 | .menus { 45 | height: 100%; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /extensions/shader-graph/tests/base.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, it } from 'node:test'; 2 | 3 | // TODO 暂无测试用例 4 | 5 | describe('base', () => { 6 | describe('Base', () => { 7 | it('none', () => {}); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /extensions/shader-graph/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json", 3 | "compilerOptions": { 4 | "target": "ES2021", 5 | "module": "CommonJS", 6 | "inlineSourceMap": true, 7 | "inlineSources": true, 8 | "esModuleInterop": true, 9 | "skipLibCheck": true, 10 | "strict": true, 11 | "experimentalDecorators": true, 12 | "lib": [ 13 | "DOM", 14 | "ScriptHost", 15 | "ES2021" 16 | ], 17 | "importHelpers": true, 18 | "outDir": "./dist", 19 | "rootDir": "./src", 20 | "types": [ 21 | "node", 22 | "@cocos/creator-types/editor", 23 | "@cocos/creator-types/engine", 24 | ] 25 | }, 26 | "include": [ 27 | "./@types", 28 | "./src", 29 | ], 30 | "exclude": [ 31 | "./static", 32 | "./shader-node/assets" 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cocos-creator-extensions", 3 | "version": "1.0.0", 4 | "description": "Store some Creator extension plugins", 5 | "main": ".eslintrc.js", 6 | "scripts": { 7 | "postinstall": "node ./workflow/scripts/postinstall.js", 8 | "build": "node ./workflow/scripts/build.js", 9 | "publish": "node ./workflow/scripts/publish.js", 10 | "pack": "node ./workflow/scripts/pack.js", 11 | "test": "node ./workflow/scripts/test.js", 12 | "ci": "npm run test" 13 | }, 14 | "author": "", 15 | "license": "ISC", 16 | "dependencies": { 17 | "chalk": "^2.4.2" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /workflow/scripts/build.js: -------------------------------------------------------------------------------- 1 | /** 2 | * npm run build 各个插件 3 | */ 4 | const { runCommandForExtensions } = require("./common"); 5 | 6 | (async () => { 7 | await runCommandForExtensions([ 8 | 'npm run build' 9 | ]); 10 | })(); 11 | -------------------------------------------------------------------------------- /workflow/scripts/pack.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 打包成各个插件 zip 包到根目录下的 dist 目录下 3 | */ 4 | const { join } = require('path'); 5 | const { runCommandForExtensions } = require("./common"); 6 | 7 | (async () => { 8 | await runCommandForExtensions([ 9 | { 10 | command: `npm run pack`, 11 | args: [ 12 | join(__dirname, '../../dist'), 13 | ] 14 | }, 15 | ]); 16 | })(); 17 | -------------------------------------------------------------------------------- /workflow/scripts/postinstall.js: -------------------------------------------------------------------------------- 1 | /** 2 | * npm install 各个插件 3 | */ 4 | const { runCommandForExtensions } = require("./common"); 5 | 6 | (async () => { 7 | // --ext="名字" 或 --extension="名字" 单独执行一个插件 8 | // --legacy-peer-deps -> 跳过下载 peerDependencies 依赖 9 | await runCommandForExtensions([ 10 | 'npm install --legacy-peer-deps', 11 | 'npm run build', 12 | ]); 13 | })(); 14 | -------------------------------------------------------------------------------- /workflow/scripts/publish.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 执行一次,然后构建出 zip 包 3 | */ 4 | 5 | const { runCommandForExtensions } = require("./common"); 6 | const { join } = require("path"); 7 | 8 | (async () => { 9 | // --ext="名字" 或 --extension="名字" 单独执行一个插件 10 | // --legacy-peer-deps -> 跳过下载 peerDependencies 依赖 11 | await runCommandForExtensions([ 12 | 'npm install --legacy-peer-deps', 13 | 'npm run build', 14 | { 15 | command: `npm run pack`, 16 | args: [ 17 | join(__dirname, '../../dist'), 18 | ] 19 | }, 20 | ]); 21 | })(); 22 | -------------------------------------------------------------------------------- /workflow/scripts/test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * npm run test 各个插件 3 | */ 4 | const { runCommandForExtensions } = require("./common"); 5 | 6 | (async () => { 7 | await runCommandForExtensions([ 8 | 'npm install --legacy-peer-deps', 9 | 'npm run build', 10 | 'npm run test' 11 | ], [ 12 | // 目前 localization-editor 单元测试不通过,先跳过 13 | 'localization-editor' 14 | ]); 15 | })(); 16 | --------------------------------------------------------------------------------