├── .gitattributes ├── .github ├── FUNDING.yml └── workflows │ ├── build-terre.yml │ └── release.yml ├── .gitignore ├── .vscode └── translation.code-snippets ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── README_EN.md ├── README_JP.md ├── assets ├── nsis.ico └── warning.txt ├── build-electron.sh ├── clone-android.sh ├── installer.nsi ├── nsis-version-sync.js ├── package.json ├── packages ├── WebGAL-electron │ ├── .gitattributes │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── main.js │ ├── package.json │ ├── public │ │ ├── .gitkeep │ │ ├── icon-mac.ico │ │ └── icon.ico │ └── yarn.lock ├── dev-server │ ├── index.js │ └── package.json ├── origine2 │ ├── .editorconfig │ ├── .eslintignore │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierignore │ ├── .prettierrc.js │ ├── index.html │ ├── lingui.config.js │ ├── openapi.ts │ ├── package.json │ ├── public │ │ ├── monaco-iframe │ │ │ ├── loader.js │ │ │ ├── min │ │ │ │ └── vs │ │ │ │ │ ├── base │ │ │ │ │ ├── browser │ │ │ │ │ │ └── ui │ │ │ │ │ │ │ └── codicons │ │ │ │ │ │ │ └── codicon │ │ │ │ │ │ │ └── codicon.ttf │ │ │ │ │ ├── common │ │ │ │ │ │ └── worker │ │ │ │ │ │ │ └── simpleWorker.nls.js │ │ │ │ │ └── worker │ │ │ │ │ │ └── workerMain.js │ │ │ │ │ ├── basic-languages │ │ │ │ │ ├── css │ │ │ │ │ │ └── css.js │ │ │ │ │ ├── html │ │ │ │ │ │ └── html.js │ │ │ │ │ ├── javascript │ │ │ │ │ │ └── javascript.js │ │ │ │ │ └── scss │ │ │ │ │ │ └── scss.js │ │ │ │ │ ├── editor │ │ │ │ │ ├── editor.main.css │ │ │ │ │ ├── editor.main.js │ │ │ │ │ └── editor.main.nls.js │ │ │ │ │ ├── language │ │ │ │ │ ├── css │ │ │ │ │ │ ├── cssMode.js │ │ │ │ │ │ └── cssWorker.js │ │ │ │ │ ├── html │ │ │ │ │ │ ├── htmlMode.js │ │ │ │ │ │ └── htmlWorker.js │ │ │ │ │ ├── json │ │ │ │ │ │ ├── jsonMode.js │ │ │ │ │ │ └── jsonWorker.js │ │ │ │ │ └── typescript │ │ │ │ │ │ ├── tsMode.js │ │ │ │ │ │ └── tsWorker.js │ │ │ │ │ └── loader.js │ │ │ └── monaco.html │ │ └── wasm │ │ │ └── onigasm.wasm │ ├── src │ │ ├── App.css │ │ ├── App.tsx │ │ ├── api │ │ │ ├── Api.ts │ │ │ └── index.ts │ │ ├── assets │ │ │ ├── font-family.css │ │ │ └── fonts │ │ │ │ └── JetBrainsMono-Regular.ttf │ │ ├── components │ │ │ ├── Assets │ │ │ │ ├── Assets.module.scss │ │ │ │ ├── Assets.tsx │ │ │ │ ├── FileElement.module.scss │ │ │ │ ├── FileElement.tsx │ │ │ │ ├── Upload.module.scss │ │ │ │ └── Upload.tsx │ │ │ ├── ColorPickerPopup │ │ │ │ ├── ColorPickerPopup.tsx │ │ │ │ └── colorPickerPopup.module.scss │ │ │ ├── IconCreator │ │ │ │ ├── IconCreator.tsx │ │ │ │ └── iconCreator.module.scss │ │ │ ├── Provider │ │ │ │ ├── GameEditorProvider.tsx │ │ │ │ └── TemplateEditorProvider.tsx │ │ │ ├── TagTitleWrapper │ │ │ │ ├── TagTitleWrapper.tsx │ │ │ │ └── tagTitleWrapper.module.scss │ │ │ ├── Transformer │ │ │ │ ├── Transformer.tsx │ │ │ │ └── transformer.module.scss │ │ │ ├── iconWrapper │ │ │ │ └── IconWrapper.tsx │ │ │ ├── message │ │ │ │ ├── Message.tsx │ │ │ │ └── message.module.scss │ │ │ └── terreToggle │ │ │ │ └── TerreToggle.tsx │ │ ├── config │ │ │ ├── highlighting │ │ │ │ └── hl.json │ │ │ ├── info.ts │ │ │ ├── swagger.json │ │ │ └── themes │ │ │ │ ├── light-vs.json │ │ │ │ ├── monokai-light-vs.json │ │ │ │ ├── monokai-light.json │ │ │ │ ├── theme.css │ │ │ │ └── white.json │ │ ├── favicon.ico │ │ ├── hooks │ │ │ ├── useGenSyncRef.ts │ │ │ ├── useHashRoute.ts │ │ │ ├── useLanguage.ts │ │ │ ├── useRelease.ts │ │ │ └── useValue.ts │ │ ├── index.css │ │ ├── locales │ │ │ ├── en.po │ │ │ ├── ja.po │ │ │ └── zhCn.po │ │ ├── main.tsx │ │ ├── pages │ │ │ ├── dashboard │ │ │ │ ├── About.tsx │ │ │ │ ├── DashBoard.tsx │ │ │ │ ├── GameElement.tsx │ │ │ │ ├── GamePreview.tsx │ │ │ │ ├── Sidebar.tsx │ │ │ │ ├── TemplateElement.tsx │ │ │ │ ├── TemplateSidebar.module.scss │ │ │ │ ├── TemplateSidebar.tsx │ │ │ │ ├── dashboard.module.scss │ │ │ │ ├── gameElement.module.scss │ │ │ │ ├── gamepreview.module.scss │ │ │ │ ├── sidebar.module.scss │ │ │ │ └── templateElement.module.scss │ │ │ ├── editor │ │ │ │ ├── ChooseFile │ │ │ │ │ ├── ChooseFile.tsx │ │ │ │ │ ├── chooseFile.module.scss │ │ │ │ │ └── chooseFileConfig.ts │ │ │ │ ├── Editor.tsx │ │ │ │ ├── EditorSidebar │ │ │ │ │ ├── EditorSidebar.tsx │ │ │ │ │ └── editorSidebar.module.scss │ │ │ │ ├── GraphicalEditor │ │ │ │ │ ├── GraphicalEditor.tsx │ │ │ │ │ ├── SentenceEditor │ │ │ │ │ │ ├── Bgm.tsx │ │ │ │ │ │ ├── ChangeBg.tsx │ │ │ │ │ │ ├── ChangeCallScene.tsx │ │ │ │ │ │ ├── ChangeFigure.tsx │ │ │ │ │ │ ├── Choose.tsx │ │ │ │ │ │ ├── Comment.tsx │ │ │ │ │ │ ├── End.tsx │ │ │ │ │ │ ├── GetUserInput.tsx │ │ │ │ │ │ ├── Intro.tsx │ │ │ │ │ │ ├── MiniAvatar.tsx │ │ │ │ │ │ ├── PixiPerform.tsx │ │ │ │ │ │ ├── PlayEffect.tsx │ │ │ │ │ │ ├── PlayVideo.tsx │ │ │ │ │ │ ├── Say.tsx │ │ │ │ │ │ ├── SetAnimation.tsx │ │ │ │ │ │ ├── SetTextbox.tsx │ │ │ │ │ │ ├── SetTransform.tsx │ │ │ │ │ │ ├── SetTransition.tsx │ │ │ │ │ │ ├── Template.tsx │ │ │ │ │ │ ├── UnlockExtra.tsx │ │ │ │ │ │ ├── Unrecognized.tsx │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ └── sentenceEditor.module.scss │ │ │ │ │ ├── components │ │ │ │ │ │ ├── AddNewSentenceLarge.tsx │ │ │ │ │ │ ├── AddSentence.tsx │ │ │ │ │ │ ├── CommonOption.tsx │ │ │ │ │ │ ├── CommonTips.tsx │ │ │ │ │ │ ├── EffectEditor.tsx │ │ │ │ │ │ ├── TerrePanel.tsx │ │ │ │ │ │ ├── WheelDropdown.tsx │ │ │ │ │ │ ├── addSentence.module.scss │ │ │ │ │ │ ├── commonOption.module.scss │ │ │ │ │ │ ├── commonTips.module.scss │ │ │ │ │ │ └── effectEditor.module.scss │ │ │ │ │ ├── graphicalEditor.module.scss │ │ │ │ │ ├── parser.ts │ │ │ │ │ └── utils │ │ │ │ │ │ ├── getArgByKey.ts │ │ │ │ │ │ └── sceneTextProcessor.ts │ │ │ │ ├── MainArea │ │ │ │ │ ├── EditArea.tsx │ │ │ │ │ ├── EditorDebugger │ │ │ │ │ │ ├── EditorDebugger.tsx │ │ │ │ │ │ ├── editorDebugger.module.scss │ │ │ │ │ │ └── theme.ts │ │ │ │ │ ├── EditorToolbar.tsx │ │ │ │ │ ├── MainArea.tsx │ │ │ │ │ ├── TagsManager.tsx │ │ │ │ │ ├── editArea.module.scss │ │ │ │ │ ├── editorToolbar.module.scss │ │ │ │ │ ├── mainArea.module.scss │ │ │ │ │ └── tagsManager.module.scss │ │ │ │ ├── ResourceDisplay │ │ │ │ │ ├── JsonResourceDisplay │ │ │ │ │ │ └── JsonResourceDisplay.tsx │ │ │ │ │ ├── ResourceDisplay.tsx │ │ │ │ │ └── resourceDisplay.module.scss │ │ │ │ ├── TextEditor │ │ │ │ │ ├── TextEditor.tsx │ │ │ │ │ ├── convert.ts │ │ │ │ │ └── textEditor.module.scss │ │ │ │ ├── Topbar │ │ │ │ │ ├── Topbar.tsx │ │ │ │ │ ├── TopbarTabButton.tsx │ │ │ │ │ ├── TopbarTabButtonSpecial.tsx │ │ │ │ │ ├── assets │ │ │ │ │ │ ├── github.svg │ │ │ │ │ │ └── wgfav-new-blue.png │ │ │ │ │ ├── components │ │ │ │ │ │ ├── BackDashboardButton.tsx │ │ │ │ │ │ ├── IconWithTextItem.tsx │ │ │ │ │ │ ├── IconWithTextItemSmall.tsx │ │ │ │ │ │ ├── TabItem.tsx │ │ │ │ │ │ ├── TopbarTab.tsx │ │ │ │ │ │ ├── backDashboardButton.module.scss │ │ │ │ │ │ ├── iconWithTextItem.module.scss │ │ │ │ │ │ └── topbarTab.module.scss │ │ │ │ │ ├── tabs │ │ │ │ │ │ ├── AddSentence │ │ │ │ │ │ │ ├── AddSentenceTab.tsx │ │ │ │ │ │ │ └── addSentence.module.scss │ │ │ │ │ │ ├── Export │ │ │ │ │ │ │ ├── ExportTab.tsx │ │ │ │ │ │ │ └── export.module.scss │ │ │ │ │ │ ├── GameConfig │ │ │ │ │ │ │ ├── ConfigTab.tsx │ │ │ │ │ │ │ ├── GameConfig.tsx │ │ │ │ │ │ │ └── constants.ts │ │ │ │ │ │ ├── Help │ │ │ │ │ │ │ ├── HelpTab.tsx │ │ │ │ │ │ │ └── help.module.scss │ │ │ │ │ │ ├── Settings │ │ │ │ │ │ │ ├── SettingsTab.tsx │ │ │ │ │ │ │ ├── constants.ts │ │ │ │ │ │ │ └── settingsTab.module.scss │ │ │ │ │ │ ├── ViewConfig │ │ │ │ │ │ │ ├── ViewTab.tsx │ │ │ │ │ │ │ └── viewTab.module.scss │ │ │ │ │ │ └── topbarTabs.module.scss │ │ │ │ │ └── topbar.module.scss │ │ │ │ └── editor.module.scss │ │ │ └── templateEditor │ │ │ │ ├── TemplateEditor.tsx │ │ │ │ ├── TemplateEditorMainAria │ │ │ │ ├── TabsManager.tsx │ │ │ │ ├── TemplateEditorMainAria.tsx │ │ │ │ ├── TemplateEditorToolbar.tsx │ │ │ │ ├── TemplatePreview.tsx │ │ │ │ ├── tabsManager.module.scss │ │ │ │ ├── templateEditorMainAria.module.scss │ │ │ │ ├── templateEditorToolbar.module.scss │ │ │ │ └── templatePreview.module.scss │ │ │ │ ├── TemplateEditorSidebar │ │ │ │ ├── ComponentTree │ │ │ │ │ ├── ComponentNode.tsx │ │ │ │ │ ├── ComponentTree.tsx │ │ │ │ │ ├── componentNode.module.scss │ │ │ │ │ └── componentTree.module.scss │ │ │ │ ├── TemplateEditorSidebar.tsx │ │ │ │ └── templateEditorSidebar.module.scss │ │ │ │ ├── TemplateGraphicalEditor │ │ │ │ ├── TemplateGraphicalEditor.tsx │ │ │ │ ├── WebgalClassEditor │ │ │ │ │ ├── AddProperty.tsx │ │ │ │ │ ├── editorTable.ts │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── propertyEditor.module.scss │ │ │ │ │ └── propertyEditor │ │ │ │ │ │ ├── WGBackgroundEditor.tsx │ │ │ │ │ │ ├── WGBackgroundPosition.tsx │ │ │ │ │ │ ├── WGBackgroundSize.tsx │ │ │ │ │ │ ├── WGColor.tsx │ │ │ │ │ │ ├── WGCommonEditor.tsx │ │ │ │ │ │ ├── WGCommonLengthEditor.tsx │ │ │ │ │ │ ├── WGCommonLengthEditor4Values.tsx │ │ │ │ │ │ ├── WGCommonNumberEditor.tsx │ │ │ │ │ │ ├── WGCursor.tsx │ │ │ │ │ │ ├── WGCustomProperty.tsx │ │ │ │ │ │ ├── WGFontWeight.tsx │ │ │ │ │ │ ├── WGPosition.tsx │ │ │ │ │ │ ├── WGText.tsx │ │ │ │ │ │ ├── WGTextShadow.tsx │ │ │ │ │ │ └── components │ │ │ │ │ │ └── WGColorPicker.tsx │ │ │ │ ├── templateGraphicalEditor.module.scss │ │ │ │ ├── utils │ │ │ │ │ ├── extractCss.ts │ │ │ │ │ ├── formCss.ts │ │ │ │ │ ├── getMdnLink.ts │ │ │ │ │ └── updateScssFile.ts │ │ │ │ └── withStateEditor │ │ │ │ │ ├── SingleStateEditor.tsx │ │ │ │ │ ├── index.tsx │ │ │ │ │ └── singleStateEditor.module.scss │ │ │ │ ├── TextEditor │ │ │ │ ├── TextEditor.tsx │ │ │ │ └── textEditor.module.scss │ │ │ │ └── templateEditor.module.scss │ │ ├── primereact.scss │ │ ├── runtime │ │ │ └── WG_ORIGINE_RUNTIME.ts │ │ ├── store │ │ │ ├── useEditorStore.ts │ │ │ ├── useGameEditorStore.ts │ │ │ └── useTemplateEditorStore.ts │ │ ├── types │ │ │ ├── debugProtocol.ts │ │ │ ├── editor.ts │ │ │ ├── gameEditor.ts │ │ │ ├── stageInterface.ts │ │ │ └── templateEditor.ts │ │ ├── utils │ │ │ ├── createSelectors.ts │ │ │ ├── eventBus.ts │ │ │ ├── getFileIcon.ts │ │ │ ├── getWsUrl.ts │ │ │ ├── initMonaco.ts │ │ │ ├── localStorageRename.ts │ │ │ ├── logger.ts │ │ │ ├── normalizeFileName.ts │ │ │ ├── parser.ts │ │ │ ├── png2icojs.ts │ │ │ └── wsUtil.ts │ │ ├── vite-env.d.ts │ │ └── webgalscript │ │ │ ├── extension.ts │ │ │ └── lsp.ts │ ├── tsconfig.json │ ├── tsconfig.node.json │ └── vite.config.ts ├── terre-electron │ ├── .gitattributes │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── main.js │ ├── package.json │ └── public │ │ ├── .gitkeep │ │ ├── icon-mac.ico │ │ └── icon.ico └── terre2 │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── LICENSE │ ├── README.md │ ├── assets │ └── templates │ │ ├── Derivative_Engine │ │ └── .gitkeep │ │ ├── WebGAL_Default_Template │ │ ├── Stage │ │ │ ├── Choose │ │ │ │ └── choose.scss │ │ │ └── TextBox │ │ │ │ └── textbox.scss │ │ ├── UI │ │ │ └── Title │ │ │ │ └── title.scss │ │ ├── assets │ │ │ └── .gitkeep │ │ └── template.json │ │ └── WebGAL_Template │ │ ├── game │ │ ├── animation │ │ │ ├── animationTable.json │ │ │ ├── blur.json │ │ │ ├── dotFilm.json │ │ │ ├── enter-from-bottom.json │ │ │ ├── enter-from-left.json │ │ │ ├── enter-from-right.json │ │ │ ├── enter.json │ │ │ ├── exit.json │ │ │ ├── glitchFilm.json │ │ │ ├── godrayFilm.json │ │ │ ├── move-front-and-back.json │ │ │ ├── oldFilm.json │ │ │ ├── reflectionFilm.json │ │ │ ├── removeFilm.json │ │ │ ├── rgbFilm.json │ │ │ ├── shake.json │ │ │ ├── shockwaveIn.json │ │ │ └── shockwaveOut.json │ │ ├── background │ │ │ ├── WebGAL_New_Enter_Image.png │ │ │ └── bg.png │ │ ├── bgm │ │ │ └── s_Title.mp3 │ │ ├── config.txt │ │ ├── figure │ │ │ ├── miniavatar.png │ │ │ ├── stand.png │ │ │ └── stand2.png │ │ ├── scene │ │ │ └── start.txt │ │ ├── template │ │ │ ├── Stage │ │ │ │ ├── Choose │ │ │ │ │ └── choose.scss │ │ │ │ └── TextBox │ │ │ │ │ └── textbox.scss │ │ │ ├── UI │ │ │ │ └── Title │ │ │ │ │ └── title.scss │ │ │ └── template.json │ │ ├── tex │ │ │ ├── cherryBlossoms.png │ │ │ ├── raindrop.png │ │ │ └── snowFlake_min.png │ │ ├── userStyleSheet.css │ │ ├── video │ │ │ └── .gitkeep │ │ └── vocal │ │ │ └── v1.wav │ │ ├── icons │ │ ├── apple-touch-icon.png │ │ ├── favicon.ico │ │ ├── icon-192-maskable.png │ │ ├── icon-192.png │ │ ├── icon-512-maskable.png │ │ └── icon-512.png │ │ └── manifest.json │ ├── nest-cli.json │ ├── package.json │ ├── public │ ├── games │ │ └── .gitkeep │ ├── index.html │ └── templates │ │ └── WebGAL Black │ │ ├── Stage │ │ └── TextBox │ │ │ └── textbox.scss │ │ ├── UI │ │ └── Title │ │ │ └── title.scss │ │ ├── assets │ │ └── .gitkeep │ │ └── template.json │ ├── src │ ├── Modules │ │ ├── assets │ │ │ ├── assets.controller.ts │ │ │ ├── assets.dto.ts │ │ │ ├── assets.module.ts │ │ │ └── assets.service.ts │ │ ├── lsp │ │ │ ├── completion │ │ │ │ ├── commandArgs.ts │ │ │ │ ├── fileSuggestion.ts │ │ │ │ └── index.ts │ │ │ ├── gateway.ts │ │ │ ├── semanticToken.ts │ │ │ ├── suggestionRules │ │ │ │ ├── getArgsKey.ts │ │ │ │ ├── getCommands.ts │ │ │ │ ├── getKeywordsAndConstants.ts │ │ │ │ ├── reference.ts │ │ │ │ └── template.ts │ │ │ └── webgalLsp.ts │ │ ├── manage-game │ │ │ ├── manage-game.controller.spec.ts │ │ │ ├── manage-game.controller.ts │ │ │ ├── manage-game.dto.ts │ │ │ ├── manage-game.module.ts │ │ │ ├── manage-game.service.spec.ts │ │ │ └── manage-game.service.ts │ │ ├── manage-template │ │ │ ├── manage-template.controller.ts │ │ │ ├── manage-template.dto.ts │ │ │ ├── manage-template.module.ts │ │ │ └── manage-template.service.ts │ │ ├── template-preview │ │ │ ├── template-preview.controller.ts │ │ │ ├── template-preview.module.ts │ │ │ └── template-preview.service.ts │ │ ├── webgal-fs │ │ │ ├── webgal-fs.module.ts │ │ │ ├── webgal-fs.service.spec.ts │ │ │ └── webgal-fs.service.ts │ │ └── websocket │ │ │ └── websocketGateway.ts │ ├── app.controller.spec.ts │ ├── app.controller.ts │ ├── app.module.ts │ ├── app.service.ts │ ├── http │ │ ├── testApi.http │ │ └── testApplyTemplate.http │ ├── logger.ts │ ├── main.ts │ └── util │ │ ├── open.ts │ │ ├── strings.ts │ │ └── webgal-parser.ts │ ├── standalone.js │ ├── terre-custom-libs │ └── vscode-ws-jsonrpc-webgal │ │ └── build │ │ ├── cjs │ │ ├── index.js │ │ └── index.js.map │ │ ├── connection.d.ts │ │ ├── disposable.d.ts │ │ ├── index.d.ts │ │ ├── index.global.js │ │ ├── index.global.js.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── logger.d.ts │ │ ├── server │ │ ├── connection.d.ts │ │ ├── index.d.ts │ │ └── launch.d.ts │ │ └── socket │ │ ├── connection.d.ts │ │ ├── index.d.ts │ │ ├── reader.d.ts │ │ ├── socket.d.ts │ │ └── writer.d.ts │ ├── test │ ├── app.e2e-spec.ts │ └── jest-e2e.json │ ├── tsconfig.build.json │ ├── tsconfig.json │ └── update-webgal.ts ├── pr-check-linux.yml ├── release-linux-arm64.sh ├── release-linux.sh ├── release-mac.sh ├── release-terre-electron.sh ├── release.sh ├── releasenote.md └── yarn.lock /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: https://docs.openwebgal.com/sponsor/ 2 | patreon: WebGAL 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .idea 3 | release 4 | bundle 5 | yarn.lock 6 | package-lock.json 7 | .DS_Store 8 | terre-electron 9 | packages/origine2/src/locales/en.js 10 | packages/origine2/src/locales/ja.js 11 | packages/origine2/src/locales/zhCn.js 12 | packages/origine2/src/locales/en.ts 13 | packages/origine2/src/locales/ja.ts 14 | packages/origine2/src/locales/zhCn.ts 15 | -------------------------------------------------------------------------------- /.vscode/translation.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | // Place your WebGAL_Terre 工作区 snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and 3 | // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope 4 | // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is 5 | // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: 6 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. 7 | // Placeholders with the same ids are connected. 8 | // Example: 9 | // "Print to console": { 10 | // "scope": "javascript,typescript", 11 | // "prefix": "log", 12 | // "body": [ 13 | // "console.log('$1');", 14 | // "$2" 15 | // ], 16 | // "description": "Log output to console" 17 | // } 18 | "useTrans": { 19 | "prefix": "uts", 20 | "body": "const t = useTrans($0);" 21 | }, 22 | 23 | "trans": { 24 | "prefix": "t", 25 | "body": "t($0)" 26 | } 27 | } -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 中文 [https://docs.openwebgal.com/developers/](https://docs.openwebgal.com/developers/terre.html) 2 | 3 | English [https://docs.openwebgal.com/en/developers/](https://docs.openwebgal.com/en/developers/terre.html) 4 | 5 | 日本語 [https://docs.openwebgal.com/ja/developers/](https://docs.openwebgal.com/ja/developers/terre.html) 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![WebGAL Terre Slogan CN](https://github.com/OpenWebGAL/WebGAL_Terre/assets/30483415/69919753-9068-4465-8b11-a0de89b5a244) 2 | 3 | 4 | WebGAL - Galgame Editing. Redefined | Product Hunt 5 | 6 | ### [English](README_EN.md) | [日本語](README_JP.md) 7 | 8 | ## 这是 WebGAL 可视化编辑器项目。如果你想要查看 WebGAL 的源代码,请前往 [WebGAL代码仓库](https://github.com/OpenWebGAL/WebGAL) 9 | 10 | # WebGAL_Terre 11 | 12 | **重新定义Galgame的制作方式** 13 | 14 | 以最快捷的方式创建属于你自己的 Galgame,并支持导出为网页和 Windows 可执行文件。 15 | 16 | 方便地上传、管理和预览你的游戏素材。 17 | 18 | 多标签页的编辑器,可以让你快速在多个剧本间切换。 19 | 20 | ## 立即体验 21 | 22 | ##### 下载链接 23 | 24 | https://github.com/MakinoharaShoko/WebGAL_Terre/releases 25 | 26 | ## 使用说明 27 | 28 | https://docs.openwebgal.com/ 29 | 30 | ## 参与贡献 31 | 32 | [WebGAL Terre 贡献指南](https://docs.openwebgal.com/developers/terre.html) 33 | 34 | ### 赞助 35 | 36 | WebGAL 是一款开源软件,因此你可以免费在 MPL-2.0 开源协议的范畴下使用本软件,并可用于商业使用。 37 | 38 | 但即便如此,你的赞助也可以给予开发者前进的动力,让这个项目变得更好。 39 | 40 | [赞助本项目](https://docs.openwebgal.com/sponsor/) 41 | 42 | 43 | # Sponsors 44 | 45 | 46 | Sponsor 47 | 48 | -------------------------------------------------------------------------------- /README_EN.md: -------------------------------------------------------------------------------- 1 | ![WebGAL Terre Slogan EN](https://github.com/OpenWebGAL/WebGAL_Terre/assets/30483415/e663fe16-3c6c-4cbc-aaaf-3062203ef03e) 2 | 3 | 4 | WebGAL - Galgame Editing. Redefined | Product Hunt 5 | 6 | ## This is the WebGAL visual editor project. If you want to view the WebGAL source code, please go to [WebGAL code repository](https://github.com/OpenWebGAL/WebGAL) 7 | 8 | # WebGAL_Terre 9 | 10 | **Redefining the way Galgame is made** 11 | 12 | Create your own Galgame in the fastest way, and support exporting as web pages and Windows executable files. 13 | 14 | Conveniently upload, manage, and preview your game materials. 15 | 16 | Multi-tab editor allows you to quickly switch between multiple scripts. 17 | 18 | ## Try it now 19 | 20 | ##### Download link 21 | 22 | https://github.com/MakinoharaShoko/WebGAL_Terre/releases 23 | 24 | ## Usage instructions 25 | 26 | https://docs.openwebgal.com/en 27 | 28 | ## Contributing to Terre 29 | 30 | [WebGAL Terre Contribution Guide](https://docs.openwebgal.com/en/developers/terre.html) 31 | 32 | ### Sponsorship 33 | 34 | WebGAL is an open source software, so you can use this software for free under the MPL-2.0 open source agreement and it can be used for commercial purposes. 35 | 36 | Even so, your sponsorship can give the developers the motivation to move forward and make this project better. 37 | 38 | [Sponsor this project](https://docs.openwebgal.com/en/sponsor/) 39 | 40 | 41 | # Sponsors 42 | 43 | 44 | Sponsor 45 | 46 | -------------------------------------------------------------------------------- /README_JP.md: -------------------------------------------------------------------------------- 1 | ![WebGAL Terre Slogan JA](https://github.com/OpenWebGAL/WebGAL_Terre/assets/30483415/728c3ee7-bf97-4ab4-a29d-edf0f55170cc) 2 | 3 | 4 | WebGAL - Galgame Editing. Redefined | Product Hunt 5 | 6 | ## これはWebGALビジュアルエディタプロジェクトです。WebGALのソースコードを見たい場合は、[WebGALコードリポジトリ](https://github.com/OpenWebGAL/WebGAL) にアクセスしてください。 7 | 8 | # WebGAL_Terre 9 | 10 | **ギャルゲー作り方の再定義** 11 | 12 | 最速で自分だけのギャルゲーを作成し、ウェブページやWindows実行可能ファイルとしてエクスポートすることができます。 13 | 14 | ゲーム素材を簡単にアップロード、管理、プレビューすることができます。 15 | 16 | マルチタブのエディターを使用すれば、複数のスクリプト間で素早く切り替えることができます。 17 | 18 | ## すぐに体験 19 | 20 | ##### ダウンロードリンク 21 | 22 | https://github.com/MakinoharaShoko/WebGAL_Terre/releases 23 | 24 | ## 使用説明 25 | 26 | https://docs.openwebgal.com/ja/ 27 | 28 | ## Terre への貢献 29 | 30 | [WebGAL Terre 貢献ガイド](https://docs.openwebgal.com/ja/developers/terre.html) 31 | 32 | ### スポンサーシップ 33 | 34 | WebGALはオープンソースソフトウェアであり、MPL-2.0オープンソースライセンスの範囲内でこのソフトウェアを無料で使用し、商用利用も可能です。 35 | 36 | それでも、あなたのスポンサーシップは開発者に前進する動力を与え、このプロジェクトをより良いものにすることができます。 37 | 38 | [このプロジェクトをスポンサー](https://docs.openwebgal.com/ja/sponsor/) 39 | 40 | # Sponsors 41 | 42 | 43 | Sponsor 44 | 45 | -------------------------------------------------------------------------------- /assets/nsis.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenWebGAL/WebGAL_Terre/fe4d14e9b46e84ce29504ee0019b95c4712ac9a5/assets/nsis.ico -------------------------------------------------------------------------------- /assets/warning.txt: -------------------------------------------------------------------------------- 1 | Don't use ico file renamed by bmp file. It'll make error. -------------------------------------------------------------------------------- /build-electron.sh: -------------------------------------------------------------------------------- 1 | cd packages/WebGAL-electron 2 | npm i 3 | npm run build 4 | cd ../terre2/assets/templates/ 5 | mkdir WebGAL_Electron_Template 6 | cd ../../../WebGAL-electron 7 | cp -rf build/win-unpacked/* ../../packages/terre2/assets/templates/WebGAL_Electron_Template/ 8 | -------------------------------------------------------------------------------- /clone-android.sh: -------------------------------------------------------------------------------- 1 | # 克隆 WebGAL Android 模板 2 | cd release/assets/templates/ 3 | rm -rf WebGAL_Android_Template 4 | git clone https://github.com/nini22P/WebGAL-Android.git 5 | mv WebGAL-Android WebGAL_Android_Template 6 | # MainActivity.kt 移动到主文件夹防止误删 7 | mv WebGAL_Android_Template/app/src/main/java/com/openwebgal/demo/MainActivity.kt WebGAL_Android_Template/app/src/main/java/MainActivity.kt 8 | 9 | cd ../../../ 10 | cd release 11 | 12 | # 删除冗余文件 13 | rm -rf assets/templates/WebGAL_Android_Template/.github 14 | rm -rf assets/templates/WebGAL_Android_Template/.git 15 | rm -rf assets/templates/WebGAL_Android_Template/.gitattributes 16 | rm -rf assets/templates/WebGAL_Android_Template/app/src/main/assets/webgal/.gitkeep 17 | rm -rf assets/templates/WebGAL_Android_Template/app/src/main/java/com -------------------------------------------------------------------------------- /installer.nsi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenWebGAL/WebGAL_Terre/fe4d14e9b46e84ce29504ee0019b95c4712ac9a5/installer.nsi -------------------------------------------------------------------------------- /nsis-version-sync.js: -------------------------------------------------------------------------------- 1 | const { readFile, writeFile } = require('fs/promises'); 2 | const {encode, decode} = require('iconv-lite'); 3 | 4 | (async () => { 5 | const packageFile = await readFile('./package.json', { encoding: 'utf-8' }); 6 | const packageJson = JSON.parse(packageFile); 7 | 8 | const version = packageJson.version; 9 | 10 | if (!version) throw new Error('Get version failed.'); 11 | 12 | console.log("ver: ", version); 13 | 14 | const nsisInstallerFilePath = './installer.nsi'; 15 | 16 | const nsisInstallerFileData = decode(await readFile(nsisInstallerFilePath), 'GB2312'); 17 | const newNsisInstallerFileData = encode(nsisInstallerFileData.replace(/^!define VERSION \".*\"/m, `!define VERSION "${version}"`), 'GB2312'); 18 | await writeFile(nsisInstallerFilePath, newNsisInstallerFileData); 19 | 20 | console.log('已更新 nsis 配置文件版本号'); 21 | })(); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webgal-terre", 3 | "version": "4.5.13", 4 | "private": true, 5 | "scripts": { 6 | "dev": "concurrently \"yarn dev:terre\" \"yarn dev:origine\" \"yarn dev:start-dev-server\"", 7 | "lint": "concurrently \"yarn lint:terre\" \"yarn lint:origine\"", 8 | "nsis-bundle": "node ./nsis-version-sync.js && makensis ./installer.nsi", 9 | "dev:terre": "cd packages/terre2 && yarn start:debug", 10 | "dev:origine": "cd packages/origine2 && yarn dev", 11 | "dev:start-dev-server": "cd packages/dev-server && node index.js", 12 | "openapi": "cd packages/origine2 && yarn openapi", 13 | "lint:terre": "cd packages/terre2 && yarn lint", 14 | "lint:origine": "cd packages/origine2 && yarn lint" 15 | }, 16 | "workspaces": { 17 | "packages": [ 18 | "packages/dev-server", 19 | "packages/terre2", 20 | "packages/origine2" 21 | ], 22 | "nohoist": [ 23 | "**/WebGAL-electron", 24 | "**/WebGAL-electron/**", 25 | "**/electron", 26 | "**/electron/**" 27 | ] 28 | }, 29 | "devDependencies": { 30 | "concurrently": "^7.2.2", 31 | "iconv-lite": "^0.6.3" 32 | }, 33 | "engines": { 34 | "node": ">=18" 35 | }, 36 | "packageManager": "yarn@1.22.22" 37 | } 38 | -------------------------------------------------------------------------------- /packages/WebGAL-electron/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /packages/WebGAL-electron/README.md: -------------------------------------------------------------------------------- 1 | # WebGAL Electron Project 2 | 3 | Add electron support for WebGAL and WebGAL Terre. 4 | 5 | ### Optional: Add mirror of electron-builder 6 | 7 | ``` 8 | export ELECTRON_BUILDER_BINARIES_MIRROR=https://npmmirror.com/mirrors/electron-builder-binaries/ 9 | export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/" 10 | ``` 11 | -------------------------------------------------------------------------------- /packages/WebGAL-electron/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webgal-electron-project", 3 | "version": "1.0.0", 4 | "description": "WebGAL Electron Support", 5 | "main": "main.js", 6 | "repository": "https://github.com/WebGAL-Technical-Committee/WebGAL-Electron-Project.git", 7 | "author": "Mahiru ", 8 | "license": "MPL-2.0", 9 | "scripts": { 10 | "start": "electron .", 11 | "build": "electron-builder", 12 | "build-universal": "electron-builder --universal", 13 | "build:arm64": "electron-builder --arm64" 14 | }, 15 | "devDependencies": { 16 | "electron": "^29.0.0", 17 | "electron-builder": "^24.12.0" 18 | }, 19 | "build": { 20 | "productName": "WebGAL", 21 | "appId": "com.openwebgal.webgal", 22 | "copyright": "webgal", 23 | "directories": { 24 | "output": "build" 25 | }, 26 | "asar": false, 27 | "win": { 28 | "icon": "public/icon.ico", 29 | "target": [ 30 | "dir" 31 | ] 32 | }, 33 | "linux": { 34 | "icon": "public/icon.ico", 35 | "target": [ 36 | "dir" 37 | ] 38 | }, 39 | "mac": { 40 | "icon": "public/icon-mac.ico" 41 | }, 42 | "electronDownload": { 43 | "mirror": "https://npmmirror.com/mirrors/electron/" 44 | } 45 | }, 46 | "dependencies": { 47 | "electron-log": "^5.1.5" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /packages/WebGAL-electron/public/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenWebGAL/WebGAL_Terre/fe4d14e9b46e84ce29504ee0019b95c4712ac9a5/packages/WebGAL-electron/public/.gitkeep -------------------------------------------------------------------------------- /packages/WebGAL-electron/public/icon-mac.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenWebGAL/WebGAL_Terre/fe4d14e9b46e84ce29504ee0019b95c4712ac9a5/packages/WebGAL-electron/public/icon-mac.ico -------------------------------------------------------------------------------- /packages/WebGAL-electron/public/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenWebGAL/WebGAL_Terre/fe4d14e9b46e84ce29504ee0019b95c4712ac9a5/packages/WebGAL-electron/public/icon.ico -------------------------------------------------------------------------------- /packages/dev-server/index.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const { createProxyMiddleware } = require("http-proxy-middleware"); 3 | const { env } = require("process") 4 | 5 | const app = express(); 6 | app.set("port", "80"); 7 | 8 | app.all("*", function (req, res, next) { 9 | // 解决跨域问题 10 | res.header("Access-Control-Allow-Origin", "*"); 11 | res.header( 12 | "Access-Control-Allow-Headers", 13 | "Content-Type,Content-Length, Authorization, Accept,X-Requested-With" 14 | ); 15 | res.header("Access-Control-Allow-Methods", "PUT,POST,GET,DELETE,OPTIONS"); 16 | if (req.method === "OPTIONS") { 17 | res.send(200); 18 | } else { 19 | next(); 20 | } 21 | }); 22 | 23 | let WEBGAL_PORT = 3000; // default port 24 | if (env.WEBGAL_PORT) { 25 | WEBGAL_PORT = Number.parseInt(env.WEBGAL_PORT); 26 | } 27 | 28 | app.use( 29 | createProxyMiddleware("/api", { 30 | target: `http://localhost:${WEBGAL_PORT + 1}`, // http代理跨域目标接口 31 | changeOrigin: true, 32 | ws:true 33 | }) 34 | ); 35 | 36 | app.use( 37 | createProxyMiddleware("/template-preview", { 38 | target: `http://localhost:${WEBGAL_PORT + 1}`, // http代理跨域目标接口 39 | changeOrigin: true, 40 | }) 41 | ); 42 | 43 | app.use( 44 | createProxyMiddleware("/games", { 45 | target: `http://localhost:${WEBGAL_PORT + 1}`, // http代理跨域目标接口 46 | changeOrigin: true, 47 | }) 48 | ); 49 | 50 | app.use( 51 | createProxyMiddleware("/templates", { 52 | target: `http://localhost:${WEBGAL_PORT + 1}`, // http代理跨域目标接口 53 | changeOrigin: true, 54 | }) 55 | ); 56 | 57 | app.use( 58 | createProxyMiddleware("/", { 59 | target: `http://localhost:${WEBGAL_PORT}`, // http代理跨域目标接口 60 | ws: true, 61 | changeOrigin: true, 62 | }) 63 | ); 64 | 65 | app.listen(app.get("port"), () => { 66 | console.log(`反向代理已开启,端口:${app.get("port")}`); 67 | }); 68 | -------------------------------------------------------------------------------- /packages/dev-server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webgal-terre-dev-server", 3 | "version": "1.0.0", 4 | "description": "For WebGAL Terre dev", 5 | "main": "index.js", 6 | "author": "Mahiru", 7 | "license": "MPL-2.0", 8 | "dependencies": { 9 | "express": "^4.18.2", 10 | "http-proxy-middleware": "^2.0.9" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/origine2/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /packages/origine2/.eslintignore: -------------------------------------------------------------------------------- 1 | *.md 2 | *.css 3 | *.scss 4 | *.otf 5 | *.svg 6 | *.ttf 7 | *.ico 8 | src/config/* 9 | -------------------------------------------------------------------------------- /packages/origine2/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['alloy', 'alloy/react', 'alloy/typescript'], 3 | env: { 4 | // 你的环境变量(包含多个预定义的全局变量) 5 | // 6 | // browser: true, 7 | // node: true, 8 | // mocha: true, 9 | // jest: true, 10 | // jquery: true 11 | }, 12 | globals: { 13 | // 你的全局变量(设置为 false 表示它不允许被重新赋值) 14 | // 15 | // myGlobal: false 16 | }, 17 | rules: { 18 | // 自定义你的规则 19 | // 最大圈复杂度 20 | complexity: ['error', 30], 21 | "linebreak-style": ['off', "unix"], 22 | "semi": 2, 23 | "indent": ["error", 2], 24 | "semi-style": ["error", "last"], 25 | 'react/jsx-no-useless-fragment': [ 26 | 'error', 27 | { 28 | allowExpressions: true, 29 | }, 30 | ], 31 | }, 32 | }; 33 | -------------------------------------------------------------------------------- /packages/origine2/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /packages/origine2/.prettierignore: -------------------------------------------------------------------------------- 1 | *.md 2 | *.css 3 | *.scss 4 | *.otf 5 | *.svg 6 | -------------------------------------------------------------------------------- /packages/origine2/.prettierrc.js: -------------------------------------------------------------------------------- 1 | // .prettierrc.js 2 | module.exports = { 3 | // 一行最多 120 字符 4 | printWidth: 120, 5 | // 使用 n 个空格缩进 6 | tabWidth: 2, 7 | // 不使用缩进符,而使用空格 8 | useTabs: false, 9 | // 行尾需要有分号 10 | semi: true, 11 | // 使用单引号 12 | singleQuote: true, 13 | // 对象的 key 仅在必要时用引号 14 | quoteProps: 'as-needed', 15 | // jsx 不使用单引号,而使用双引号 16 | jsxSingleQuote: false, 17 | // 末尾需要有逗号 18 | trailingComma: 'all', 19 | // 大括号内的首尾需要空格 20 | bracketSpacing: true, 21 | // jsx 标签的反尖括号需要换行 22 | bracketSameLine: false, 23 | // 箭头函数,只有一个参数的时候,也需要括号 24 | arrowParens: 'always', 25 | // 每个文件格式化的范围是文件的全部内容 26 | rangeStart: 0, 27 | rangeEnd: Infinity, 28 | // 不需要写文件开头的 @prettier 29 | requirePragma: false, 30 | // 不需要自动在文件开头插入 @prettier 31 | insertPragma: false, 32 | // 使用默认的折行标准 33 | proseWrap: 'preserve', 34 | // 根据显示样式决定 html 要不要折行 35 | htmlWhitespaceSensitivity: 'css', 36 | // vue 文件中的 script 和 style 内不用缩进 37 | vueIndentScriptAndStyle: false, 38 | // 换行符使用 lf 39 | endOfLine: 'lf', 40 | // 格式化内嵌代码 41 | embeddedLanguageFormatting: 'auto', 42 | } 43 | -------------------------------------------------------------------------------- /packages/origine2/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | WebGAL Terre 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/origine2/lingui.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('@lingui/conf').LinguiConfig} */ 2 | module.exports = { 3 | locales: ["en", "zhCn","ja"], 4 | sourceLocale:"zhCn", 5 | fallbackLocales:{ 6 | default:'zhCn', 7 | }, 8 | catalogs: [ 9 | { 10 | path: "/src/locales/{locale}", 11 | include: ["src"], 12 | }, 13 | ], 14 | }; 15 | -------------------------------------------------------------------------------- /packages/origine2/openapi.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * IMPORTANT: Start WebGAL Terre Sever before generating API!!! 3 | */ 4 | 5 | import axios from 'axios'; 6 | import {writeFileSync} from 'fs'; 7 | import { exec } from 'child_process' 8 | import { env } from 'process'; 9 | 10 | let WEBGAL_PORT = 3000; // default port 11 | if (env.WEBGAL_PORT) { 12 | WEBGAL_PORT = Number.parseInt(env.WEBGAL_PORT); 13 | }; 14 | 15 | const SWAGGER_URL = `http://localhost:${WEBGAL_PORT + 1}/api-json`; 16 | const SWAGGER_JSON_PATH = './src/config/swagger.json'; 17 | const API_OUTPUT_PATH = './src/api'; 18 | 19 | async function downloadSwaggerJson(): Promise { 20 | try { 21 | const response = await axios.get(SWAGGER_URL); 22 | writeFileSync(SWAGGER_JSON_PATH, JSON.stringify(response.data, null, 2)); 23 | console.log('Swagger JSON downloaded successfully.'); 24 | } catch (error) { 25 | console.error('Error downloading Swagger JSON. Have you started the WebGAL Terre Sever?', error); 26 | } 27 | } 28 | 29 | function generateTypescriptApi(): void { 30 | exec( 31 | `swagger-typescript-api -p ${SWAGGER_JSON_PATH} -o ${API_OUTPUT_PATH} --axios`, 32 | (error, stdout, stderr) => { 33 | if (error) { 34 | console.error('Error generating TypeScript API:', error.message); 35 | return; 36 | } 37 | console.log('TypeScript API generated successfully.'); 38 | } 39 | ); 40 | } 41 | 42 | async function main(): Promise { 43 | await downloadSwaggerJson(); 44 | generateTypescriptApi(); 45 | } 46 | 47 | main(); 48 | -------------------------------------------------------------------------------- /packages/origine2/public/monaco-iframe/min/vs/base/browser/ui/codicons/codicon/codicon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenWebGAL/WebGAL_Terre/fe4d14e9b46e84ce29504ee0019b95c4712ac9a5/packages/origine2/public/monaco-iframe/min/vs/base/browser/ui/codicons/codicon/codicon.ttf -------------------------------------------------------------------------------- /packages/origine2/public/monaco-iframe/min/vs/base/common/worker/simpleWorker.nls.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) 4 | * Released under the MIT license 5 | * https://github.com/microsoft/vscode/blob/main/LICENSE.txt 6 | *-----------------------------------------------------------*/define("vs/base/common/worker/simpleWorker.nls",{"vs/base/common/platform":["_"],"vs/editor/common/languages":["array","boolean","class","constant","constructor","enumeration","enumeration member","event","field","file","function","interface","key","method","module","namespace","null","number","object","operator","package","property","string","struct","type parameter","variable","{0} ({1})"]}); 7 | 8 | //# sourceMappingURL=../../../../../min-maps/vs/base/common/worker/simpleWorker.nls.js.map -------------------------------------------------------------------------------- /packages/origine2/public/wasm/onigasm.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenWebGAL/WebGAL_Terre/fe4d14e9b46e84ce29504ee0019b95c4712ac9a5/packages/origine2/public/wasm/onigasm.wasm -------------------------------------------------------------------------------- /packages/origine2/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | background-color: var(--bg-root); 3 | width: 100%; 4 | height: 100%; 5 | } 6 | 7 | .App-logo { 8 | height: 40vmin; 9 | pointer-events: none; 10 | } 11 | 12 | @media (prefers-reduced-motion: no-preference) { 13 | .App-logo { 14 | animation: App-logo-spin infinite 20s linear; 15 | } 16 | } 17 | 18 | @keyframes App-logo-spin { 19 | from { 20 | transform: rotate(0deg); 21 | } 22 | to { 23 | transform: rotate(360deg); 24 | } 25 | } -------------------------------------------------------------------------------- /packages/origine2/src/api/index.ts: -------------------------------------------------------------------------------- 1 | import {Api} from "@/api/Api"; 2 | 3 | export const api = new Api({baseURL:'/'}).api; 4 | -------------------------------------------------------------------------------- /packages/origine2/src/assets/font-family.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'JetBrains Mono'; /* 自定义的字体名称 */ 3 | /*noinspection CssUnknownTarget*/ 4 | src: url('fonts/JetBrainsMono-Regular.ttf') format('truetype'); /* 字体文件的路径和格式 */ 5 | } 6 | -------------------------------------------------------------------------------- /packages/origine2/src/assets/fonts/JetBrainsMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenWebGAL/WebGAL_Terre/fe4d14e9b46e84ce29504ee0019b95c4712ac9a5/packages/origine2/src/assets/fonts/JetBrainsMono-Regular.ttf -------------------------------------------------------------------------------- /packages/origine2/src/components/Assets/Assets.module.scss: -------------------------------------------------------------------------------- 1 | .controll { 2 | display: flex; 3 | flex-wrap: wrap; 4 | padding: 8px; 5 | gap: 4px; 6 | align-items: center; 7 | border-bottom: var(--border-sm); 8 | } 9 | 10 | .fileUploadContainer { 11 | display: flex; 12 | align-items: center; 13 | justify-content: center; 14 | flex-flow: column; 15 | gap: 1rem; 16 | } 17 | 18 | .fileSelectInput { 19 | width: 300px; 20 | border: var(--border-md); 21 | border-radius: var(--radius-md); 22 | padding: 15px; 23 | font-size: 16px; 24 | outline: none; 25 | cursor: pointer; 26 | } 27 | 28 | .fileSelectInput:focus { 29 | border: var(--border-primary-sm); 30 | box-shadow: var(--shadow-primary-md); 31 | } 32 | 33 | .inputDanger { 34 | border-color: var(--danger) !important; 35 | } 36 | 37 | .inputDanger::after { 38 | border-bottom: var(--border-danger-lg) !important; 39 | } -------------------------------------------------------------------------------- /packages/origine2/src/components/Assets/FileElement.module.scss: -------------------------------------------------------------------------------- 1 | .file { 2 | display: flex; 3 | flex-direction: row; 4 | align-items: center; 5 | gap: 2px; 6 | padding: 0 8px; 7 | cursor: pointer; 8 | height: 28px; 9 | border-radius: var(--radius-md); 10 | } 11 | 12 | .file > button { 13 | visibility: hidden; 14 | } 15 | 16 | .file:hover { 17 | background: var(--bg-button-hover); 18 | } 19 | 20 | .file:hover > button { 21 | visibility: visible; 22 | } 23 | 24 | .mosaicBg { 25 | background-image: 26 | linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%), 27 | linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%), 28 | linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%), 29 | linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%); 30 | background-size: 20px 20px; 31 | background-position: 0 0, 0 10px, 10px -10px, -10px 0px; 32 | } 33 | 34 | .inputDanger { 35 | border-color: var(--danger) !important; 36 | } 37 | 38 | .inputDanger::after { 39 | border-bottom: var(--border-danger-lg) !important; 40 | } -------------------------------------------------------------------------------- /packages/origine2/src/components/Assets/Upload.module.scss: -------------------------------------------------------------------------------- 1 | .upload { 2 | position: relative; 3 | 4 | .upload-box { 5 | padding: 0.5rem; 6 | text-align: center; 7 | } 8 | 9 | .upload-input { 10 | position: absolute; 11 | top: 0; 12 | left: 0; 13 | bottom: 0; 14 | right: 0; 15 | width: 100%; 16 | height: 100%; 17 | opacity: 0; 18 | } 19 | 20 | .upload-file { 21 | display: flex; 22 | max-width: 100%; 23 | height: 1rem; 24 | margin: 0.5rem 0 0.5rem; 25 | 26 | >img { 27 | height: 100%; 28 | margin-right: .25rem; 29 | } 30 | 31 | >span { 32 | max-width: calc(100% - 4rem); 33 | height: 100%; 34 | text-overflow: ellipsis; 35 | text-wrap: nowrap; 36 | 37 | overflow: hidden; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /packages/origine2/src/components/Assets/Upload.tsx: -------------------------------------------------------------------------------- 1 | import styles from './Upload.module.scss'; 2 | 3 | import { ChangeEventHandler, useState } from 'react'; 4 | import { classNames } from 'primereact/utils'; 5 | import { bundleIcon, ArrowUpload32Filled, ArrowUpload32Regular, Delete20Regular, Delete20Filled } from "@fluentui/react-icons"; 6 | import {t} from '@lingui/macro'; 7 | import { List } from '@fluentui/react'; 8 | import { getFileIcon } from '@/utils/getFileIcon'; 9 | 10 | export type IUploadProps = { 11 | name?: string; 12 | className?: string; 13 | title?: string; 14 | multiple?: boolean; 15 | onChange?: ChangeEventHandler; 16 | }; 17 | 18 | const ArrowUploadIcon = bundleIcon(ArrowUpload32Filled, ArrowUpload32Regular); 19 | const ClosedCaptionIcon = bundleIcon(Delete20Filled, Delete20Regular); 20 | const getFiles = (fileList?: FileList|null) => { 21 | if (!fileList) return []; 22 | 23 | const files = []; 24 | for (const file of fileList) { 25 | files.push(file.name) 26 | } 27 | return files; 28 | } 29 | 30 | export default function Upload({ name, className, title, multiple, onChange }: IUploadProps) { 31 | const [files, setFiles] = useState([]); 32 | 33 | const onChangeHandler: ChangeEventHandler = (ev) => { 34 | setFiles(getFiles(ev.target.files)) 35 | onChange?.(ev); 36 | }; 37 | 38 | return
39 |
40 | 41 |
{t`点击或拖拽文件至此上传`}
42 | 43 |
44 |
45 | icon 46 | {file} 47 |
}/> 48 |
; 49 | } -------------------------------------------------------------------------------- /packages/origine2/src/components/ColorPickerPopup/colorPickerPopup.module.scss: -------------------------------------------------------------------------------- 1 | .container { 2 | display: flex; 3 | flex-direction: row; 4 | justify-content: start; 5 | align-items: center; 6 | gap: 0.5rem; 7 | } 8 | 9 | .previewColor { 10 | margin: 10px 0; 11 | width: 50px; 12 | height: 50px; 13 | border-radius: 4px; 14 | border: var(--border-md); 15 | color: #000000; 16 | } 17 | 18 | .row { 19 | display: flex; 20 | gap: 10px; 21 | } 22 | 23 | .sliders { 24 | display: flex; 25 | flex-direction: column; 26 | justify-content: center; 27 | } 28 | 29 | .actions { 30 | display: flex; 31 | flex-direction: row; 32 | justify-content: end; 33 | gap: 0.5rem; 34 | } -------------------------------------------------------------------------------- /packages/origine2/src/components/IconCreator/iconCreator.module.scss: -------------------------------------------------------------------------------- 1 | .mosaicBg { 2 | background-image: 3 | linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%), 4 | linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%), 5 | linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%), 6 | linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%); 7 | background-size: 20px 20px; 8 | background-position: 0 0, 0 10px, 10px -10px, -10px 0px; 9 | } 10 | 11 | .canvasContainer { 12 | position: relative; 13 | width: 100%; 14 | aspect-ratio: 1/1; 15 | background-color: transparent !important; 16 | border-radius: 0 !important; 17 | border: var(--border-lg) !important; 18 | } 19 | 20 | .canvas { 21 | position: absolute; 22 | top: 0; 23 | left: 0; 24 | width: 100%; 25 | height: 100%; 26 | } 27 | 28 | .fileInputButton { 29 | padding: 0 !important; 30 | min-width: 0 !important; 31 | } 32 | 33 | .fileInputButton label { 34 | cursor: pointer; 35 | padding: 5px 12px; 36 | } 37 | 38 | .title { 39 | display: block; 40 | font-weight: 600; 41 | } 42 | 43 | .previewContainer { 44 | width: 100%; 45 | height: 100%; 46 | display: grid; 47 | grid-template-columns: 1fr 1fr 1fr; 48 | grid-template-rows: 1fr 1fr; 49 | gap: 1rem; 50 | padding: 1rem; 51 | } 52 | 53 | .preview { 54 | width: 100%; 55 | height: 100%; 56 | display: flex; 57 | flex-direction: column; 58 | justify-content: space-evenly; 59 | align-items: center; 60 | } 61 | 62 | .previewIcon { 63 | width: 100%; 64 | aspect-ratio: 1/1; 65 | } 66 | 67 | .previewIcon img { 68 | width: 100%; 69 | aspect-ratio: 1/1; 70 | object-fit: contain; 71 | } 72 | 73 | .preview span { 74 | display: block; 75 | text-align: center; 76 | font-weight: 600; 77 | font-size: smaller; 78 | } -------------------------------------------------------------------------------- /packages/origine2/src/components/Provider/GameEditorProvider.tsx: -------------------------------------------------------------------------------- 1 | import { redirect } from "@/hooks/useHashRoute"; 2 | import { gameListFetcher } from "@/pages/dashboard/DashBoard"; 3 | import useEditorStore from "@/store/useEditorStore"; 4 | import { GameEditorContext, createGameEditorStore } from "@/store/useGameEditorStore"; 5 | import { Spinner } from "@fluentui/react-components"; 6 | import { ReactNode, useRef } from "react"; 7 | import useSWR from "swr"; 8 | 9 | const GameEditorProvider = ({ children }: { children: ReactNode }) => { 10 | const page = useEditorStore.use.page(); 11 | const gameDir = useEditorStore.use.subPage(); 12 | 13 | if (page !== 'game' || !gameDir) { 14 | redirect('dashboard', 'game'); 15 | }; 16 | 17 | const { data: gameList, isLoading: gameListLoading } = useSWR("game-list", gameListFetcher); 18 | const fristLoading = gameListLoading && !gameList; 19 | const inGameList = gameList && gameList.length > 0 && gameList.some((game) => game.dir === gameDir); 20 | 21 | if (!fristLoading && !inGameList) { 22 | redirect('dashboard', 'game'); 23 | } 24 | 25 | return ( 26 | <> 27 | { 28 | fristLoading && 29 |
30 | 31 |
32 | } 33 | {inGameList && !fristLoading && {children}} 34 | 35 | ); 36 | }; 37 | 38 | const GameEditorContextProvider = ({ children }: { children: ReactNode }) => { 39 | const gameName = useEditorStore.use.subPage(); 40 | const gameEditorStore = useRef(createGameEditorStore(gameName)).current; 41 | return ( 42 | 43 | {children} 44 | 45 | ); 46 | }; 47 | 48 | export default GameEditorProvider; -------------------------------------------------------------------------------- /packages/origine2/src/components/TagTitleWrapper/TagTitleWrapper.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from "react"; 2 | import s from './tagTitleWrapper.module.scss'; 3 | 4 | interface ITagTitleWrapper{ 5 | title:string 6 | extra?:ReactNode 7 | } 8 | export default function TagTitleWrapper(props:ITagTitleWrapper){ 9 | return
10 |
11 | {props.title} 12 |
13 | {props.extra&&
{props.extra}
} 14 |
; 15 | } 16 | -------------------------------------------------------------------------------- /packages/origine2/src/components/TagTitleWrapper/tagTitleWrapper.module.scss: -------------------------------------------------------------------------------- 1 | .title_wrapper{ 2 | display: flex; 3 | align-items: center; 4 | padding: 8px; 5 | } 6 | 7 | .title{ 8 | font-size: 90%; 9 | color: var(--primary); 10 | font-weight: bold; 11 | } 12 | 13 | .extra{ 14 | display: flex; 15 | align-items: center; 16 | margin-left: auto; 17 | } 18 | -------------------------------------------------------------------------------- /packages/origine2/src/components/Transformer/transformer.module.scss: -------------------------------------------------------------------------------- 1 | .surface { 2 | display: flex; 3 | flex-direction: row; 4 | padding: 0 !important; 5 | } 6 | 7 | .input { 8 | min-width: 0 !important; 9 | width: 100%; 10 | } 11 | 12 | .left { 13 | display: flex; 14 | flex-direction: column; 15 | justify-content: center; 16 | align-items: center; 17 | gap: 0.25rem; 18 | flex-grow: 1; 19 | padding: 0.25rem; 20 | width: 150px; 21 | } 22 | 23 | .buttons { 24 | width: 100%; 25 | display: flex; 26 | flex-direction: row; 27 | justify-content: space-around; 28 | align-items: center; 29 | gap: 0.25rem; 30 | } 31 | 32 | .offsetGrid { 33 | display: grid; 34 | grid-template-columns: repeat(3, 1fr); 35 | grid-template-rows: repeat(3, 1fr); 36 | gap: 0.25rem; 37 | aspect-ratio: 1 / 1; 38 | justify-content: center; 39 | align-items: center; 40 | max-width: 80px; 41 | } 42 | 43 | .scaleGrid { 44 | display: grid; 45 | grid-template-columns: 1fr; 46 | grid-template-rows: repeat(2, 1fr); 47 | gap: 0.25rem; 48 | justify-content: center; 49 | align-items: center; 50 | } 51 | 52 | .right { 53 | padding-right: 0.25rem; 54 | } 55 | -------------------------------------------------------------------------------- /packages/origine2/src/components/iconWrapper/IconWrapper.tsx: -------------------------------------------------------------------------------- 1 | interface IIconWrapperProps { 2 | src: any; 3 | size?: number; 4 | iconSize?: number; 5 | } 6 | 7 | 8 | export default function IconWrapper(props: IIconWrapperProps) { 9 | const { size = 16 } = props; 10 | const { iconSize = 16 } = props; 11 | return
19 | icon 23 |
; 24 | } 25 | -------------------------------------------------------------------------------- /packages/origine2/src/components/message/Message.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef, ReactNode, useImperativeHandle, useRef, useState } from "react"; 2 | import { useValue } from "../../hooks/useValue"; 3 | import styles from "./message.module.scss"; 4 | 5 | // 传递的 Refs 的类型声明 6 | export interface TestRefRef { 7 | showMessage: (message: string, delay: number) => void; 8 | } 9 | 10 | // 子组件的传入参数 11 | interface TestRefProps { 12 | children?: ReactNode | null; 13 | } 14 | 15 | // 单个信息的接口 16 | 17 | interface IMessage { 18 | content: string, 19 | key: string 20 | } 21 | 22 | // 使用 forwardRef 来进行 Ref 转发 23 | export const Message = forwardRef( 24 | (props, ref) => { 25 | const currentMessage = useValue([]); 26 | const unmountMessage = (key: string) => { 27 | currentMessage.set(currentMessage.value.filter(e => e.key !== key)); 28 | }; 29 | 30 | const showMessage = (message: string, delay: number) => { 31 | const key = Math.random().toString().slice(0, 5); 32 | const messageObject: IMessage = { content: message, key }; 33 | currentMessage.set([messageObject]); 34 | setTimeout(() => unmountMessage(key), delay); 35 | }; 36 | // useImperativeHandle 可以让你在使用 ref 时自定义暴露给父组件的实例值 37 | useImperativeHandle(ref, () => ({ 38 | showMessage 39 | })); 40 | 41 | const messageList = currentMessage.value.map(e => { 42 | return
43 | {e.content} 44 |
; 45 | }); 46 | 47 | return (
48 | {messageList} 49 |
); 50 | } 51 | ); 52 | -------------------------------------------------------------------------------- /packages/origine2/src/components/message/message.module.scss: -------------------------------------------------------------------------------- 1 | .main { 2 | width: 100%; 3 | display: flex; 4 | flex-flow: column; 5 | position: fixed; 6 | align-items: center; 7 | top: 0; 8 | left: 0; 9 | pointer-events: none; 10 | z-index: 999; 11 | } 12 | 13 | .singleMessage { 14 | //border: 1px solid; 15 | background: var(--bg-card); 16 | font-size: 115%; 17 | color: var(--primary); 18 | padding: 0.5em 0.5em 0.5em 0.5em; 19 | margin: 0.5em 0.5em 0.5em 0.5em; 20 | min-width: 350px; 21 | border-radius: var(--radius-md); 22 | box-shadow: var(--shadow-lg); 23 | border: var(--border-md) 24 | } 25 | -------------------------------------------------------------------------------- /packages/origine2/src/components/terreToggle/TerreToggle.tsx: -------------------------------------------------------------------------------- 1 | import { Switch } from "@fluentui/react-components"; 2 | 3 | interface ITerreToggle{ 4 | title:string, 5 | onChange:(newValue:boolean)=>void, 6 | onText:string, 7 | offText:string, 8 | isChecked:boolean 9 | } 10 | 11 | export default function TerreToggle(props:ITerreToggle){ 12 | return ( 13 |
14 | props.onChange(data.checked ?? false)} 17 | /> 18 | {props.isChecked ? props.onText : props.offText} 19 |
20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /packages/origine2/src/config/info.ts: -------------------------------------------------------------------------------- 1 | import { version } from '~build/package'; 2 | import now from '~build/time'; 3 | 4 | export interface Info { 5 | version: string, 6 | buildTime: Date, 7 | } 8 | 9 | export const __INFO: Info = { 10 | version, 11 | buildTime: now, 12 | }; 13 | -------------------------------------------------------------------------------- /packages/origine2/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenWebGAL/WebGAL_Terre/fe4d14e9b46e84ce29504ee0019b95c4712ac9a5/packages/origine2/src/favicon.ico -------------------------------------------------------------------------------- /packages/origine2/src/hooks/useGenSyncRef.ts: -------------------------------------------------------------------------------- 1 | import { useSelector } from 'react-redux'; 2 | import { useEffect, useRef } from 'react'; 3 | 4 | /** 5 | * 生成一个和redux自动同步的Ref对象 6 | */ 7 | export function useGenSyncRef( 8 | selector: (state: TState) => Selected, 9 | ): { readonly current: Selected } { 10 | const Store = useSelector(selector); 11 | const Ref = useRef(Store); 12 | useEffect(() => { 13 | Ref.current = Store; 14 | }, [Store]); 15 | return Ref; 16 | } 17 | -------------------------------------------------------------------------------- /packages/origine2/src/hooks/useHashRoute.ts: -------------------------------------------------------------------------------- 1 | import { routers } from "@/App"; 2 | import useEditorStore from "@/store/useEditorStore"; 3 | import { useEffect } from "react"; 4 | 5 | export type IPage = 'dashboard' | 'game' | 'template'; 6 | 7 | export const redirect = (page: IPage, subPage?: string) => { 8 | window.location.hash = `${routers[page].url}${subPage ? `/${subPage}` : ''}`; 9 | }; 10 | 11 | export default function useHashRoute() { 12 | const updatePage = useEditorStore.use.updatePage(); 13 | const updateSubPage = useEditorStore.use.updateSubPage(); 14 | 15 | useEffect( 16 | () => { 17 | const handleHashChange = () => { 18 | const [, _page, _subPage] = window.location.hash.split('/'); 19 | if (['game', 'template'].includes(_page) && _subPage && _subPage.length > 0) { 20 | updatePage(_page as IPage); 21 | try { 22 | updateSubPage(decodeURIComponent(_subPage)); 23 | } catch (error) { 24 | updateSubPage(_page); 25 | redirect('dashboard', _page); 26 | } 27 | } else if (_page === 'dashboard' && ['game', 'template'].includes(_subPage)) { 28 | updatePage('dashboard'); 29 | updateSubPage(_subPage); 30 | } else { 31 | updateSubPage('game'); 32 | redirect('dashboard', 'game'); 33 | } 34 | }; 35 | handleHashChange(); 36 | window.addEventListener('hashchange', handleHashChange); 37 | return () => { 38 | window.removeEventListener('hashchange', handleHashChange); 39 | }; 40 | }, 41 | [] 42 | ); 43 | 44 | } -------------------------------------------------------------------------------- /packages/origine2/src/hooks/useLanguage.ts: -------------------------------------------------------------------------------- 1 | import { logger } from '@/utils/logger'; 2 | import useEditorStore from '@/store/useEditorStore'; 3 | import {useEffect} from 'react'; 4 | import {i18nActivate} from "@/main"; 5 | 6 | export default function useLanguage() { 7 | const language = useEditorStore.use.language(); 8 | 9 | useEffect( 10 | () => { 11 | logger.info('设置语言: ' + language); 12 | i18nActivate(language); 13 | }, 14 | [language] 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/origine2/src/hooks/useValue.ts: -------------------------------------------------------------------------------- 1 | import {useState} from "react"; 2 | 3 | const holdMap = new Map(); 4 | 5 | export function useValue(initialState: T, isHold?: boolean, key?: string) { 6 | const holdKey = key ?? '__value_hold_key__'; 7 | const fromHoldValue = holdMap.get(holdKey); 8 | const [value, setValue] = useState(fromHoldValue ?? initialState); 9 | return { 10 | _value: value, 11 | set: function (newValue: T) { 12 | this._value = newValue; 13 | if (isHold) { 14 | holdMap.set(holdKey, newValue); 15 | } 16 | setValue(newValue); 17 | }, 18 | get value() { 19 | if (isHold) { 20 | const result = holdMap.get(holdKey); 21 | if (result) { 22 | return result as T; 23 | } 24 | } 25 | return this._value; 26 | }, 27 | set value(newValue) { 28 | this.set(newValue); 29 | } 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /packages/origine2/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | * { 11 | box-sizing: border-box; 12 | } 13 | 14 | code { 15 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 16 | monospace; 17 | } 18 | 19 | #root { 20 | height: 100vh; 21 | width: 100vw; 22 | overflow: hidden; 23 | } -------------------------------------------------------------------------------- /packages/origine2/src/pages/dashboard/GamePreview.tsx: -------------------------------------------------------------------------------- 1 | import { GameInfoDto } from "@/api/Api"; 2 | import styles from "./gamepreview.module.scss"; 3 | import { Button } from "@fluentui/react-components"; 4 | import { Dismiss48Filled, Dismiss48Regular, bundleIcon } from "@fluentui/react-icons"; 5 | 6 | interface IGamePreviewProps { 7 | currentGame: string; 8 | setCurrentGame: (currentGame: string | null) => void; 9 | gameInfo: GameInfoDto; 10 | } 11 | 12 | export default function GamePreview(props: IGamePreviewProps) { 13 | const DismissIcon = bundleIcon(Dismiss48Filled, Dismiss48Regular); 14 | 15 | return
16 |
17 |
20 | {/* eslint-disable-next-line react/iframe-missing-sandbox */} 21 |