├── .editorconfig ├── .github ├── FUNDING.yml └── workflows │ ├── ci.yml │ ├── demo.yml │ ├── docs.yml │ ├── playwright.yml │ └── release.yml ├── .gitignore ├── .gitmodules ├── .husky ├── post-checkout ├── post-commit ├── post-merge ├── pre-commit └── pre-push ├── .npmrc ├── .vscode ├── extensions.json └── settings.json ├── LICENSE ├── README.md ├── amplify.yml ├── demo ├── ai │ ├── .gitignore │ ├── README.md │ ├── adv.config.json │ ├── index.adv.json │ └── package.json ├── flow │ ├── .gitignore │ ├── .npmrc │ ├── README.md │ ├── adv.config.ts │ ├── adv │ │ ├── chapters │ │ │ └── 1.chapter.ts │ │ ├── characters │ │ │ ├── mitsuha.character.ts │ │ │ └── taki.character.ts │ │ ├── scenes │ │ │ ├── taki-bedroom.scene.ts │ │ │ ├── taki-phone.scene.ts │ │ │ └── taki-school.scene.ts │ │ └── setups │ │ │ ├── adv.ts │ │ │ └── main.ts │ ├── package.json │ ├── public │ │ └── data │ │ │ └── tmp.json │ ├── scripts │ │ └── generate.ts │ ├── theme.config.ts │ ├── tsconfig.json │ └── vite.config.ts ├── love │ ├── .gitignore │ ├── adv.config.ts │ ├── assets │ │ └── index.ts │ ├── netlify.toml │ ├── package.json │ ├── pages │ │ ├── about.md │ │ └── start.vue │ ├── public │ │ ├── favicon.svg │ │ ├── img │ │ │ ├── bg │ │ │ │ ├── bbburst-love.svg │ │ │ │ └── stacked-steps-haikei.svg │ │ │ └── characters │ │ │ │ ├── yun-alpha-compressed.webp │ │ │ │ └── yun-good-alpha-compressed.webp │ │ ├── md │ │ │ └── chapters │ │ │ │ └── 1 │ │ │ │ └── intro.adv.md │ │ └── robots.txt │ ├── tsconfig.json │ └── vercel.json ├── starter │ ├── .gitignore │ ├── README.md │ ├── adv.config.ts │ ├── assets │ │ └── index.ts │ ├── components │ │ └── BaseFooter.vue │ ├── modules │ │ └── pwa.ts │ ├── netlify.toml │ ├── package.json │ ├── public │ │ ├── favicon.svg │ │ ├── icons │ │ │ ├── pwa-192x192.png │ │ │ └── pwa-512x512.png │ │ ├── img │ │ │ ├── bg │ │ │ │ └── night.jpg │ │ │ ├── characters │ │ │ │ ├── he │ │ │ │ │ ├── he-smile.png │ │ │ │ │ └── he.png │ │ │ │ └── she │ │ │ │ │ └── she.png │ │ │ └── icons │ │ │ │ ├── favicon-32x32.png │ │ │ │ └── safari-pinned-tab.svg │ │ ├── md │ │ │ └── chapters │ │ │ │ ├── 1 │ │ │ │ └── 仓鼠的笼子.adv.md │ │ │ │ └── 2 │ │ │ │ └── wlwz.adv.md │ │ └── robots.txt │ ├── setup │ │ └── index.ts │ ├── tsconfig.json │ └── vercel.json └── use-dialog-box │ ├── .gitignore │ ├── README.md │ ├── index.html │ ├── package.json │ ├── public │ ├── main.md │ └── vite.svg │ ├── src │ ├── App.vue │ ├── assets │ │ └── vue.svg │ ├── components │ │ └── AdvDialog.vue │ ├── main.ts │ ├── style.css │ └── vite-env.d.ts │ ├── tsconfig.json │ ├── tsconfig.node.json │ └── vite.config.ts ├── docs ├── .gitignore ├── .vitepress │ ├── config │ │ ├── constants.ts │ │ ├── head.ts │ │ └── index.ts │ └── theme │ │ ├── components │ │ ├── HomePage.vue │ │ ├── ParallelFigure.vue │ │ ├── VPHero.vue │ │ ├── VPHomeHero.vue │ │ ├── agui │ │ │ └── AGUIDemoBlock.vue │ │ ├── atoms │ │ │ └── Technology.vue │ │ └── demo │ │ │ ├── AssetsExplorerDemo.vue │ │ │ ├── ButtonDemo.vue │ │ │ ├── CheckboxDemo.vue │ │ │ ├── DemoSidebar.vue │ │ │ ├── IconButtonDemo.vue │ │ │ ├── InputDemo.vue │ │ │ ├── InputNumberDemo.vue │ │ │ ├── NumberFieldDemo.vue │ │ │ ├── NumberSliderDemo.vue │ │ │ ├── SelectDemo.vue │ │ │ ├── SliderDemo.vue │ │ │ ├── TabsDemo.vue │ │ │ └── TreeDemo.vue │ │ ├── index.ts │ │ └── styles │ │ ├── helpers.scss │ │ ├── index.scss │ │ └── vars.scss ├── README.md ├── about │ ├── design │ │ ├── grammar.md │ │ ├── i18n.md │ │ ├── index.md │ │ ├── storage.md │ │ └── ui.md │ ├── dev │ │ ├── build.md │ │ ├── dependencies.md │ │ ├── faq.md │ │ ├── features.md │ │ ├── icons.md │ │ ├── index.md │ │ ├── parser.md │ │ ├── ref.md │ │ ├── render.md │ │ ├── standard.md │ │ ├── stores.md │ │ └── todo.md │ ├── future │ │ └── index.md │ └── index.md ├── agui │ ├── components │ │ ├── assets-explorer.md │ │ ├── button.md │ │ ├── checkbox.md │ │ ├── input-number.md │ │ ├── input.md │ │ ├── layout.md │ │ ├── menu.md │ │ ├── number-slider.md │ │ ├── radio.md │ │ ├── select.md │ │ ├── sidebar.md │ │ ├── slider.md │ │ ├── tabs.md │ │ └── tree.md │ ├── index.md │ └── quick-start.md ├── ai │ ├── index.md │ ├── mcp.md │ └── ref.md ├── contributing │ ├── index.md │ └── writing-guide.md ├── ecosystem │ └── index.md ├── en │ └── guide │ │ └── index.md ├── guide │ ├── advscript │ │ ├── code.md │ │ ├── faq.md │ │ ├── index.md │ │ └── syntax.md │ ├── config │ │ ├── animation.md │ │ └── index.md │ ├── editor │ │ ├── basic.md │ │ ├── flow.md │ │ ├── index.md │ │ ├── script.md │ │ └── vrm.md │ ├── export.md │ ├── features.md │ ├── index.md │ ├── mode.md │ ├── quick-start.md │ ├── record.md │ └── typescript │ │ └── how.md ├── index.md ├── netlify.toml ├── package.json ├── public │ ├── favicon.svg │ ├── robots.txt │ └── schema │ │ └── adv.config.schema.json ├── resources │ ├── index.md │ ├── learning.md │ └── showcases.md ├── typedoc.json ├── uno.config.ts └── vite.config.ts ├── editor ├── README.md ├── core │ ├── .env.example │ ├── .gitignore │ ├── .npmrc │ ├── README.md │ ├── app │ │ ├── app.vue │ │ ├── auth.d.ts │ │ ├── components │ │ │ ├── Counter.vue │ │ │ ├── DarkToggle.vue │ │ │ ├── Footer.vue │ │ │ ├── InputEntry.vue │ │ │ ├── Logos.vue │ │ │ ├── PageView.vue │ │ │ ├── dialogs │ │ │ │ ├── AEAboutDialog.vue │ │ │ │ ├── AEGitHubReposDialog.vue │ │ │ │ ├── AEGlobalDialogs.vue │ │ │ │ ├── AELoadOnlineConfigFileDialog.vue │ │ │ │ ├── AELoginDialog.vue │ │ │ │ ├── AEProjectSettingsDialog.vue │ │ │ │ ├── AESettingsDialog.vue │ │ │ │ └── tabs │ │ │ │ │ ├── AEProjectSettingsTab.vue │ │ │ │ │ └── AESettingsCOSTab.vue │ │ │ ├── layout │ │ │ │ ├── EditorMenubar.vue │ │ │ │ └── EditorToolbar.vue │ │ │ ├── nodes │ │ │ │ ├── HintOverlay.vue │ │ │ │ ├── MapEditor.vue │ │ │ │ ├── MathNode.ts │ │ │ │ └── NodeEditor.vue │ │ │ ├── panel │ │ │ │ ├── AEOpenAdvConfigFile.vue │ │ │ │ ├── AEOpenProject.vue │ │ │ │ ├── PanelHierarchy.vue │ │ │ │ ├── PanelInspector.vue │ │ │ │ ├── PanelProject.vue │ │ │ │ ├── PanelScene.vue │ │ │ │ ├── README.md │ │ │ │ ├── audio │ │ │ │ │ └── AEAudioPanel.vue │ │ │ │ ├── character │ │ │ │ │ ├── AECharacterCard.vue │ │ │ │ │ └── AEWindowCharacter.vue │ │ │ │ └── view │ │ │ │ │ ├── AEInspectorCharacter.vue │ │ │ │ │ ├── AEViewConsole.vue │ │ │ │ │ ├── AEViewStoryLine.vue │ │ │ │ │ ├── HierarchyView.vue │ │ │ │ │ ├── InspectorFileView.vue │ │ │ │ │ ├── InspectorView.vue │ │ │ │ │ └── actions │ │ │ │ │ └── AEAdvConfigActions.vue │ │ │ ├── scene │ │ │ │ ├── AdvGamePreview.vue │ │ │ │ ├── SceneCanvas.vue │ │ │ │ └── SceneToolbar.vue │ │ │ ├── system │ │ │ │ └── flow │ │ │ │ │ ├── AdvFlowEditor.vue │ │ │ │ │ └── styles │ │ │ │ │ ├── css-vars.scss │ │ │ │ │ ├── index.ts │ │ │ │ │ └── vue-flow.scss │ │ │ ├── tools │ │ │ │ └── BrushTool.vue │ │ │ └── user │ │ │ │ └── AEUserProfile.vue │ │ ├── composables │ │ │ ├── editor │ │ │ │ ├── index.ts │ │ │ │ └── useEditorMenubar.ts │ │ │ ├── flow │ │ │ │ ├── index.ts │ │ │ │ └── useFlowLayout.ts │ │ │ ├── index.ts │ │ │ ├── inspector │ │ │ │ ├── index.ts │ │ │ │ ├── useInspectorFileHandle.ts │ │ │ │ └── useInspectorOnlineFile.ts │ │ │ ├── useProjectSettings.ts │ │ │ └── user │ │ │ │ ├── index.ts │ │ │ │ └── useWxLogin.ts │ │ ├── config │ │ │ └── pwa.ts │ │ ├── constants │ │ │ ├── data │ │ │ │ ├── default.ts │ │ │ │ ├── game.ts │ │ │ │ └── index.ts │ │ │ ├── game-config.ts │ │ │ └── index.ts │ │ ├── layouts │ │ │ ├── README.md │ │ │ ├── default.vue │ │ │ ├── editor.vue │ │ │ └── home.vue │ │ ├── pages │ │ │ ├── [...all].vue │ │ │ ├── dashboard.vue │ │ │ ├── index.vue │ │ │ ├── login.vue │ │ │ ├── play.vue │ │ │ └── preview.vue │ │ ├── plugins │ │ │ └── baklava.client.ts │ │ ├── shims.d.ts │ │ ├── stores │ │ │ ├── brush.ts │ │ │ ├── flow.ts │ │ │ ├── useAppStore.ts │ │ │ ├── useAudioStore.ts │ │ │ ├── useCharacterStore.ts │ │ │ ├── useConsoleStore.ts │ │ │ ├── useDialogStore.ts │ │ │ ├── useFileStore.ts │ │ │ ├── useGameStore.ts │ │ │ ├── useGitHubStore.ts │ │ │ ├── useMonacoStore.ts │ │ │ ├── useOnlineStore.ts │ │ │ ├── useProjectStore.ts │ │ │ └── useUserStore.ts │ │ ├── styles │ │ │ ├── css-vars.scss │ │ │ ├── index.ts │ │ │ └── main.scss │ │ ├── types │ │ │ ├── adapter.ts │ │ │ ├── flow │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ └── utils │ │ │ ├── adapters │ │ │ └── index.ts │ │ │ ├── analystics │ │ │ ├── events │ │ │ │ ├── constants.ts │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ │ ├── cos │ │ │ ├── index.ts │ │ │ ├── upload.ts │ │ │ └── utils.ts │ │ │ ├── index.ts │ │ │ ├── log.ts │ │ │ └── map │ │ │ ├── hexagonal │ │ │ ├── config.ts │ │ │ ├── event │ │ │ │ ├── index.ts │ │ │ │ └── scale.ts │ │ │ ├── global.ts │ │ │ ├── index.ts │ │ │ ├── tiles.ts │ │ │ └── utils.ts │ │ │ └── index.ts │ ├── netlify.toml │ ├── nuxt.config.ts │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ ├── favicon.svg │ │ ├── hex-tiles │ │ │ ├── README.md │ │ │ └── isle-of-lore-2 │ │ │ │ ├── grassland │ │ │ │ ├── green │ │ │ │ │ └── grassland_dense_0.png │ │ │ │ └── winter │ │ │ │ │ └── grassland_clearing_0.png │ │ │ │ ├── mountain_oak_forest │ │ │ │ └── mountain_oak_forest_0.png │ │ │ │ └── ocean │ │ │ │ └── ocean_small_0.png │ │ ├── nuxt.svg │ │ ├── robots.txt │ │ └── vite.png │ ├── server │ │ ├── api │ │ │ ├── auth │ │ │ │ └── github.get.ts │ │ │ └── pageview.ts │ │ └── tsconfig.json │ ├── tsconfig.json │ └── uno.config.ts └── vrm │ ├── .gitignore │ ├── .vscode │ └── settings.json │ ├── README.md │ ├── index.html │ ├── locales │ ├── README.md │ ├── en.yml │ └── zh-CN.yml │ ├── netlify.toml │ ├── package.json │ ├── public │ ├── CNAME │ ├── README.md │ ├── _headers │ ├── favicon.svg │ ├── robots.txt │ └── safari-pinned-tab.svg │ ├── src │ ├── App.vue │ ├── components │ │ ├── UploadVrm.vue │ │ └── VrmUi.vue │ ├── composables │ │ ├── dark.ts │ │ └── index.ts │ ├── layouts │ │ ├── 404.vue │ │ ├── README.md │ │ ├── default.vue │ │ └── home.vue │ ├── main.ts │ ├── modules │ │ ├── README.md │ │ ├── about.ts │ │ ├── adv.ts │ │ ├── i18n.ts │ │ ├── nprogress.ts │ │ ├── pinia.ts │ │ └── pwa.ts │ ├── pages │ │ ├── [...all].vue │ │ ├── about.md │ │ └── index.vue │ ├── setup │ │ ├── index.ts │ │ ├── scene.ts │ │ └── utils.ts │ ├── shims.d.ts │ ├── stores │ │ └── vrm.ts │ ├── styles │ │ ├── index.scss │ │ └── main.css │ ├── typed-router.d.ts │ └── types.ts │ ├── tsconfig.json │ ├── unocss.config.ts │ ├── vercel.json │ └── vite.config.ts ├── eslint.config.js ├── package.json ├── packages ├── advjs │ ├── .gitignore │ ├── README.md │ ├── bin │ │ └── adv.mjs │ ├── client │ │ └── index.ts │ ├── node │ │ ├── cli │ │ │ ├── build.ts │ │ │ ├── config.ts │ │ │ ├── dev.ts │ │ │ ├── export.ts │ │ │ ├── index.ts │ │ │ └── utils.ts │ │ ├── commands │ │ │ ├── build.ts │ │ │ ├── serve.ts │ │ │ └── shared.ts │ │ ├── config │ │ │ ├── game.ts │ │ │ ├── index.ts │ │ │ └── theme.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── options.ts │ │ ├── plugins │ │ │ ├── adv │ │ │ │ ├── check.ts │ │ │ │ ├── head.ts │ │ │ │ ├── index.ts │ │ │ │ ├── markdown.ts │ │ │ │ ├── options.ts │ │ │ │ └── types.ts │ │ │ ├── extendConfig.ts │ │ │ ├── loaders.ts │ │ │ ├── preset.ts │ │ │ ├── unocss.ts │ │ │ └── virtual │ │ │ │ ├── configs.ts │ │ │ │ ├── data.ts │ │ │ │ ├── game.ts │ │ │ │ ├── index.ts │ │ │ │ ├── locales.ts │ │ │ │ ├── setups.ts │ │ │ │ ├── styles.ts │ │ │ │ └── types.ts │ │ ├── resolver.ts │ │ ├── setups │ │ │ ├── indexHtml.ts │ │ │ ├── load.ts │ │ │ └── unocss.ts │ │ ├── themes.ts │ │ ├── utils │ │ │ ├── index.ts │ │ │ └── root.ts │ │ └── vite │ │ │ └── vue.ts │ ├── package.json │ └── tsdown.config.ts ├── benchmarks │ ├── .gitignore │ ├── README.md │ ├── package.json │ └── src │ │ ├── json-xml │ │ ├── README.md │ │ ├── common.ts │ │ ├── generate.ts │ │ └── index.ts │ │ └── visit │ │ ├── README.md │ │ ├── dfs.ts │ │ ├── generate.ts │ │ ├── index.ts │ │ └── utils.ts ├── client │ ├── App.vue │ ├── README.md │ ├── assets │ │ └── index.ts │ ├── compiler │ │ ├── README.md │ │ ├── data.ts │ │ └── index.ts │ ├── components │ │ ├── adv │ │ │ ├── AdvBlack.vue │ │ │ ├── AdvChoice.vue │ │ │ ├── AdvDialog.vue │ │ │ ├── AdvHelper.vue │ │ │ ├── AdvHistory.vue │ │ │ ├── AdvOverlay.vue │ │ │ └── AdvProgress.vue │ │ ├── animation │ │ │ └── PrintWords.vue │ │ ├── base │ │ │ ├── BaseHeader.vue │ │ │ └── BaseLayer.vue │ │ ├── custom │ │ │ └── BackIcon.vue │ │ ├── devtools │ │ │ └── AdvDevTools.vue │ │ ├── features │ │ │ ├── AdvFlowChart.vue │ │ │ └── temp-data.ts │ │ ├── game │ │ │ └── AdvGame.vue │ │ ├── icons │ │ │ ├── NewYunBorderLogo.vue │ │ │ ├── NewYunLogo.vue │ │ │ └── YunLogo.vue │ │ ├── internals │ │ │ ├── AdvButton.vue │ │ │ ├── AdvContainer.vue │ │ │ ├── BackButton.vue │ │ │ ├── HorizontalDivider.vue │ │ │ └── dialog │ │ │ │ ├── AdvDialogBox.vue │ │ │ │ └── DialogControls.vue │ │ ├── menu │ │ │ ├── AdvFullscreenBtn.vue │ │ │ ├── AdvMenuPanel.vue │ │ │ ├── AdvMenuPanelTabTitle.vue │ │ │ ├── LoadMenu.vue │ │ │ ├── RightTools.vue │ │ │ ├── SaveMenu.vue │ │ │ ├── SpeechMenu.vue │ │ │ ├── settings │ │ │ │ ├── AudioVolume.vue │ │ │ │ ├── GameSettings.vue │ │ │ │ ├── MenuItem.vue │ │ │ │ ├── TextPlayPreview.vue │ │ │ │ └── ToggleSourceMd.vue │ │ │ └── speech │ │ │ │ └── SpeechSynthesis.vue │ │ ├── scene │ │ │ ├── AdvBg.vue │ │ │ ├── AdvPixiCanvas.vue │ │ │ └── AdvScene.vue │ │ ├── tachie │ │ │ ├── AdvTachieBox.vue │ │ │ └── TachieCharacter.vue │ │ └── ui │ │ │ ├── AdvGameModals.vue │ │ │ └── AdvGameUI.vue │ ├── composables │ │ ├── config.ts │ │ ├── flow │ │ │ └── README.md │ │ ├── index.ts │ │ ├── useAdvBgm.ts │ │ ├── useAdvCamera.ts │ │ ├── useAdvContext.ts │ │ ├── useAdvDialogBox.ts │ │ ├── useAdvKeys.ts │ │ ├── useAdvLogic.ts │ │ ├── useAdvNav.ts │ │ └── useAdvTachies.ts │ ├── constants │ │ └── index.ts │ ├── env.ts │ ├── index.html │ ├── index.ts │ ├── layouts │ │ └── empty.vue │ ├── locales │ │ ├── en.yml │ │ └── zh-CN.yml │ ├── main.ts │ ├── modules │ │ ├── i18n.ts │ │ ├── nprogress.ts │ │ ├── pinia.ts │ │ └── swiper.ts │ ├── package.json │ ├── pages │ │ ├── [...path].vue │ │ ├── about.md │ │ ├── flow.vue │ │ ├── game.vue │ │ ├── help.md │ │ └── loading.vue │ ├── pixi │ │ ├── game.ts │ │ ├── index.ts │ │ └── system │ │ │ ├── scene.ts │ │ │ └── tachie.ts │ ├── runtime │ │ ├── README.md │ │ ├── index.ts │ │ └── package.json │ ├── setup │ │ ├── adv.ts │ │ ├── index.ts │ │ └── main.ts │ ├── shims.d.ts │ ├── stores │ │ ├── app.ts │ │ ├── audio.ts │ │ ├── index.ts │ │ ├── settings │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── useAdvStore.ts │ │ ├── useDialogStore.ts │ │ └── useGameStore.ts │ ├── styles │ │ ├── css-vars.scss │ │ ├── index.ts │ │ ├── main.scss │ │ └── reset.scss │ ├── types │ │ ├── context.ts │ │ ├── index.ts │ │ └── menu.ts │ ├── uno.config.ts │ └── utils │ │ ├── index.ts │ │ ├── init.ts │ │ ├── speech.ts │ │ └── statement.ts ├── core │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── app │ │ │ ├── index.ts │ │ │ └── storage.ts │ │ ├── composables │ │ │ ├── README.md │ │ │ ├── dark.ts │ │ │ ├── index.ts │ │ │ ├── sound │ │ │ │ ├── index.ts │ │ │ │ ├── store.ts │ │ │ │ └── types.ts │ │ │ ├── useBeforeUnload.ts │ │ │ ├── useImages.ts │ │ │ └── useScreenLock.ts │ │ ├── config │ │ │ └── index.ts │ │ ├── constants │ │ │ ├── index.ts │ │ │ └── nodes.ts │ │ ├── index.ts │ │ ├── pixi │ │ │ ├── assets │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── utils │ │ │ ├── functions.ts │ │ │ ├── index.ts │ │ │ ├── ns.ts │ │ │ ├── screenshots.ts │ │ │ └── time.ts │ │ └── vrm │ │ │ └── index.ts │ ├── tsconfig.json │ └── tsdown.config.ts ├── create-adv │ ├── README.md │ ├── bin │ │ └── index.mjs │ ├── package.json │ ├── src │ │ ├── cli.ts │ │ ├── config.ts │ │ ├── index.ts │ │ ├── theme.ts │ │ └── utils.ts │ └── templates │ │ ├── template-adv │ │ ├── _gitignore │ │ └── index.adv.md │ │ └── template-plugin │ │ ├── README.md │ │ ├── build.config.ts │ │ └── package.json ├── devtools │ ├── README.md │ ├── build.config.ts │ ├── client │ │ ├── core.ts │ │ └── hooks.ts │ ├── package.json │ ├── src │ │ ├── app.js │ │ ├── constant.ts │ │ ├── dirs.ts │ │ ├── index.ts │ │ ├── views │ │ │ └── Main.vue │ │ └── vite.ts │ ├── types.d.ts │ └── types │ │ ├── global.ts │ │ └── index.ts ├── examples │ ├── shims.d.ts │ ├── test.adv │ ├── test.adv.md │ ├── 小城之春.fountain │ ├── 雷雨.adv.md │ └── 鸡汤来咯.adv.md ├── flow │ ├── README.md │ ├── components │ │ ├── index.ts │ │ └── nodes │ │ │ ├── FlowWrapperNode.vue │ │ │ └── index.ts │ ├── composables │ │ ├── index.ts │ │ ├── useFlowHistory.ts │ │ ├── useFlowLayout.ts │ │ └── useGlobalFlowEditor.ts │ ├── constants │ │ └── index.ts │ ├── index.ts │ ├── types │ │ └── index.ts │ └── utils │ │ └── editor.ts ├── global.d.ts ├── gui │ ├── README.md │ ├── build.config.ts │ ├── client │ │ ├── actions │ │ │ └── numberDrag.ts │ │ ├── browser.ts │ │ ├── components │ │ │ ├── AGUIApp.vue │ │ │ ├── AGUICheckbox.vue │ │ │ ├── AGUIColorPicker.vue │ │ │ ├── AGUIDetails.vue │ │ │ ├── AGUINumberField.vue │ │ │ ├── AGUINumberSlider.vue │ │ │ ├── AGUIOverlay.vue │ │ │ ├── AGUIPanel.vue │ │ │ ├── AGUIProperty.vue │ │ │ ├── AGUISlider.vue │ │ │ ├── accordion │ │ │ │ ├── AGUIAccordion.vue │ │ │ │ ├── AGUIAccordionItem.vue │ │ │ │ ├── styles.scss │ │ │ │ └── types.ts │ │ │ ├── breadcrumb │ │ │ │ ├── AGUIBreadcrumb.vue │ │ │ │ ├── index.ts │ │ │ │ └── types.ts │ │ │ ├── button │ │ │ │ ├── AGUIButton.vue │ │ │ │ ├── AGUIIconButton.vue │ │ │ │ └── AGUIToggleIcon.vue │ │ │ ├── common │ │ │ │ └── AGUIHr.vue │ │ │ ├── context-menu │ │ │ │ ├── AGUIContextMenu.vue │ │ │ │ ├── AGUIContextMenuItem.vue │ │ │ │ └── types.ts │ │ │ ├── dialog │ │ │ │ └── AGUIDialog.vue │ │ │ ├── dropdown-menu │ │ │ │ ├── AGUIDropdownMenu.vue │ │ │ │ └── dropdown-menu.scss │ │ │ ├── explorer │ │ │ │ ├── AGUIAssetsExplorer.vue │ │ │ │ ├── AGUIExplorerControls.vue │ │ │ │ ├── AGUIFileItem.vue │ │ │ │ ├── AGUIFileItemIcon.vue │ │ │ │ ├── AGUIFileList.vue │ │ │ │ ├── AGUIOpenDirectory.vue │ │ │ │ ├── README.md │ │ │ │ ├── explorer.scss │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── utils.ts │ │ │ ├── file │ │ │ │ └── AGUIFileHandler.vue │ │ │ ├── form │ │ │ │ ├── AGUIForm.vue │ │ │ │ └── AGUIFormItem.vue │ │ │ ├── icon │ │ │ │ └── AGUIIcon.vue │ │ │ ├── icons │ │ │ │ ├── BIconChevronLeft.vue │ │ │ │ └── BIconChevronRight.vue │ │ │ ├── index.ts │ │ │ ├── input │ │ │ │ ├── AGUIInnerInput.vue │ │ │ │ ├── AGUIInput.vue │ │ │ │ ├── AGUIInputNumber.vue │ │ │ │ └── AGUIInputVector.vue │ │ │ ├── layout │ │ │ │ ├── AGUILayout.vue │ │ │ │ └── types.ts │ │ │ ├── loading │ │ │ │ └── AGUILoading.vue │ │ │ ├── menu │ │ │ │ ├── AGUIMenubar.vue │ │ │ │ ├── AGUIMenubarMenu.vue │ │ │ │ ├── menu-bar.scss │ │ │ │ └── types.ts │ │ │ ├── panel │ │ │ │ ├── AGUIPropertiesForm.vue │ │ │ │ ├── AGUIPropertiesPanel.vue │ │ │ │ ├── index.ts │ │ │ │ └── types.ts │ │ │ ├── select │ │ │ │ └── AGUISelect.vue │ │ │ ├── sidebar │ │ │ │ ├── AGUISidebar.vue │ │ │ │ ├── AGUISidebarItem.vue │ │ │ │ └── types.ts │ │ │ ├── switch │ │ │ │ └── AGUISwitch.vue │ │ │ ├── tabs │ │ │ │ ├── AGUITabPanel.vue │ │ │ │ ├── AGUITabs.vue │ │ │ │ └── types.ts │ │ │ ├── textarea │ │ │ │ └── AGUITextarea.vue │ │ │ ├── toast │ │ │ │ └── AGUIToast.vue │ │ │ ├── toolbar │ │ │ │ ├── AGUIToolbar.vue │ │ │ │ └── types.ts │ │ │ └── tree │ │ │ │ ├── AGUITree.vue │ │ │ │ ├── AGUITreeNode.vue │ │ │ │ ├── index.ts │ │ │ │ └── types.ts │ │ ├── composables │ │ │ ├── index.ts │ │ │ ├── useAssetsExplorer.ts │ │ │ └── useToast.ts │ │ ├── index.ts │ │ ├── shims.d.ts │ │ ├── styles │ │ │ ├── checkbox.scss │ │ │ ├── css-vars.scss │ │ │ ├── global.scss │ │ │ ├── icons.ts │ │ │ ├── index.scss │ │ │ ├── index.ts │ │ │ ├── layout.scss │ │ │ ├── reset.scss │ │ │ ├── scrollbar.scss │ │ │ └── slider.scss │ │ ├── types │ │ │ ├── index.ts │ │ │ ├── panel.ts │ │ │ └── property.ts │ │ └── utils │ │ │ ├── fs.ts │ │ │ ├── index.ts │ │ │ └── property.ts │ ├── index.ts │ ├── node │ │ └── index.ts │ ├── nuxt.mjs │ ├── package.json │ ├── scripts │ │ └── build.ts │ ├── tsconfig.json │ ├── unocss │ │ └── index.ts │ └── vite.config.ts ├── parser │ ├── .gitignore │ ├── README.md │ ├── fs.d.ts │ ├── package.json │ ├── playground │ │ ├── .vscode │ │ │ └── settings.json │ │ ├── README.md │ │ ├── index.html │ │ ├── locales │ │ │ ├── en.yml │ │ │ └── zh-CN.yml │ │ ├── package.json │ │ ├── public │ │ │ ├── examples │ │ │ │ └── README.md │ │ │ └── favicon.svg │ │ ├── src │ │ │ ├── App.vue │ │ │ ├── components │ │ │ │ ├── BaseHeader.vue │ │ │ │ ├── MarkdownEditor.vue │ │ │ │ ├── ParsePreview.vue │ │ │ │ ├── PreviewEditor.vue │ │ │ │ └── ToggleViewToolbar.vue │ │ │ ├── composables │ │ │ │ ├── dark.ts │ │ │ │ └── index.ts │ │ │ ├── config │ │ │ │ └── index.ts │ │ │ ├── layouts │ │ │ │ ├── 404.vue │ │ │ │ └── default.vue │ │ │ ├── main.ts │ │ │ ├── modules │ │ │ │ ├── i18n.ts │ │ │ │ ├── pinia.ts │ │ │ │ ├── pwa.ts │ │ │ │ └── vTooltip.ts │ │ │ ├── pages │ │ │ │ ├── about.md │ │ │ │ └── index.vue │ │ │ ├── setup │ │ │ │ └── monaco.ts │ │ │ ├── shims.d.ts │ │ │ ├── stores │ │ │ │ ├── app.ts │ │ │ │ └── editor.ts │ │ │ ├── styles │ │ │ │ └── index.css │ │ │ ├── typed-router.d.ts │ │ │ └── types │ │ │ │ └── index.ts │ │ ├── unocss.config.ts │ │ └── vite.config.ts │ ├── scripts │ │ └── copy.ts │ ├── src │ │ ├── Serialize.ts │ │ ├── config.ts │ │ ├── core.ts │ │ ├── frontmatter │ │ │ └── index.ts │ │ ├── fs.ts │ │ ├── index.ts │ │ ├── markdown │ │ │ └── index.ts │ │ ├── remark.ts │ │ ├── syntax │ │ │ ├── code.ts │ │ │ ├── index.ts │ │ │ └── parse.ts │ │ └── utils │ │ │ └── index.ts │ ├── test │ │ └── index.test.ts │ └── tsdown.config.ts ├── shared │ ├── examples │ │ └── test.adv │ ├── node │ │ ├── index.ts │ │ └── vite.ts │ ├── package.json │ └── src │ │ ├── constants.ts │ │ ├── helpers.ts │ │ ├── index.ts │ │ └── types │ │ └── index.ts ├── types │ ├── .gitignore │ ├── build.config.ts │ ├── client.d.ts │ ├── index.d.ts │ ├── package.json │ ├── src │ │ ├── ast │ │ │ ├── index.ts │ │ │ └── md.ts │ │ ├── config │ │ │ ├── adv.ts │ │ │ ├── game.ts │ │ │ ├── index.ts │ │ │ └── theme.ts │ │ ├── flow │ │ │ ├── edge.ts │ │ │ ├── index.ts │ │ │ └── node.ts │ │ ├── game │ │ │ ├── chapter.ts │ │ │ ├── character.ts │ │ │ ├── index.ts │ │ │ ├── music.ts │ │ │ └── scene.ts │ │ ├── index.ts │ │ ├── setups.ts │ │ └── types.ts │ └── tsconfig.json └── unocss │ ├── build.config.ts │ ├── package.json │ └── src │ ├── index.ts │ └── presets │ └── index.ts ├── playground └── .gitignore ├── playwright.config.ts ├── plugins ├── plugin-babylon │ ├── README.md │ ├── build.config.ts │ ├── components │ │ ├── AdvBabylonCanvas.vue │ │ └── AdvBabylonDebug.vue │ ├── package.json │ ├── src │ │ ├── camera │ │ │ ├── animation.ts │ │ │ ├── debug.ts │ │ │ └── index.ts │ │ ├── debug │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── light │ │ │ ├── index.ts │ │ │ └── pointLight.ts │ │ ├── physics.ts │ │ ├── scene │ │ │ ├── default.ts │ │ │ ├── ground.ts │ │ │ └── index.ts │ │ ├── setup │ │ │ └── index.ts │ │ ├── stores │ │ │ └── index.ts │ │ ├── types │ │ │ └── index.ts │ │ └── vrm │ │ │ ├── index.ts │ │ │ ├── pose │ │ │ ├── index.ts │ │ │ ├── poseData.ts │ │ │ └── poses.ts │ │ │ ├── scene.ts │ │ │ └── ui.ts │ └── tsconfig.json ├── plugin-cos │ ├── .gitignore │ ├── README.md │ ├── build.config.ts │ ├── package.json │ └── src │ │ └── index.ts ├── plugin-obs │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── scripts │ │ └── test.ts │ └── src │ │ ├── index.ts │ │ ├── options.ts │ │ ├── types.ts │ │ └── utils.ts ├── plugin-openai │ ├── .env.example │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── scripts │ │ ├── batch.ts │ │ ├── config.ts │ │ ├── index.ts │ │ └── realtime-audio.ts │ └── src │ │ ├── global.ts │ │ ├── index.ts │ │ └── tts.ts ├── plugin-playwright │ ├── README.md │ ├── build.config.ts │ ├── package.json │ ├── scripts │ │ └── test.ts │ └── src │ │ └── index.ts ├── plugin-pominis │ ├── README.md │ ├── build.config.ts │ ├── package.json │ └── src │ │ ├── index.ts │ │ ├── types.ts │ │ └── utils.ts ├── plugin-runware │ ├── .env.example │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── scripts │ │ └── index.ts │ └── src │ │ ├── index.ts │ │ ├── s3.ts │ │ └── service.ts └── plugin-three │ ├── README.md │ └── package.json ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── scripts ├── clean.ts ├── config.ts ├── release.ts ├── schema.ts └── utils │ ├── clean.ts │ └── index.ts ├── tests ├── e2e │ ├── README.md │ ├── editor.spec.ts │ ├── example.spec.ts │ └── starter.spec.ts └── unit │ ├── README.md │ └── basic.test.ts ├── themes ├── theme-default │ ├── README.md │ ├── assets │ │ ├── audios.ts │ │ ├── images.ts │ │ └── index.ts │ ├── client │ │ └── index.ts │ ├── components │ │ ├── dev │ │ │ ├── AdvDebug.vue │ │ │ └── AdvToolbox.vue │ │ ├── save │ │ │ └── SavedCard.vue │ │ ├── start │ │ │ ├── ATDCover.vue │ │ │ ├── StartLoading.vue │ │ │ └── StartMenu.vue │ │ ├── tooltip │ │ │ └── AdvAdblock.vue │ │ └── ui │ │ │ ├── AdvCheckbox.vue │ │ │ ├── AdvIcon.vue │ │ │ ├── AdvIconButton.vue │ │ │ ├── AdvMessageBox.vue │ │ │ ├── AdvModal.vue │ │ │ ├── AdvRadioGroup.vue │ │ │ ├── AdvSelect.vue │ │ │ ├── AdvSlider.vue │ │ │ └── AdvTextButton.vue │ ├── composables │ │ ├── config.ts │ │ ├── index.ts │ │ └── useStartMenu.ts │ ├── index.ts │ ├── layouts │ │ ├── 404.vue │ │ ├── adv.vue │ │ ├── default.vue │ │ ├── fullscreen.vue │ │ ├── home.vue │ │ ├── logo.vue │ │ ├── start.vue │ │ └── text.vue │ ├── node │ │ ├── config.ts │ │ └── index.ts │ ├── package.json │ ├── pages │ │ ├── flow-chart.vue │ │ ├── index.vue │ │ └── start.vue │ ├── stores │ │ ├── index.ts │ │ └── theme.ts │ ├── styles │ │ ├── adv │ │ │ ├── button.scss │ │ │ ├── game.scss │ │ │ ├── index.scss │ │ │ ├── menu.scss │ │ │ ├── pagination.scss │ │ │ ├── scrollbar.scss │ │ │ ├── select.scss │ │ │ └── slider.scss │ │ ├── animation │ │ │ ├── common.scss │ │ │ ├── index.scss │ │ │ ├── ripple.scss │ │ │ ├── transition.scss │ │ │ ├── typed.scss │ │ │ └── vars.scss │ │ ├── css-vars.scss │ │ ├── helper.scss │ │ ├── index.ts │ │ ├── layouts │ │ │ ├── index.scss │ │ │ └── start.scss │ │ ├── main.scss │ │ ├── typography.scss │ │ └── vars.scss │ ├── types │ │ ├── index.ts │ │ ├── menu.ts │ │ ├── theme.ts │ │ └── ui │ │ │ ├── index.ts │ │ │ ├── menu-item.ts │ │ │ └── props.ts │ └── uno.config.ts ├── theme-pominis │ ├── client │ │ └── index.ts │ ├── composables │ │ ├── index.ts │ │ └── useThemeConfig.ts │ ├── index.ts │ ├── package.json │ └── types │ │ ├── index.ts │ │ └── theme.ts └── theme-starter │ ├── README.md │ ├── client │ └── index.ts │ ├── components │ └── README.md │ ├── composables │ ├── index.ts │ └── useThemeConfig.ts │ ├── index.ts │ ├── layouts │ └── README.md │ ├── package.json │ ├── pages │ └── README.md │ ├── stores │ ├── README.md │ ├── index.ts │ └── theme.ts │ ├── styles │ ├── README.md │ ├── css-vars.scss │ ├── index.ts │ └── main.scss │ └── types │ ├── index.ts │ └── theme.ts ├── tsconfig.json ├── uno.config.ts └── vitest.config.ts /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | trim_trailing_whitespace = true 7 | insert_final_newline = true 8 | 9 | [*.md] 10 | insert_final_newline = false 11 | trim_trailing_whitespace = false 12 | 13 | [*.{js,jsx,json,ts,tsx,yml}] 14 | indent_size = 2 15 | indent_style = space 16 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [YunYouJun] 4 | patreon: YunYouJun # Replace with a single Patreon username 5 | custom: https://sponsors.yunyoujun.cn # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 6 | -------------------------------------------------------------------------------- /.github/workflows/docs.yml: -------------------------------------------------------------------------------- 1 | name: ADV.JS Docs 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | pull_request: 9 | branches: 10 | - main 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v4 17 | - uses: pnpm/action-setup@v4 18 | - uses: actions/setup-node@v4 19 | with: 20 | node-version: lts/* 21 | cache: pnpm 22 | 23 | - name: Install 24 | run: pnpm install 25 | 26 | - name: Build 27 | run: npm run docs:build 28 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "packages/client/public/assets"] 2 | path = packages/client/public/assets 3 | url = https://github.com/advjs/assets 4 | -------------------------------------------------------------------------------- /.husky/post-checkout: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-checkout'.\n"; exit 2; } 3 | git lfs post-checkout "$@" 4 | -------------------------------------------------------------------------------- /.husky/post-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-commit'.\n"; exit 2; } 3 | git lfs post-commit "$@" 4 | -------------------------------------------------------------------------------- /.husky/post-merge: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-merge'.\n"; exit 2; } 3 | git lfs post-merge "$@" 4 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | npx lint-staged 2 | -------------------------------------------------------------------------------- /.husky/pre-push: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/pre-push'.\n"; exit 2; } 3 | git lfs pre-push "$@" 4 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist=true 2 | ignore-workspace-root-check=true 3 | strict-peer-dependencies=false 4 | shell-emulator=true 5 | auto-install-peers=false 6 | # for electron install 7 | side-effects-cache=false 8 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "antfu.iconify", 4 | "antfu.unocss", 5 | "antfu.vite", 6 | "csstools.postcss", 7 | "dbaeumer.vscode-eslint", 8 | "vue.volar", 9 | "lokalise.i18n-ally", 10 | "streetsidesoftware.code-spell-checker" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /amplify.yml: -------------------------------------------------------------------------------- 1 | version: 1 2 | applications: 3 | - frontend: 4 | phases: 5 | preBuild: 6 | commands: 7 | - node --version 8 | - corepack enable 9 | - pnpm install 10 | build: 11 | commands: 12 | - pnpm run editor:build 13 | artifacts: 14 | baseDirectory: editor/core/.amplify-hosting 15 | files: 16 | - '**/*' 17 | buildPath: / 18 | appRoot: editor/core 19 | -------------------------------------------------------------------------------- /demo/ai/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | 4 | .adv 5 | -------------------------------------------------------------------------------- /demo/ai/README.md: -------------------------------------------------------------------------------- 1 | # Editor Project Demo 2 | 3 | 编辑器项目,可以被编辑器打开并编辑。 4 | 5 | - `adv.config.json`: 游戏配置文件 6 | - `index.adv.json`: 游戏入口文件,主要内容 7 | - `public`: 资源文件夹 8 | -------------------------------------------------------------------------------- /demo/ai/adv.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../packages/types/schema/adv.config.schema.json", 3 | "format": "flow", 4 | "theme": "default", 5 | "gameConfig": { 6 | "id": "the-lord-of-the-rings" 7 | }, 8 | "cdn": { 9 | "enable": true, 10 | "prefix": "https://cos.advjs.yunle.fun/games/the-lord-of-the-rings" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /demo/flow/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | 4 | .adv 5 | 6 | public/img/your-name 7 | public/data/your-name.adv.json 8 | public/config 9 | -------------------------------------------------------------------------------- /demo/flow/.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist=true 2 | strict-peer-dependencies=false 3 | shell-emulator=true 4 | auto-install-peers=false 5 | -------------------------------------------------------------------------------- /demo/flow/README.md: -------------------------------------------------------------------------------- 1 | # Flow 2 | 3 | 节点格式的游戏 Demo。 4 | 5 | - 可通过节点编辑器生成节点信息 6 | - 支持运行时加载 7 | -------------------------------------------------------------------------------- /demo/flow/adv.config.ts: -------------------------------------------------------------------------------- 1 | import { defineAdvConfig } from 'advjs' 2 | import { LogLevels } from 'consola' 3 | 4 | export default defineAdvConfig({ 5 | logLevel: LogLevels.debug, 6 | root: './adv', 7 | 8 | format: 'flow', 9 | theme: 'default', 10 | 11 | features: { 12 | babylon: false, 13 | }, 14 | 15 | gameConfig: { 16 | title: 'Your Name', 17 | }, 18 | }) 19 | -------------------------------------------------------------------------------- /demo/flow/adv/scenes/taki-bedroom.scene.ts: -------------------------------------------------------------------------------- 1 | import { defineAdvScene } from '@advjs/types' 2 | 3 | export default defineAdvScene({ 4 | id: 'taki-bedroom', 5 | type: 'image', 6 | description: 'Taki wakes up in his small Tokyo apartment, feeling disoriented. The morning light filters through the curtains, and the sounds of the bustling city outside fill the air.', 7 | src: '/img/your-name/node1.jpg', 8 | }) 9 | -------------------------------------------------------------------------------- /demo/flow/adv/scenes/taki-phone.scene.ts: -------------------------------------------------------------------------------- 1 | import { defineAdvScene } from '@advjs/types' 2 | 3 | export default defineAdvScene({ 4 | id: 'taki-phone', 5 | type: 'image', 6 | description: 'Taki wakes up in his small Tokyo apartment, feeling disoriented. The morning light filters through the curtains, and the sounds of the bustling city outside fill the air.', 7 | imagePrompt: 'A small, cluttered Tokyo apartment with morning light filtering through curtains. ', 8 | src: '/img/your-name/node2.jpg', 9 | }) 10 | -------------------------------------------------------------------------------- /demo/flow/adv/scenes/taki-school.scene.ts: -------------------------------------------------------------------------------- 1 | import { defineAdvScene } from '@advjs/types' 2 | 3 | export default defineAdvScene({ 4 | id: 'taki-school', 5 | type: 'image', 6 | description: 'Taki wakes up in his small Tokyo apartment, feeling disoriented. The morning light filters through the curtains, and the sounds of the bustling city outside fill the air.', 7 | imagePrompt: 'A small, cluttered Tokyo apartment with morning light filtering through curtains. ', 8 | src: '/img/your-name/node3.jpg', 9 | }) 10 | -------------------------------------------------------------------------------- /demo/flow/adv/setups/adv.ts: -------------------------------------------------------------------------------- 1 | import { defineAdvSetup } from '@advjs/client' 2 | import { useThemeDefaultStore } from '@advjs/theme-default' 3 | import { consola } from 'consola' 4 | 5 | export default defineAdvSetup(({ $adv, router }) => { 6 | consola.success('[ADV]', 'defineAdvSetup', $adv) 7 | // $adv.config 8 | 9 | const themeStore = useThemeDefaultStore() 10 | const startGameItem = themeStore.$startMenu.menuItems.find(item => item.id === 'start_game') 11 | startGameItem!.do = () => { 12 | router.push('/flow') 13 | } 14 | }) 15 | -------------------------------------------------------------------------------- /demo/flow/adv/setups/main.ts: -------------------------------------------------------------------------------- 1 | import { defineAppSetup } from '@advjs/client' 2 | import { consola } from 'consola' 3 | 4 | export default defineAppSetup(() => { 5 | consola.info('[ADV] App setup') 6 | }) 7 | -------------------------------------------------------------------------------- /demo/flow/scripts/generate.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * generate *.adv.json 3 | */ 4 | -------------------------------------------------------------------------------- /demo/flow/theme.config.ts: -------------------------------------------------------------------------------- 1 | import type { ThemeConfig } from '@advjs/theme-default' 2 | import { defineThemeConfig } from 'advjs' 3 | 4 | export default defineThemeConfig({ 5 | 6 | }) 7 | -------------------------------------------------------------------------------- /demo/flow/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "lib": ["ESNext"], 5 | "module": "ESNext", 6 | "moduleResolution": "Bundler", 7 | "resolveJsonModule": true, 8 | "strict": true, 9 | "strictNullChecks": true, 10 | "noEmit": true, 11 | "esModuleInterop": true, 12 | "verbatimModuleSyntax": true, 13 | "skipDefaultLibCheck": true, 14 | "skipLibCheck": true 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demo/flow/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | 3 | export default defineConfig({ 4 | plugins: [], 5 | }) 6 | -------------------------------------------------------------------------------- /demo/love/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | 4 | .adv 5 | -------------------------------------------------------------------------------- /demo/love/netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | publish = "dist" 3 | command = "pnpm run build" 4 | 5 | [build.environment] 6 | NODE_VERSION = "22" 7 | 8 | [[redirects]] 9 | from = "/*" 10 | to = "/index.html" 11 | status = 200 12 | 13 | [[headers]] 14 | for = "/manifest.webmanifest" 15 | 16 | [headers.values] 17 | Content-Type = "application/manifest+json" 18 | -------------------------------------------------------------------------------- /demo/love/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "love", 3 | "type": "module", 4 | "version": "0.0.1", 5 | "private": true, 6 | "scripts": { 7 | "build": "adv build", 8 | "dev": "nodemon -w '../../packages/**/dist/*.js' --exec \"adv ./index.adv.md --open=false --log=info\"", 9 | "export": "adv export", 10 | "preview": "vite preview --host", 11 | "preview-https": "serve dist" 12 | }, 13 | "devDependencies": { 14 | "@advjs/theme-default": "workspace:*", 15 | "advjs": "workspace:*", 16 | "https-localhost": "catalog:", 17 | "nodemon": "^3.1.10" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /demo/love/pages/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: About 3 | layout: text 4 | --- 5 | 6 |
7 | 8 |
9 |

About

10 |
11 | 12 | 绝赞开发中! 13 | 14 | - [index.adv.md|主剧本](https://github.com/YunYouJun/advjs/blob/main/demo/love/index.adv.md) 15 | -------------------------------------------------------------------------------- /demo/love/public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /demo/love/public/img/characters/yun-alpha-compressed.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/demo/love/public/img/characters/yun-alpha-compressed.webp -------------------------------------------------------------------------------- /demo/love/public/img/characters/yun-good-alpha-compressed.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/demo/love/public/img/characters/yun-good-alpha-compressed.webp -------------------------------------------------------------------------------- /demo/love/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / 3 | -------------------------------------------------------------------------------- /demo/love/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "redirects": [ 3 | { 4 | "source": "/*", 5 | "destination": "/index.html" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /demo/starter/.gitignore: -------------------------------------------------------------------------------- 1 | public/assets/ 2 | 3 | node_modules 4 | dist 5 | 6 | auto-imports.d.ts 7 | 8 | .adv 9 | -------------------------------------------------------------------------------- /demo/starter/README.md: -------------------------------------------------------------------------------- 1 | # wlwz demo 2 | 3 | [![Netlify Status](https://api.netlify.com/api/v1/badges/e33bbdbd-31e5-4421-b112-c423b83f4c5c/deploy-status)](https://app.netlify.com/sites/advjs-wlwz/deploys) 4 | -------------------------------------------------------------------------------- /demo/starter/assets/index.ts: -------------------------------------------------------------------------------- 1 | import { assets } from '@advjs/theme-default' 2 | 3 | export const audios = { 4 | ...assets.audios, 5 | } 6 | 7 | export const images = { 8 | ...assets.images, 9 | } 10 | -------------------------------------------------------------------------------- /demo/starter/components/BaseFooter.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 20 | -------------------------------------------------------------------------------- /demo/starter/modules/pwa.ts: -------------------------------------------------------------------------------- 1 | import type { UserModule } from '@advjs/client/types' 2 | 3 | // https://github.com/antfu/vite-plugin-pwa#automatic-reload-when-new-content-available 4 | export const install: UserModule = ({ isClient, router }) => { 5 | if (!isClient) 6 | return 7 | 8 | router.isReady().then(async () => { 9 | const { registerSW } = await import('virtual:pwa-register') 10 | registerSW({ immediate: true }) 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /demo/starter/netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | publish = "dist" 3 | command = "pnpm run build" 4 | 5 | [build.environment] 6 | NODE_VERSION = "22" 7 | 8 | [[redirects]] 9 | from = "/*" 10 | to = "/index.html" 11 | status = 200 12 | 13 | [[headers]] 14 | for = "/manifest.webmanifest" 15 | 16 | [headers.values] 17 | Content-Type = "application/manifest+json" 18 | -------------------------------------------------------------------------------- /demo/starter/public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /demo/starter/public/icons/pwa-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/demo/starter/public/icons/pwa-192x192.png -------------------------------------------------------------------------------- /demo/starter/public/icons/pwa-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/demo/starter/public/icons/pwa-512x512.png -------------------------------------------------------------------------------- /demo/starter/public/img/bg/night.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/demo/starter/public/img/bg/night.jpg -------------------------------------------------------------------------------- /demo/starter/public/img/characters/he/he-smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/demo/starter/public/img/characters/he/he-smile.png -------------------------------------------------------------------------------- /demo/starter/public/img/characters/he/he.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/demo/starter/public/img/characters/he/he.png -------------------------------------------------------------------------------- /demo/starter/public/img/characters/she/she.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/demo/starter/public/img/characters/she/she.png -------------------------------------------------------------------------------- /demo/starter/public/img/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/demo/starter/public/img/icons/favicon-32x32.png -------------------------------------------------------------------------------- /demo/starter/public/img/icons/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo/starter/public/md/chapters/1/仓鼠的笼子.adv.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 仓鼠的笼子 3 | --- 4 | 5 | 6 | 7 | @我 8 | 呐,你说世界上真的有外星人吗? 9 | 10 | 我一边喂着毛茸茸的仓鼠,一边眨着眼睛故作调皮的问道。 11 | 12 | 夏日的午后总会让人慵懒,好在室内却是凉意凛然。 13 | 14 | @他(不置可否的笑) 15 | 虽说眼见为实,不过我想,外星人是一定存在的。至少从人类的渺小程度来看,是这样。 16 | 17 | @我 18 | 那为什么我们到现在都不能见到他们呢?一定会有科技稍早于我们的外星人搭着如魔法般的飞船来到此地才对啊。 19 | 20 | 我追问道,并将那可爱的小仓鼠提起放在转轮上。它也像是明白了什么一样,开始哒哒哒地跑了起来。 21 | 22 | @他 23 | 即便是地球上也仍有许多我们未曾见过的生物啊,不过我宁愿呆在午后,看着前人的幻想,也不想去探索那些未知的… 24 | 25 | 他像是没找到合适的词汇,“动物世界?” 26 | 27 | @他 28 | 动物世界? 29 | 30 | @我 31 | 外星人也会像你这般怠惰吗? 32 | -------------------------------------------------------------------------------- /demo/starter/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / 3 | -------------------------------------------------------------------------------- /demo/starter/setup/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/demo/starter/setup/index.ts -------------------------------------------------------------------------------- /demo/starter/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "redirects": [ 3 | { 4 | "source": "/*", 5 | "destination": "/index.html" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /demo/use-dialog-box/.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 | -------------------------------------------------------------------------------- /demo/use-dialog-box/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + Vue + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /demo/use-dialog-box/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "use-dialog-box", 3 | "type": "module", 4 | "version": "0.0.0", 5 | "private": true, 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview", 10 | "typecheck": "vue-tsc --noEmit" 11 | }, 12 | "dependencies": { 13 | "@advjs/parser": "workspace:*", 14 | "vue": "catalog:" 15 | }, 16 | "devDependencies": { 17 | "@vitejs/plugin-vue": "catalog:", 18 | "vite": "catalog:", 19 | "vue-tsc": "catalog:" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /demo/use-dialog-box/public/main.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Main Dialog 3 | --- 4 | 5 | @云游君 6 | 你好,以旁白的身份说一段话。 7 | 8 | @ChatGPT 9 | 在这个世界上,有很多不同的声音和故事。 10 | 有些人正在经历着生命中最美好的时光,而另一些人则在面对挑战和困难。但无论是好是坏,这些经历都是我们成长和学习的机会。 11 | 我们可以从成功中获得启示,从失败中吸取教训,从痛苦中获得坚强。 12 | 所以,无论你此刻身处何方,都要记住,你的故事是独一无二的,它值得被分享和听取。 13 | 因此,让我们珍惜这些宝贵的经历,并一起创造一个更美好的未来。 14 | -------------------------------------------------------------------------------- /demo/use-dialog-box/src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /demo/use-dialog-box/src/assets/vue.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo/use-dialog-box/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import './style.css' 4 | 5 | import 'uno.css' 6 | 7 | createApp(App).mount('#app') 8 | -------------------------------------------------------------------------------- /demo/use-dialog-box/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /demo/use-dialog-box/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "jsx": "preserve", 5 | "lib": ["ESNext", "DOM"], 6 | "useDefineForClassFields": true, 7 | "module": "ESNext", 8 | "moduleResolution": "bundler", 9 | "resolveJsonModule": true, 10 | "strict": true, 11 | "noEmit": true, 12 | "esModuleInterop": true, 13 | "isolatedModules": true, 14 | "skipLibCheck": true 15 | }, 16 | "references": [{ "path": "./tsconfig.node.json" }], 17 | "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"] 18 | } 19 | -------------------------------------------------------------------------------- /demo/use-dialog-box/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "lib": ["ESNext"], 5 | "module": "ESNext", 6 | "moduleResolution": "Bundler", 7 | "resolveJsonModule": true, 8 | "strict": true, 9 | "strictNullChecks": true, 10 | "noEmit": true, 11 | "esModuleInterop": true, 12 | "verbatimModuleSyntax": true, 13 | "skipDefaultLibCheck": true, 14 | "skipLibCheck": true 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demo/use-dialog-box/vite.config.ts: -------------------------------------------------------------------------------- 1 | import Vue from '@vitejs/plugin-vue' 2 | import { presetAttributify, presetIcons, presetUno } from 'unocss' 3 | import UnoCSS from 'unocss/vite' 4 | import { defineConfig } from 'vite' 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [ 9 | UnoCSS({ 10 | presets: [ 11 | presetUno(), 12 | presetAttributify(), 13 | presetIcons({ 14 | scale: 1.2, 15 | // warn: true, 16 | }), 17 | ], 18 | }), 19 | Vue(), 20 | ], 21 | }) 22 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | .vitepress/cache 2 | 3 | # typedoc 4 | api/ 5 | 6 | # online schema 7 | public/*.schema.json 8 | -------------------------------------------------------------------------------- /docs/.vitepress/config/constants.ts: -------------------------------------------------------------------------------- 1 | import * as pkg from '../../package.json' 2 | 3 | export const metaData = { 4 | title: 'ADV.JS', 5 | description: pkg.description, 6 | } 7 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/components/HomePage.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/components/VPHomeHero.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/components/demo/AssetsExplorerDemo.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/components/demo/ButtonDemo.vue: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/components/demo/IconButtonDemo.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/components/demo/NumberFieldDemo.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 22 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/components/demo/SliderDemo.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 19 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/styles/helpers.scss: -------------------------------------------------------------------------------- 1 | .gradient-text { 2 | background-size: 100%; 3 | background-clip: text; 4 | -webkit-background-clip: text; 5 | -moz-background-clip: text; 6 | -webkit-text-fill-color: transparent; 7 | -moz-text-fill-color: transparent; 8 | } 9 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/styles/index.scss: -------------------------------------------------------------------------------- 1 | @use './helpers.scss'; 2 | 3 | // override the default theme 4 | .vp-doc hr { 5 | margin: 8px 0; 6 | } 7 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # ADV.JS Docs 2 | 3 | > @advjs/docs 4 | 5 | 使用文档与设计理念 6 | -------------------------------------------------------------------------------- /docs/about/design/i18n.md: -------------------------------------------------------------------------------- 1 | # 国际化 2 | 3 | 想必所有的制作者也无不希望自己的游戏也能冲出国门,走向世界。 4 | 5 | 那么多语言的国际化就必不可少。 6 | 当然这并非是我们前期需要考虑的重点。但这又属于我可以不用,但不能没有系列。 7 | 8 | ## 实现方案 9 | 10 | ### 系统自带文本 11 | 12 | 系统本身的 UI 元素文本(如设置、开始游戏、存档、帮助等等)将通过 [@intlify/unplugin-vue-i18n](https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n) + [vue-i18n@v9.x](https://github.com/intlify/vue-i18n-next) 来实现,通过编写 `locales` 下不同语言的 Yaml 文件。 13 | 14 | 以便在运行时无刷新地进行语言切换。 15 | 16 | ### 剧情文本 17 | 18 | 剧情文本的多语言将考虑采用不同目录的方案,用户编写不同语言的剧情文本放置于不同语言的目录下,再通过当前语言去解析不同目录下的文件。(这部分如果需要切换语言时,可能需要刷新页面。) 19 | 20 | - [crowdin](https://crowdin.com/) 是被考虑的可能的辅助工具。 21 | -------------------------------------------------------------------------------- /docs/about/design/index.md: -------------------------------------------------------------------------------- 1 | # 设计方案 2 | 3 | 此部分将会介绍我设计 ADV.JS 不同模块时,所采取的方案和原因。 4 | 5 | 目前正在进行一些草案的设计。 6 | 如果您有任何有趣的想法和提案,欢迎前往 [Discussions](https://github.com/YunYouJun/advjs/discussions) 或 [Discord](https://discord.gg/HNNPywcTxw) 参与讨论。 7 | 8 | 如果您发现了目前的一些设计缺陷或有一些希望增加的功能,欢迎发起 [Issues](https://github.com/YunYouJun/advjs/issues)。 9 | 10 | 11 | 12 | ## 模块分类 13 | 14 | - 存储系统 15 | -------------------------------------------------------------------------------- /docs/about/dev/build.md: -------------------------------------------------------------------------------- 1 | # 构建 2 | 3 | 对于游戏来说,使用 PWA 可能比 SSG 更合适。 4 | -------------------------------------------------------------------------------- /docs/about/dev/dependencies.md: -------------------------------------------------------------------------------- 1 | # 依赖 2 | 3 | ## [VueUse](https://vueuse.org/) 4 | 5 | VueUse 提供了许多辅助函数,并且是 Tree Shake 的,将会使用其快速实现全屏、亮暗等小功能。 6 | 7 | ## [UnoCSS](https://github.com/unocss/unocss) 8 | 9 | 使用 UnoCSS 的原子化 Utility 来快速构建 UI。 10 | -------------------------------------------------------------------------------- /docs/about/dev/features.md: -------------------------------------------------------------------------------- 1 | # Features 2 | 3 | ## PWA 4 | 5 | 在线游戏内容往往会占用较多资源,且初次加载较慢。 6 | 7 | 我们可以使用 [PWA](https://developer.mozilla.org/zh-CN/docs/Web/Progressive_web_apps) 来进行缓存。 8 | 9 | 基于 [vite-plugin-pwa](https://github.com/antfu/vite-plugin-pwa) 实现。 10 | -------------------------------------------------------------------------------- /docs/about/dev/icons.md: -------------------------------------------------------------------------------- 1 | # 图标 2 | 3 | 大量使用已有的开源图标集 4 | 5 | ```bash 6 | pnpm add -D unocss 7 | ``` 8 | 9 | - [Icones](https://icones.js.org/) 10 | - 可在线检索 iconify 图标名称 11 | - [@unocss/preset-icons](https://github.com/unocss/unocss/tree/main/packages/preset-icons#readme) 12 | - 我使用 UnoCSS CSS Icon 来在 Vite 与 Vue 中按需加载图标 13 | - [iconify](https://github.com/iconify/iconify): 集成了诸多图标库 14 | -------------------------------------------------------------------------------- /docs/about/dev/ref.md: -------------------------------------------------------------------------------- 1 | # 参考 2 | 3 | ## [slidev](https://github.com/slidevjs/slidev) 4 | 5 | 我发现 Slidev 的使用方式和我设想的方案有所接近,我希望扩展 Markdown 语法使得用户能够通过 Markdown 来快速实现自己的剧本展示。 6 | 7 | 而用户如果有着更高的定制需求,则完全可以插入 Vue 组件来实现任意程度的扩展。 8 | 9 | 项目本身可通过 npm 包发布,提供默认的主题,并允许用户以布局/API 的形式进行 UI 的自定义。 10 | 11 | ## [Doki Doki Literature Club! | 心跳文学部](https://zh.wikipedia.org/wiki/%E5%BF%83%E8%B7%B3%E6%96%87%E5%AD%B8%E9%83%A8%EF%BC%81) 12 | 13 | 心跳文学部也是我喜欢的一部作品,同时其使用 [renpy](https://www.renpy.org/),也是个人制作游戏的一个典范。 14 | 15 | 一些 UI 逻辑和设计流程主要参考了它。 16 | -------------------------------------------------------------------------------- /docs/about/dev/render.md: -------------------------------------------------------------------------------- 1 | # Render 2 | 3 | - [layerMask meaning](https://doc.babylonjs.com/divingDeeper/scene/layermask#layermask-meaning) 4 | -------------------------------------------------------------------------------- /docs/about/dev/stores.md: -------------------------------------------------------------------------------- 1 | # 状态管理 2 | 3 | 基于 Vue 响应式特性的全局状态管理 4 | -------------------------------------------------------------------------------- /docs/about/dev/todo.md: -------------------------------------------------------------------------------- 1 | # Todo 2 | 3 | 可以写一篇关于 Vue Transition,以及为什么用 if 取消挂载。 4 | 5 | - fix 历史会话页面滚动 BUG 6 | - build with remote assets by [vite-plugin-remote-assets](https://github.com/antfu/vite-plugin-remote-assets) 7 | 8 | ## 实现 9 | 10 | - [ ] configs/ watch 更新 `game.config.ts` 11 | -------------------------------------------------------------------------------- /docs/agui/components/assets-explorer.md: -------------------------------------------------------------------------------- 1 | # Assets Explorer 2 | 3 | 4 | 5 | <<< @/.vitepress/theme/components/demo/AssetsExplorerDemo.vue 6 | -------------------------------------------------------------------------------- /docs/agui/components/button.md: -------------------------------------------------------------------------------- 1 | # Button 2 | 3 | ## Common 4 | 5 | 6 | 7 | <<< @/.vitepress/theme/components/demo/ButtonDemo.vue 8 | 9 | ## Icon Button 10 | 11 | 12 | 13 | <<< @/.vitepress/theme/components/demo/IconButtonDemo.vue 14 | -------------------------------------------------------------------------------- /docs/agui/components/checkbox.md: -------------------------------------------------------------------------------- 1 | # Checkbox 2 | 3 | 4 | 5 | <<< @/.vitepress/theme/components/demo/CheckboxDemo.vue 6 | -------------------------------------------------------------------------------- /docs/agui/components/input-number.md: -------------------------------------------------------------------------------- 1 | # InputNumber 2 | 3 | ## Input Number 4 | 5 | 6 | 7 | <<< @/.vitepress/theme/components/demo/InputNumberDemo.vue 8 | 9 | ## NumberField (Drag) 10 | 11 | 12 | 13 | <<< @/.vitepress/theme/components/demo/NumberFieldDemo.vue 14 | -------------------------------------------------------------------------------- /docs/agui/components/input.md: -------------------------------------------------------------------------------- 1 | # Input 2 | 3 | 4 | 5 | <<< @/.vitepress/theme/components/demo/InputDemo.vue 6 | -------------------------------------------------------------------------------- /docs/agui/components/layout.md: -------------------------------------------------------------------------------- 1 | # Layout 2 | -------------------------------------------------------------------------------- /docs/agui/components/menu.md: -------------------------------------------------------------------------------- 1 | # Menu 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/agui/components/number-slider.md: -------------------------------------------------------------------------------- 1 | # NumberSlider 2 | 3 | 4 | 5 | <<< @/.vitepress/theme/components/demo/NumberSliderDemo.vue 6 | -------------------------------------------------------------------------------- /docs/agui/components/radio.md: -------------------------------------------------------------------------------- 1 | # Radio 2 | -------------------------------------------------------------------------------- /docs/agui/components/select.md: -------------------------------------------------------------------------------- 1 | # Select 2 | 3 | 4 | 5 | <<< @/.vitepress/theme/components/demo/SelectDemo.vue 6 | -------------------------------------------------------------------------------- /docs/agui/components/sidebar.md: -------------------------------------------------------------------------------- 1 | --- 2 | title_zh: 侧边栏 3 | --- 4 | 5 | # Sidebar 侧边栏 6 | 7 | 8 | 9 | <<< @/.vitepress/theme/components/demo/DemoSidebar.vue 10 | -------------------------------------------------------------------------------- /docs/agui/components/slider.md: -------------------------------------------------------------------------------- 1 | # Slider 2 | 3 | 4 | 5 | <<< @/.vitepress/theme/components/demo/SliderDemo.vue 6 | -------------------------------------------------------------------------------- /docs/agui/components/tabs.md: -------------------------------------------------------------------------------- 1 | # Tabs 2 | 3 | 4 | 5 | <<< @/.vitepress/theme/components/demo/TabsDemo.vue 6 | -------------------------------------------------------------------------------- /docs/agui/components/tree.md: -------------------------------------------------------------------------------- 1 | # Tree 2 | 3 | 4 | 5 | <<< @/.vitepress/theme/components/demo/TreeDemo.vue 6 | -------------------------------------------------------------------------------- /docs/agui/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | outline: deep 3 | --- 4 | 5 | # AGUI - @advjs/gui 6 | 7 | > GUI for Engine Editor. 8 | 9 | `@advjs/gui` 简称 AGUI,是一个基于 [Vue](https://vuejs.org/) 的 GUI 库,用于构建 [ADV.JS](https://advjs.org) 引擎编辑器。 10 | 11 | 它参考了 [Blender](https://www.blender.org/) 与 [Unity](https://unity.com/) 的 UI 设计,旨在提供一套简单易用的编辑器风格组件。 12 | -------------------------------------------------------------------------------- /docs/ai/mcp.md: -------------------------------------------------------------------------------- 1 | # @advjs/mcp 2 | 3 | ::: tip 4 | 5 | 🧪 Deving... 6 | 7 | ::: 8 | 9 | ADV.JS MCP. 10 | -------------------------------------------------------------------------------- /docs/ai/ref.md: -------------------------------------------------------------------------------- 1 | # 参考资源 2 | 3 | - [JSON-RPC](https://www.jsonrpc.org/) 4 | - [MCP](https://modelcontextprotocol.io/) 5 | -------------------------------------------------------------------------------- /docs/contributing/index.md: -------------------------------------------------------------------------------- 1 | # 参与贡献 2 | 3 | ::: tip 4 | 很高兴你愿意打开这个页面。 5 | 6 | 如果你觉得这个项目不错,并且想要参与进来为其贡献。 7 | 你可以加入右上角的 Discord 进行交流。 8 | 9 | 接下来,我将简要说明一下贡献规范。 10 | ::: 11 | 12 | ## 贡献文档 13 | 14 | > 出于便捷,目前优先以中文文档为主。 15 | > 未来,我们希望可以借助 AI 自动翻译多语言文档。 16 | 17 | 如果您想要对文档进行贡献,请先阅读 [文档写作指南](/contributing/writing-guide.md)。 18 | 19 | ## 贡献代码 20 | 21 | 如果您想要贡献代码,请遵循 [开发规范](/about/dev/standard)。 22 | 23 | ## 贡献生态 24 | 25 | 如果您想要制作一些示例和教程,这是相当欢迎的。 26 | 27 | 您可以提交相关链接到 [资源](/resources/) 页面中。 28 | -------------------------------------------------------------------------------- /docs/contributing/writing-guide.md: -------------------------------------------------------------------------------- 1 | # 文档写作指南 2 | 3 | ## 名词 4 | 5 | - 用户:使用 ADV.JS 制作游戏的开发者 6 | - 玩家:试玩 ADV.JS 开发游戏成品的人 7 | -------------------------------------------------------------------------------- /docs/ecosystem/index.md: -------------------------------------------------------------------------------- 1 | # 总览 2 | 3 | ## 子模块 4 | 5 | 为了使 ADV.JS 更易于使用,我们也产出了一些辅助工具。 6 | 7 | > 渐进式编辑器:每个编辑器都是一个子模块,用户只需使用对应功能的编辑器。 8 | 9 | - [剧本解析器](https://parser.advjs.org): 你可以实时查看 AdvScript/Markdown 被解析的语法书形态。 10 | - [VRM 模型编辑器](/guide/editor/vrm): 当你使用 3D 能力时,你可能会用到它。 11 | -------------------------------------------------------------------------------- /docs/en/guide/index.md: -------------------------------------------------------------------------------- 1 | # Translations 2 | 3 | ::: warning 4 | Work in Progress 5 | ::: 6 | -------------------------------------------------------------------------------- /docs/guide/advscript/faq.md: -------------------------------------------------------------------------------- 1 | # FAQ 2 | 3 | ## 旁白使用 `blockquote` 语法 4 | 5 | 旁白使用 `blockquote` 语法以避免旁白中存在特殊字符如 `:`/`:`,被当作对话解析。 6 | -------------------------------------------------------------------------------- /docs/guide/config/animation.md: -------------------------------------------------------------------------------- 1 | # 动画 2 | 3 | ## 打字机动画 4 | 5 | 当前为自定义实现,后续考虑集成 [typed.js](https://mattboldt.com/demos/typed-js/)。 6 | -------------------------------------------------------------------------------- /docs/guide/editor/basic.md: -------------------------------------------------------------------------------- 1 | # 基础操作 2 | 3 | > 4 | -------------------------------------------------------------------------------- /docs/guide/editor/index.md: -------------------------------------------------------------------------------- 1 | # 编辑器 2 | 3 | > TODO 4 | 5 | - [在线编辑器](https://editor.advjs.org) 6 | - [ ] 客户端 7 | -------------------------------------------------------------------------------- /docs/guide/editor/script.md: -------------------------------------------------------------------------------- 1 | # 剧本编辑器 2 | 3 | 目前推荐使用代码编辑器。 4 | 5 | TODO 6 | 7 | 后续考虑提供插件或嵌入。 8 | -------------------------------------------------------------------------------- /docs/guide/features.md: -------------------------------------------------------------------------------- 1 | # 功能 2 | 3 | ## 富文本 4 | 5 | 对话内容支持富文本 6 | 7 | > 这是常见的 AVG 引擎会支持的功能和语法,ADV.JS 当然支持。 8 | 9 | 譬如: 10 | 11 | ```html 12 | 你好**鸭** 早上**好** 13 | ``` 14 | 15 | 你好 16 | 早上 17 | 18 | **但不止如此:** 19 | 20 | ADV.JS 还支持 HTML、CSS 与 UnoCSS 工具类,这意味这可以更加多样地控制它的样式,而不仅局限于富文本的语法。 21 | 22 | 譬如: 23 | 24 | ```html 25 | 红色 26 | ``` 27 | 28 | 红色 29 | -------------------------------------------------------------------------------- /docs/guide/mode.md: -------------------------------------------------------------------------------- 1 | # 模式 - 运行与编译 2 | 3 | 为了开发体验,ADV.JS 需要借助 Vite 虚拟模块来实现开发时的热更新。 4 | 这意味着,最终产物需要经过编译才能在浏览器中运行,并做更多的编译优化。 5 | 6 | 但同时,我们又希望提供一个 Playground,允许用户直接在浏览器中体验自定义的故事。 7 | 8 | 因此,ADV.JS 计划提供两种模式: 9 | 10 | - **运行时模式**:在浏览器中直接运行,适合快速体验和调试,能够动态加载数据。 11 | - **编译器模式**:在 Vite 中编译,适合生产环境和复杂的项目。 12 | 13 | ## 运行时 Runtime 14 | 15 | ## 编译器 Compiler 16 | -------------------------------------------------------------------------------- /docs/guide/quick-start.md: -------------------------------------------------------------------------------- 1 | # 快速开始 2 | 3 | ::: warning 4 | 尚未发布 5 | ::: 6 | 7 | ## Online 8 | 9 | Todo: [StackBlitz](https://stackblitz.com/) Demo 10 | 11 | ## Local 12 | 13 | 执行以下命令,以在本地创建一个 advjs 项目模版。 14 | 15 | ```bash 16 | pnpm create adv@latest your-adv 17 | ``` 18 | 19 | With NPM: 20 | 21 | ```bash 22 | npm init adv 23 | ``` 24 | 25 | With Yarn: 26 | 27 | ```bash 28 | yarn create adv 29 | ``` 30 | 31 | 进入目录并启动: 32 | 33 | ```bash 34 | cd your-adv 35 | pnpm i 36 | pnpm run dev 37 | ``` 38 | -------------------------------------------------------------------------------- /docs/guide/record.md: -------------------------------------------------------------------------------- 1 | # 录制视频 2 | 3 | > 计划提供脚本借助 [obs-websocket-js](https://www.npmjs.com/package/obs-websocket-js),操作 OBS Studio 录制视频。 4 | 5 | ## 准备 6 | 7 | - 下载 [OBS Studio](https://obsproject.com/) 8 | - 安装 [obs-websocket](https://obsproject.com/forum/resources/obs-websocket-remote-control-obs-studio-from-websockets.466/) 9 | -------------------------------------------------------------------------------- /docs/guide/typescript/how.md: -------------------------------------------------------------------------------- 1 | # Using ADV.JS with TypeScript 2 | 3 | ::: tip 4 | ADV.JS 由 TypeScript 构建,支持类型提示。 5 | 6 | 我们强烈推荐你与 ADV.JS 一起使用 TypeScript,以获得类型提示及早发现潜在问题。 7 | ::: 8 | 9 | TODO: 一些 TS 使用技巧。 10 | -------------------------------------------------------------------------------- /docs/netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | publish = "dist" 3 | command = "pnpm run build" 4 | 5 | [build.environment] 6 | NODE_VERSION = "22" 7 | 8 | [[redirects]] 9 | from = "/*" 10 | to = "/index.html" 11 | status = 200 12 | 13 | [[headers]] 14 | for = "/manifest.webmanifest" 15 | 16 | [headers.values] 17 | Content-Type = "application/manifest+json" 18 | -------------------------------------------------------------------------------- /docs/public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / 3 | -------------------------------------------------------------------------------- /docs/resources/learning.md: -------------------------------------------------------------------------------- 1 | # 学习资源 2 | 3 | > 不存在的! 4 | 5 | 还没有呢…… 6 | -------------------------------------------------------------------------------- /docs/resources/showcases.md: -------------------------------------------------------------------------------- 1 | # 案例展示 2 | 3 | > 展示使用 ADV.JS 制作的游戏示例。 4 | 5 | TODO: 预览图 6 | 7 | ## 官方示例 8 | 9 | - [武林外传](https://demo.advjs.org) 10 | - [Love](https://love.demo.advjs.org) 11 | 12 | ## 其他示例 13 | 14 | 欢迎提交 👏 15 | -------------------------------------------------------------------------------- /editor/README.md: -------------------------------------------------------------------------------- 1 | # ADV.JS Editor 2 | 3 | For compatibility, we use [Electron](https://github.com/electron/electron) to build the editor. 4 | 5 | ## Why Electron? 6 | 7 | - Support Build for Windows, Linux, MacOS 8 | - Compatibility for Users 9 | -------------------------------------------------------------------------------- /editor/core/.env.example: -------------------------------------------------------------------------------- 1 | # nuxt-auth-utils 2 | NUXT_SESSION_PASSWORD= 3 | # github oauth https://github.com/settings/applications/new 4 | NUXT_OAUTH_GITHUB_CLIENT_ID= 5 | NUXT_OAUTH_GITHUB_CLIENT_SECRET= 6 | -------------------------------------------------------------------------------- /editor/core/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.log 3 | dist 4 | .output 5 | .nuxt 6 | .env 7 | .idea/ 8 | -------------------------------------------------------------------------------- /editor/core/.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist=true 2 | strict-peer-dependencies=false 3 | shell-emulator=true 4 | -------------------------------------------------------------------------------- /editor/core/app/components/Counter.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 18 | -------------------------------------------------------------------------------- /editor/core/app/components/DarkToggle.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | -------------------------------------------------------------------------------- /editor/core/app/components/Footer.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /editor/core/app/components/Logos.vue: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /editor/core/app/components/PageView.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /editor/core/app/components/dialogs/AEGlobalDialogs.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /editor/core/app/components/dialogs/tabs/AEProjectSettingsTab.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 20 | -------------------------------------------------------------------------------- /editor/core/app/components/layout/EditorMenubar.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /editor/core/app/components/nodes/HintOverlay.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 21 | -------------------------------------------------------------------------------- /editor/core/app/components/nodes/MapEditor.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 19 | -------------------------------------------------------------------------------- /editor/core/app/components/panel/README.md: -------------------------------------------------------------------------------- 1 | # Panel 2 | -------------------------------------------------------------------------------- /editor/core/app/components/panel/character/AEWindowCharacter.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | -------------------------------------------------------------------------------- /editor/core/app/components/scene/SceneToolbar.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /editor/core/app/components/system/flow/styles/css-vars.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | --vf-node-text: var(--adv-c-text-1); 3 | --vf-node-bg: var(--adv-c-bg-alt); 4 | 5 | // connection line 6 | // --vf-connection-path: red; 7 | } 8 | -------------------------------------------------------------------------------- /editor/core/app/components/system/flow/styles/index.ts: -------------------------------------------------------------------------------- 1 | /* these are necessary styles for vue flow */ 2 | import '@vue-flow/core/dist/style.css' 3 | /* this contains the default theme, these are optional styles */ 4 | import '@vue-flow/core/dist/theme-default.css' 5 | 6 | import '@vue-flow/node-resizer/dist/style.css' 7 | import '@vue-flow/controls/dist/style.css' 8 | 9 | import './css-vars.scss' 10 | 11 | import './vue-flow.scss' 12 | -------------------------------------------------------------------------------- /editor/core/app/components/system/flow/styles/vue-flow.scss: -------------------------------------------------------------------------------- 1 | // override '@vue-flow/minimap/dist/style.css' 2 | .vue-flow__minimap { 3 | // background-color: var(--vf-node-bg); 4 | } 5 | 6 | .vue-flow__minimap.pannable { 7 | cursor: grab; 8 | } 9 | .vue-flow__minimap.dragging { 10 | cursor: grabbing; 11 | } 12 | .vue-flow__minimap-mask.pannable { 13 | cursor: grab; 14 | } 15 | 16 | .vue-flow__minimap-node { 17 | // background-color: var(--vf-node-bg-alt); 18 | background-color: var(--adv-c-bg-alt); 19 | fill: rgba(0, 0, 0, 0.5); 20 | } 21 | -------------------------------------------------------------------------------- /editor/core/app/components/tools/BrushTool.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 18 | -------------------------------------------------------------------------------- /editor/core/app/composables/editor/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useEditorMenubar' 2 | -------------------------------------------------------------------------------- /editor/core/app/composables/flow/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useFlowLayout' 2 | -------------------------------------------------------------------------------- /editor/core/app/composables/index.ts: -------------------------------------------------------------------------------- 1 | export * from './editor' 2 | export * from './inspector' 3 | export * from './user' 4 | -------------------------------------------------------------------------------- /editor/core/app/composables/inspector/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useInspectorFileHandle' 2 | export * from './useInspectorOnlineFile' 3 | -------------------------------------------------------------------------------- /editor/core/app/composables/inspector/useInspectorOnlineFile.ts: -------------------------------------------------------------------------------- 1 | export function useInspectorOnlineFile() { 2 | const onlineStore = useOnlineStore() 3 | 4 | const icon = ref('i-vscode-icons:file-type-json') 5 | 6 | const name = computed(() => { 7 | const url = new URL(onlineStore.onlineAdvConfigFileUrl) 8 | const path = url.pathname 9 | return path.split('/').pop() || '' 10 | }) 11 | 12 | const language = computed(() => { 13 | return name.value?.endsWith('.json') ? 'json' : 'plaintext' 14 | }) 15 | 16 | return { 17 | name, 18 | icon, 19 | language, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /editor/core/app/composables/user/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useWxLogin' 2 | -------------------------------------------------------------------------------- /editor/core/app/constants/data/index.ts: -------------------------------------------------------------------------------- 1 | export * from './default' 2 | export * from './game' 3 | -------------------------------------------------------------------------------- /editor/core/app/constants/game-config.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * default game config 3 | */ 4 | 5 | /** 6 | * default bgm library url 7 | */ 8 | export const DEFAULT_BGM_LIBRARY_URL = 'https://cos.advjs.yunle.fun/bgms/bgm-library.json' 9 | -------------------------------------------------------------------------------- /editor/core/app/constants/index.ts: -------------------------------------------------------------------------------- 1 | export const appName = 'ADV.JS Editor' 2 | export const appDescription = 'Create and share your own adventures' 3 | 4 | export * from './data' 5 | export * from './game-config' 6 | -------------------------------------------------------------------------------- /editor/core/app/layouts/README.md: -------------------------------------------------------------------------------- 1 | ## Layouts 2 | 3 | Vue components in this dir are used as layouts. 4 | 5 | By default, `default.vue` will be used unless an alternative is specified in the route meta. 6 | 7 | ```html 8 | 13 | ``` 14 | 15 | Learn more on https://nuxt.com/docs/guide/directory-structure/layouts 16 | -------------------------------------------------------------------------------- /editor/core/app/layouts/default.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /editor/core/app/layouts/editor.vue: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /editor/core/app/layouts/home.vue: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /editor/core/app/pages/[...all].vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 18 | -------------------------------------------------------------------------------- /editor/core/app/pages/dashboard.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /editor/core/app/pages/login.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 24 | -------------------------------------------------------------------------------- /editor/core/app/plugins/baklava.client.ts: -------------------------------------------------------------------------------- 1 | // import '@baklavajs/plugin-renderer-vue/dist/styles.css' 2 | import '@baklavajs/themes/dist/classic.css' 3 | 4 | // import '@baklavajs/themes/dist/syrup-dark.css' 5 | 6 | // https://github.com/uuidjs/uuid#getrandomvalues-not-supported 7 | 8 | export default defineNuxtPlugin((_nuxtApp) => {}) 9 | -------------------------------------------------------------------------------- /editor/core/app/shims.d.ts: -------------------------------------------------------------------------------- 1 | declare interface Window { 2 | // https://clarity.microsoft.com 3 | clarity: (action: 'event' | 'set', ...args: any[]) => void 4 | } 5 | -------------------------------------------------------------------------------- /editor/core/app/stores/brush.ts: -------------------------------------------------------------------------------- 1 | import type * as PIXI from 'pixi.js' 2 | import { acceptHMRUpdate, defineStore } from 'pinia' 3 | import { ref } from 'vue' 4 | 5 | export const useBrushStore = defineStore('brush', () => { 6 | const color = ref('#000000') 7 | const size = ref(10) 8 | 9 | const histories = ref([]) 10 | 11 | return { 12 | color, 13 | size, 14 | 15 | histories, 16 | } 17 | }) 18 | 19 | if (import.meta.hot) 20 | import.meta.hot.accept(acceptHMRUpdate(useBrushStore, import.meta.hot)) 21 | -------------------------------------------------------------------------------- /editor/core/app/stores/useAudioStore.ts: -------------------------------------------------------------------------------- 1 | import { useStorage } from '@vueuse/core' 2 | import { acceptHMRUpdate, defineStore } from 'pinia' 3 | 4 | export const useAudioStore = defineStore('editor:audio', () => { 5 | /** 6 | * 背景音乐库地址 7 | */ 8 | const bgmLibraryUrl = useStorage('ae:bgm-library-url', '') 9 | const bgmLibraryData = useStorage>('ae:bgm-library-data', {}) 10 | 11 | return { 12 | bgmLibraryUrl, 13 | bgmLibraryData, 14 | } 15 | }) 16 | 17 | if (import.meta.hot) 18 | import.meta.hot.accept(acceptHMRUpdate(useAudioStore, import.meta.hot)) 19 | -------------------------------------------------------------------------------- /editor/core/app/stores/useCharacterStore.ts: -------------------------------------------------------------------------------- 1 | import type { AdvCharacter } from '@advjs/types' 2 | import { acceptHMRUpdate, defineStore } from 'pinia' 3 | 4 | export const useCharacterStore = defineStore('editor:character', () => { 5 | /** 6 | * 被选择的角色 7 | */ 8 | const selectedCharacter = ref() 9 | 10 | return { 11 | selectedCharacter, 12 | } 13 | }) 14 | 15 | if (import.meta.hot) 16 | import.meta.hot.accept(acceptHMRUpdate(useCharacterStore, import.meta.hot)) 17 | -------------------------------------------------------------------------------- /editor/core/app/stores/useDialogStore.ts: -------------------------------------------------------------------------------- 1 | import { acceptHMRUpdate, defineStore } from 'pinia' 2 | 3 | /** 4 | * for runtime 5 | */ 6 | export const useDialogStore = defineStore('@advjs/editor:dialog', () => { 7 | /** 8 | * dialog open states 9 | */ 10 | const openStates = ref({ 11 | login: false, 12 | about: false, 13 | settings: false, 14 | projectSettings: false, 15 | 16 | githubRepos: false, 17 | }) 18 | 19 | return { 20 | openStates, 21 | } 22 | }) 23 | 24 | if (import.meta.hot) 25 | import.meta.hot.accept(acceptHMRUpdate(useDialogStore, import.meta.hot)) 26 | -------------------------------------------------------------------------------- /editor/core/app/styles/css-vars.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | --adv-editor-xxx: #0078e7; 3 | } 4 | -------------------------------------------------------------------------------- /editor/core/app/styles/index.ts: -------------------------------------------------------------------------------- 1 | import './css-vars.scss' 2 | import './main.scss' 3 | 4 | import '@advjs/client/styles/css-vars.scss' 5 | -------------------------------------------------------------------------------- /editor/core/app/styles/main.scss: -------------------------------------------------------------------------------- 1 | @use '@advjs/gui/client/styles/index.scss' as *; 2 | 3 | body { 4 | font-size: small; 5 | } 6 | 7 | // Remove the outline on focus 8 | :focus-visible { 9 | outline: none; 10 | } 11 | -------------------------------------------------------------------------------- /editor/core/app/types/adapter.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * modify config format 3 | */ 4 | export type AdvConfigAdapterType = 'default' | 'pominis' 5 | -------------------------------------------------------------------------------- /editor/core/app/types/flow/index.ts: -------------------------------------------------------------------------------- 1 | import type { FlowExportObject } from '@vue-flow/core' 2 | 3 | export interface AdvFlowItem { 4 | id?: string 5 | name: string 6 | 7 | zhName?: string 8 | desc?: string 9 | version?: string 10 | tags?: string[] 11 | data: FlowExportObject 12 | 13 | createdAt: number | string 14 | updatedAt: number | string 15 | } 16 | -------------------------------------------------------------------------------- /editor/core/app/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './adapter' 2 | export * from './flow' 3 | -------------------------------------------------------------------------------- /editor/core/app/utils/adapters/index.ts: -------------------------------------------------------------------------------- 1 | export * from '../../../../../plugins/plugin-pominis/src' 2 | -------------------------------------------------------------------------------- /editor/core/app/utils/analystics/events/constants.ts: -------------------------------------------------------------------------------- 1 | export const ANALYTICS_EVENTS = { 2 | /** 3 | * @description reset editor layout 4 | */ 5 | RESET_LAYOUT: 'reset_layout', 6 | } 7 | -------------------------------------------------------------------------------- /editor/core/app/utils/analystics/index.ts: -------------------------------------------------------------------------------- 1 | export * from './events' 2 | -------------------------------------------------------------------------------- /editor/core/app/utils/cos/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 客户端上传(前端直接上传到腾讯云 COS) 3 | * @see https://cloud.tencent.com/document/product/436/109014 4 | */ 5 | 6 | export * from './upload' 7 | export * from './utils' 8 | -------------------------------------------------------------------------------- /editor/core/app/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './adapters' 2 | export * from './analystics' 3 | -------------------------------------------------------------------------------- /editor/core/app/utils/map/hexagonal/config.ts: -------------------------------------------------------------------------------- 1 | export const config = { 2 | grid: { 3 | size: 30, 4 | }, 5 | } 6 | -------------------------------------------------------------------------------- /editor/core/app/utils/map/hexagonal/event/index.ts: -------------------------------------------------------------------------------- 1 | export * from './scale' 2 | -------------------------------------------------------------------------------- /editor/core/app/utils/map/hexagonal/event/scale.ts: -------------------------------------------------------------------------------- 1 | import type { Application, Container } from 'pixi.js' 2 | 3 | /** 4 | * add global scale 5 | */ 6 | export function addMapScale(app: Application, target: Container) { 7 | app.stage.addEventListener('wheel', (e) => { 8 | e.preventDefault() 9 | e.stopPropagation() 10 | 11 | const delta = e.deltaY 12 | const scale = target.scale.x + delta * 0.01 13 | target.scale.set(scale) 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /editor/core/app/utils/map/hexagonal/global.ts: -------------------------------------------------------------------------------- 1 | import type { Sprite } from 'pixi.js' 2 | import { defineHex } from 'honeycomb-grid' 3 | import { config } from './config' 4 | 5 | export const CustomHex = defineHex({ dimensions: config.grid.size, origin: 'topLeft' }) 6 | export const tilesMap = new Map() 7 | -------------------------------------------------------------------------------- /editor/core/app/utils/map/index.ts: -------------------------------------------------------------------------------- 1 | export * from './hexagonal' 2 | -------------------------------------------------------------------------------- /editor/core/netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | publish = "dist" 3 | command = "pnpm run build" 4 | 5 | [build.environment] 6 | NODE_VERSION = "22" 7 | 8 | [[redirects]] 9 | from = "/*" 10 | to = "/index.html" 11 | status = 200 12 | 13 | [[headers]] 14 | for = "/manifest.webmanifest" 15 | 16 | [headers.values] 17 | Content-Type = "application/manifest+json" 18 | -------------------------------------------------------------------------------- /editor/core/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/editor/core/public/favicon.ico -------------------------------------------------------------------------------- /editor/core/public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /editor/core/public/hex-tiles/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/editor/core/public/hex-tiles/README.md -------------------------------------------------------------------------------- /editor/core/public/hex-tiles/isle-of-lore-2/grassland/green/grassland_dense_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/editor/core/public/hex-tiles/isle-of-lore-2/grassland/green/grassland_dense_0.png -------------------------------------------------------------------------------- /editor/core/public/hex-tiles/isle-of-lore-2/grassland/winter/grassland_clearing_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/editor/core/public/hex-tiles/isle-of-lore-2/grassland/winter/grassland_clearing_0.png -------------------------------------------------------------------------------- /editor/core/public/hex-tiles/isle-of-lore-2/mountain_oak_forest/mountain_oak_forest_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/editor/core/public/hex-tiles/isle-of-lore-2/mountain_oak_forest/mountain_oak_forest_0.png -------------------------------------------------------------------------------- /editor/core/public/hex-tiles/isle-of-lore-2/ocean/ocean_small_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/editor/core/public/hex-tiles/isle-of-lore-2/ocean/ocean_small_0.png -------------------------------------------------------------------------------- /editor/core/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / 3 | -------------------------------------------------------------------------------- /editor/core/public/vite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/editor/core/public/vite.png -------------------------------------------------------------------------------- /editor/core/server/api/pageview.ts: -------------------------------------------------------------------------------- 1 | const startAt = Date.now() 2 | let count = 0 3 | 4 | export default defineEventHandler(() => ({ 5 | pageview: count++, 6 | startAt, 7 | })) 8 | -------------------------------------------------------------------------------- /editor/core/server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../.nuxt/tsconfig.server.json" 3 | } 4 | -------------------------------------------------------------------------------- /editor/core/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./.nuxt/tsconfig.json", 3 | "compilerOptions": { 4 | "types": [ 5 | "@types/wicg-file-system-access" 6 | ], 7 | "verbatimModuleSyntax": true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /editor/vrm/.gitignore: -------------------------------------------------------------------------------- 1 | public/models 2 | -------------------------------------------------------------------------------- /editor/vrm/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "i18n-ally.localesPaths": [ 3 | "locales" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /editor/vrm/README.md: -------------------------------------------------------------------------------- 1 |

2 | VRM Online Editor 3 |

4 | 5 |
6 | 7 |

8 | Live Demo 9 |

10 | 11 |
12 | 13 | VRM 模型在线编辑器,您可以使用其来快速创建人物动作与表情,并将数据下载至 ADV.JS 使用。 14 | 15 | ## Usage 16 | 17 | 按 R 切换旋转 18 | 19 | ## Features 20 | 21 | - 拖拽上传 VRM 模型 22 | - 编辑模型动作、表情 23 | - [ ] 下载 [VRMPose](https://pixiv.github.io/three-vrm/docs/interfaces/vrmpose.html) 数据 24 | - [ ] 上传 VRMPose 数据 25 | - 动作捕捉(将会与 [vtuber](https://github.com/YunYouJun/vtuber) 整合) 26 | -------------------------------------------------------------------------------- /editor/vrm/locales/README.md: -------------------------------------------------------------------------------- 1 | ## i18n 2 | 3 | This directory is to serve your locale translation files. YAML under this folder would be loaded automatically and register with their filenames as locale code. 4 | 5 | Check out [`vue-i18n`](https://github.com/intlify/vue-i18n-next) for more details. 6 | 7 | If you are using VS Code, [`i18n Ally`](https://github.com/lokalise/i18n-ally) is recommended to make the i18n experience better. 8 | -------------------------------------------------------------------------------- /editor/vrm/netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | publish = "dist" 3 | command = "pnpm run build" 4 | 5 | [build.environment] 6 | NODE_VERSION = "22" 7 | 8 | [[redirects]] 9 | from = "/*" 10 | to = "/index.html" 11 | status = 200 12 | 13 | [[headers]] 14 | for = "/manifest.webmanifest" 15 | 16 | [headers.values] 17 | Content-Type = "application/manifest+json" 18 | -------------------------------------------------------------------------------- /editor/vrm/public/CNAME: -------------------------------------------------------------------------------- 1 | vrm.advjs.org 2 | -------------------------------------------------------------------------------- /editor/vrm/public/README.md: -------------------------------------------------------------------------------- 1 | # public 2 | 3 | - `models/vrm/alicia-solid.vrm` 4 | -------------------------------------------------------------------------------- /editor/vrm/public/_headers: -------------------------------------------------------------------------------- 1 | /assets/* 2 | cache-control: max-age=31536000 3 | cache-control: immutable 4 | -------------------------------------------------------------------------------- /editor/vrm/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / 3 | -------------------------------------------------------------------------------- /editor/vrm/src/App.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 18 | -------------------------------------------------------------------------------- /editor/vrm/src/composables/dark.ts: -------------------------------------------------------------------------------- 1 | import { useDark, useToggle } from '@vueuse/core' 2 | 3 | export const isDark = useDark() 4 | export const toggleDark = useToggle(isDark) 5 | -------------------------------------------------------------------------------- /editor/vrm/src/composables/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dark' 2 | -------------------------------------------------------------------------------- /editor/vrm/src/layouts/README.md: -------------------------------------------------------------------------------- 1 | # Layouts 2 | 3 | Vue components in this dir are used as layouts. 4 | 5 | By default, `default.vue` will be used unless an alternative is specified in the route meta. 6 | 7 | With [`vite-plugin-vue-layouts`](https://github.com/JohnCampionJr/vite-plugin-vue-layouts), you can specify the layout in the page's SFCs like this: 8 | 9 | ```html 10 | meta: layout: home 11 | ``` 12 | -------------------------------------------------------------------------------- /editor/vrm/src/layouts/default.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /editor/vrm/src/layouts/home.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /editor/vrm/src/modules/README.md: -------------------------------------------------------------------------------- 1 | ## Modules 2 | 3 | A custom user module system. Place a `.ts` file with the following template, it will be installed automatically. 4 | 5 | ```ts 6 | import type { UserModule } from '~/types' 7 | 8 | export const install: UserModule = ({ app, router, isClient }) => { 9 | // do something 10 | } 11 | ``` 12 | -------------------------------------------------------------------------------- /editor/vrm/src/modules/about.ts: -------------------------------------------------------------------------------- 1 | import type { UserModule } from '../types' 2 | import { isClient } from '@vueuse/core' 3 | import * as pkg from '../../package.json' 4 | 5 | export const install: UserModule = () => { 6 | if (isClient) { 7 | // eslint-disable-next-line no-console 8 | console.log( 9 | `%c @advjs/vrm v${pkg.version} %c ${pkg.repository.url} `, 10 | 'background-color:dodgerblue;color:white;padding:2px;', 11 | 'border: 1px solid dodgerblue;padding:1px;', 12 | ) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /editor/vrm/src/modules/adv.ts: -------------------------------------------------------------------------------- 1 | import type { UserModule } from '../types' 2 | import { themeConfigSymbol } from '@advjs/core' 3 | import { computed } from 'vue' 4 | 5 | // https://github.com/antfu/vite-plugin-pwa#automatic-reload-when-new-content-available 6 | export const install: UserModule = ({ app }) => { 7 | // install theme 8 | const themeConfig = computed(() => {}) 9 | app.provide(themeConfigSymbol, themeConfig) 10 | } 11 | -------------------------------------------------------------------------------- /editor/vrm/src/modules/nprogress.ts: -------------------------------------------------------------------------------- 1 | import type { UserModule } from '../types' 2 | import NProgress from 'nprogress' 3 | 4 | export const install: UserModule = ({ isClient, router }) => { 5 | if (isClient) { 6 | router.beforeEach(() => { 7 | NProgress.start() 8 | }) 9 | router.afterEach(() => { 10 | NProgress.done() 11 | }) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /editor/vrm/src/modules/pinia.ts: -------------------------------------------------------------------------------- 1 | import type { UserModule } from '../types' 2 | import { createPinia } from 'pinia' 3 | 4 | // Setup Pinia 5 | // https://pinia.esm.dev/ 6 | export const install: UserModule = ({ isClient, initialState, app }) => { 7 | const pinia = createPinia() 8 | app.use(pinia) 9 | // Refer to 10 | // https://github.com/antfu/vite-ssg/blob/main/README.md#state-serialization 11 | // for other serialization strategies. 12 | if (isClient) 13 | pinia.state.value = (initialState.pinia) || {} 14 | 15 | else 16 | initialState.pinia = pinia.state.value 17 | } 18 | -------------------------------------------------------------------------------- /editor/vrm/src/modules/pwa.ts: -------------------------------------------------------------------------------- 1 | import type { UserModule } from '../types' 2 | 3 | // https://github.com/antfu/vite-plugin-pwa#automatic-reload-when-new-content-available 4 | export const install: UserModule = ({ isClient, router }) => { 5 | if (!isClient) 6 | return 7 | 8 | router.isReady().then(async () => { 9 | const { registerSW } = await import('virtual:pwa-register') 10 | registerSW({ immediate: true }) 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /editor/vrm/src/pages/[...all].vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 14 | meta: 15 | layout: 404 16 | 17 | -------------------------------------------------------------------------------- /editor/vrm/src/pages/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: About 3 | --- 4 | 5 |
6 | 7 |
8 |

About

9 |
10 | 11 | VRM 模型编辑器 12 | 13 | Check out the [GitHub repo](https://github.com/YunYouJun/advjs) for more details. 14 | -------------------------------------------------------------------------------- /editor/vrm/src/styles/index.scss: -------------------------------------------------------------------------------- 1 | @use '../../../../themes/theme-default/styles/adv/scrollbar.scss'; 2 | @use '../../../../themes/theme-default/styles/adv/slider.scss'; 3 | -------------------------------------------------------------------------------- /editor/vrm/src/styles/main.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #app { 4 | height: 100%; 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | html.dark { 10 | background: #121212; 11 | } 12 | 13 | #nprogress { 14 | pointer-events: none; 15 | } 16 | 17 | #nprogress .bar { 18 | @apply bg-blue-600 opacity-75; 19 | 20 | position: fixed; 21 | z-index: 1031; 22 | top: 0; 23 | left: 0; 24 | 25 | width: 100%; 26 | height: 2px; 27 | } 28 | -------------------------------------------------------------------------------- /editor/vrm/src/types.ts: -------------------------------------------------------------------------------- 1 | import type { ViteSSGContext } from 'vite-ssg' 2 | 3 | export type UserModule = (ctx: ViteSSGContext) => void 4 | -------------------------------------------------------------------------------- /editor/vrm/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json" 3 | } 4 | -------------------------------------------------------------------------------- /editor/vrm/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "rewrites": [ 3 | { 4 | "source": "/:path*", 5 | "destination": "/index.html" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import antfu from '@antfu/eslint-config' 3 | 4 | export default antfu( 5 | { 6 | unocss: true, 7 | formatters: true, 8 | }, 9 | { 10 | ignores: [ 11 | '**/.adv/**', 12 | '**/cache/**', 13 | ], 14 | }, 15 | ) 16 | -------------------------------------------------------------------------------- /packages/advjs/.gitignore: -------------------------------------------------------------------------------- 1 | tmp 2 | -------------------------------------------------------------------------------- /packages/advjs/README.md: -------------------------------------------------------------------------------- 1 | # ADV.JS 2 | 3 | More info see [advjs](https://github.com/YunYouJun/advjs). 4 | 5 | - refactor type, related [#4294 | @vue/core](https://github.com/vuejs/core/issues/4294) 6 | 7 | ## Introduction 8 | 9 | `advjs` includes the necessary monorepo `@advjs/*` to start an adv. 10 | 11 | Logic & utils based on node written in it. 12 | -------------------------------------------------------------------------------- /packages/advjs/bin/adv.mjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 'use strict' 3 | 4 | const modulePath = '../dist/cli/index.js' 5 | 6 | import(modulePath).catch((e) => { 7 | // eslint-disable-next-line no-console 8 | console.log(e) 9 | }) 10 | -------------------------------------------------------------------------------- /packages/advjs/client/index.ts: -------------------------------------------------------------------------------- 1 | export * from '@advjs/client' 2 | export * from '@advjs/core' 3 | -------------------------------------------------------------------------------- /packages/advjs/node/constants.ts: -------------------------------------------------------------------------------- 1 | export const customElements = new Set([ 2 | 'font', 3 | 4 | // katex 5 | 'annotation', 6 | 'math', 7 | 'menclose', 8 | 'mfrac', 9 | 'mglyph', 10 | 'mi', 11 | 'mlabeledtr', 12 | 'mn', 13 | 'mo', 14 | 'mover', 15 | 'mpadded', 16 | 'mphantom', 17 | 'mroot', 18 | 'mrow', 19 | 'mspace', 20 | 'msqrt', 21 | 'mstyle', 22 | 'msub', 23 | 'msubsup', 24 | 'msup', 25 | 'mtable', 26 | 'mtd', 27 | 'mtext', 28 | 'mtr', 29 | 'munder', 30 | 'munderover', 31 | 'semantics', 32 | ]) 33 | -------------------------------------------------------------------------------- /packages/advjs/node/index.ts: -------------------------------------------------------------------------------- 1 | export * from './commands/serve' 2 | export * from './config' 3 | export * from './options' 4 | export * from './plugins/preset' 5 | export * from './utils' 6 | -------------------------------------------------------------------------------- /packages/advjs/node/plugins/adv/check.ts: -------------------------------------------------------------------------------- 1 | import { consola } from 'consola' 2 | 3 | export function checkAdvMd(md: string, id: string) { 4 | if (!md) 5 | consola.warn(`[adv:loader] entry ${id || 'adv.md'} is empty`) 6 | } 7 | -------------------------------------------------------------------------------- /packages/advjs/node/plugins/adv/index.ts: -------------------------------------------------------------------------------- 1 | export * from './check' 2 | export * from './head' 3 | export * from './markdown' 4 | export * from './options' 5 | -------------------------------------------------------------------------------- /packages/advjs/node/plugins/unocss.ts: -------------------------------------------------------------------------------- 1 | import type { AdvPluginOptions, ResolvedAdvOptions } from '..' 2 | 3 | import UnoCSS from 'unocss/vite' 4 | import setupUnocss from '../setups/unocss' 5 | 6 | export async function createUnocssPlugin( 7 | options: ResolvedAdvOptions, 8 | pluginOptions: AdvPluginOptions, 9 | ) { 10 | return UnoCSS({ 11 | configFile: false, 12 | ...await setupUnocss(options), 13 | ...pluginOptions.unocss, 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /packages/advjs/node/plugins/virtual/data.ts: -------------------------------------------------------------------------------- 1 | import type { VirtualModuleTemplate } from './types' 2 | 3 | export const templateData: VirtualModuleTemplate = { 4 | id: '/@advjs/data', 5 | async getContent({ data }) { 6 | return `export default ${JSON.stringify(data)}` 7 | }, 8 | } 9 | -------------------------------------------------------------------------------- /packages/advjs/node/plugins/virtual/index.ts: -------------------------------------------------------------------------------- 1 | import { templateConfigs } from './configs' 2 | import { templateData } from './data' 3 | import { templateGames } from './game' 4 | import { templateLocales } from './locales' 5 | import { templateSetups } from './setups' 6 | import { templateStyles } from './styles' 7 | 8 | export const templates = [ 9 | templateData, 10 | templateLocales, 11 | templateStyles, 12 | 13 | ...templateConfigs, 14 | ...templateGames, 15 | ...templateSetups, 16 | ] 17 | -------------------------------------------------------------------------------- /packages/advjs/node/plugins/virtual/types.ts: -------------------------------------------------------------------------------- 1 | import type { Awaitable } from '@antfu/utils' 2 | import type { PluginContext } from 'rollup' 3 | import type { ResolvedAdvOptions } from '../../options' 4 | 5 | export interface VirtualModuleTemplate { 6 | id: string 7 | getContent: (this: PluginContext, options: ResolvedAdvOptions) => Awaitable 8 | } 9 | -------------------------------------------------------------------------------- /packages/advjs/tsdown.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'tsdown' 2 | import { ADV_VIRTUAL_MODULES } from './node/config' 3 | 4 | import pkg from './package.json' 5 | 6 | export default defineConfig({ 7 | dts: true, 8 | entry: [ 9 | './node/index.ts', 10 | './node/cli/index.ts', 11 | ], 12 | clean: true, 13 | external: [ 14 | '@advjs/core', 15 | 16 | '@playwright/test', 17 | 18 | 'mdast', 19 | 20 | ...Object.keys(pkg.dependencies), 21 | ...ADV_VIRTUAL_MODULES, 22 | ], 23 | }) 24 | -------------------------------------------------------------------------------- /packages/benchmarks/.gitignore: -------------------------------------------------------------------------------- 1 | data/ 2 | benchmark/results/ 3 | -------------------------------------------------------------------------------- /packages/benchmarks/README.md: -------------------------------------------------------------------------------- 1 | # Benchmarks 2 | 3 | - [DFS VS unist-util-visit](./src/visit/README.md) 4 | - [JSON VS XML](./src/json-xml/README.md) 5 | -------------------------------------------------------------------------------- /packages/benchmarks/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@advjs/benchmarks", 3 | "private": true, 4 | "scripts": { 5 | "start:visit": "tsx src/visit/index.ts", 6 | "start:json-xml": "tsx src/json-xml/index.ts", 7 | "generate:json-xml": "tsx src/json-xml/generate.ts --generate" 8 | }, 9 | "devDependencies": { 10 | "@faker-js/faker": "catalog:", 11 | "@types/xml2js": "catalog:", 12 | "benny": "catalog:", 13 | "consola": "catalog:", 14 | "unist-builder": "catalog:", 15 | "unist-util-visit": "catalog:", 16 | "xml2js": "catalog:" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/benchmarks/src/json-xml/common.ts: -------------------------------------------------------------------------------- 1 | import path from 'node:path' 2 | 3 | export const jsonFolder = path.resolve(__dirname, 'data/json') 4 | export const xmlFolder = path.resolve(__dirname, 'data/xml') 5 | -------------------------------------------------------------------------------- /packages/benchmarks/src/visit/dfs.ts: -------------------------------------------------------------------------------- 1 | import { consola } from 'consola' 2 | 3 | interface Tree { 4 | type: string 5 | children?: Tree[] 6 | } 7 | 8 | export function dfs(tree: Tree, callback: (node: Tree) => void) { 9 | callback(tree) 10 | try { 11 | if (tree.children) 12 | tree.children.map(child => dfs(child, (node: Tree) => callback(node))) 13 | } 14 | catch (e) { 15 | consola.error(e) 16 | } 17 | return null 18 | } 19 | -------------------------------------------------------------------------------- /packages/benchmarks/src/visit/utils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 测试性能 3 | * @param name 名称 4 | * @param callback 函数 5 | */ 6 | export function testPerformance(name: string, callback: () => void) { 7 | const startTime = performance.now() 8 | const count = callback() 9 | const endTime = performance.now() 10 | const duration = endTime - startTime 11 | return { 12 | name, 13 | time: duration, 14 | count, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/client/App.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 25 | -------------------------------------------------------------------------------- /packages/client/README.md: -------------------------------------------------------------------------------- 1 | # `advjs/client` 2 | 3 | The basic client(based on vue) of advjs. It can be integrated with themes. 4 | 5 | In theory we could have `React`, `Svelte`, `SolidJS`, etc. 6 | 7 | However, considering the convenience of unification, we give priority to provide and maintain a version of `Vue`. 8 | -------------------------------------------------------------------------------- /packages/client/assets/index.ts: -------------------------------------------------------------------------------- 1 | const cdnPrefix = 'https://assets.advjs.org' 2 | 3 | export const audios = { 4 | popDownUrl: `${cdnPrefix}/audio/pop-down.mp3`, 5 | popUpOnUrl: `${cdnPrefix}/audio/pop-up-on.mp3`, 6 | popUpOffUrl: `${cdnPrefix}/audio/pop-up-off.mp3`, 7 | } 8 | 9 | export const assets = { 10 | audios, 11 | } 12 | -------------------------------------------------------------------------------- /packages/client/compiler/README.md: -------------------------------------------------------------------------------- 1 | # @advjs/compiler 2 | 3 | With virtual module to build. 4 | -------------------------------------------------------------------------------- /packages/client/components/adv/AdvHelper.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | -------------------------------------------------------------------------------- /packages/client/components/adv/AdvOverlay.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /packages/client/components/base/BaseLayer.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | 21 | -------------------------------------------------------------------------------- /packages/client/components/custom/BackIcon.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /packages/client/components/icons/NewYunBorderLogo.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/packages/client/components/icons/NewYunBorderLogo.vue -------------------------------------------------------------------------------- /packages/client/components/icons/NewYunLogo.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /packages/client/components/internals/AdvButton.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/client/components/internals/BackButton.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /packages/client/components/internals/HorizontalDivider.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 15 | -------------------------------------------------------------------------------- /packages/client/components/menu/SpeechMenu.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/client/components/scene/AdvPixiCanvas.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /packages/client/components/scene/AdvScene.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 9 | -------------------------------------------------------------------------------- /packages/client/composables/flow/README.md: -------------------------------------------------------------------------------- 1 | # Flow 2 | 3 | 在用户端使用到的 Flow 功能。 4 | 5 | 例如:`流程图`。 6 | -------------------------------------------------------------------------------- /packages/client/composables/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config' 2 | 3 | export * from './useAdvBgm' 4 | export * from './useAdvCamera' 5 | export * from './useAdvContext' 6 | export * from './useAdvKeys' 7 | export * from './useAdvLogic' 8 | export * from './useAdvNav' 9 | export * from './useAdvTachies' 10 | -------------------------------------------------------------------------------- /packages/client/composables/useAdvCamera.ts: -------------------------------------------------------------------------------- 1 | import { useAdvStore } from '../stores' 2 | 3 | export function useAdvCamera() { 4 | const store = useAdvStore() 5 | return { 6 | handle() { 7 | store.cur.dialog = { 8 | type: 'dialog', 9 | character: { 10 | type: 'character', 11 | name: '', 12 | status: '', 13 | }, 14 | children: [ 15 | { 16 | type: 'text', 17 | value: '(镜头动画)', 18 | }, 19 | ], 20 | } 21 | }, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/client/composables/useAdvContext.ts: -------------------------------------------------------------------------------- 1 | import type { AdvContext } from '../types' 2 | // import { useAdvConfig } from '../../composables' 3 | import { injectLocal } from '@vueuse/core' 4 | import { injectionAdvContext } from '../constants' 5 | 6 | /** 7 | * advjs context 8 | */ 9 | export function useAdvContext() { 10 | const $adv = injectLocal(injectionAdvContext, {} as AdvContext)! 11 | 12 | return { 13 | $adv, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/client/constants/index.ts: -------------------------------------------------------------------------------- 1 | import type { ComputedRef, InjectionKey, Ref } from 'vue' 2 | import type { AdvContext } from '../types' 3 | 4 | export const injectionAdvContext = '$advjs-context' as unknown as InjectionKey 5 | 6 | export const injectionAdvContent = '$advjs-content' as unknown as InjectionKey> 7 | export const injectionAdvScale = '$advjs-scale' as unknown as InjectionKey> 8 | -------------------------------------------------------------------------------- /packages/client/env.ts: -------------------------------------------------------------------------------- 1 | export const isDev = import.meta.env.DEV 2 | 3 | /** 4 | * 是否处于编辑器模式 5 | */ 6 | export const isAdvEditor = import.meta.env.VITE_ADV_EDITOR 7 | -------------------------------------------------------------------------------- /packages/client/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @packageDocumentation 3 | * ADV.JS 客户端(组件与 API) 4 | * 5 | * @module @advjs/client 6 | */ 7 | export * from './assets' 8 | export * from './composables' 9 | export * from './pixi' 10 | export * from './setup' 11 | export * from './stores' 12 | export * from './types' 13 | export * from './utils' 14 | 15 | // virtual not export, in compiler 16 | // export * from './data' 17 | -------------------------------------------------------------------------------- /packages/client/layouts/empty.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /packages/client/modules/nprogress.ts: -------------------------------------------------------------------------------- 1 | import type { UserModule } from '../types' 2 | import NProgress from 'nprogress' 3 | 4 | export const install: UserModule = ({ isClient, router }) => { 5 | if (isClient) { 6 | NProgress.configure({ 7 | showSpinner: false, 8 | }) 9 | router.beforeEach(() => { 10 | NProgress.start() 11 | }) 12 | router.afterEach(() => { 13 | // setTimeout(() => { 14 | NProgress.done() 15 | // }, 5000000) 16 | }) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/client/modules/pinia.ts: -------------------------------------------------------------------------------- 1 | import type { UserModule } from '@advjs/client/types' 2 | import { createPinia } from 'pinia' 3 | 4 | // Setup Pinia 5 | // https://pinia.esm.dev/ 6 | export const install: UserModule = ({ app }) => { 7 | const pinia = createPinia() 8 | app.use(pinia) 9 | // Refer to 10 | // https://github.com/antfu/vite-ssg/blob/main/README.md#state-serialization 11 | // for other serialization strategies. 12 | // if (isClient) 13 | // pinia.state.value = initialState.pinia || {} 14 | // else initialState.pinia = pinia.state.value 15 | } 16 | -------------------------------------------------------------------------------- /packages/client/modules/swiper.ts: -------------------------------------------------------------------------------- 1 | import type { UserModule } from '@advjs/client/types' 2 | 3 | // import Swiper core and required modules 4 | // import 'swiper/css/navigation' 5 | import SwiperCore from 'swiper' 6 | import { EffectCreative } from 'swiper/modules' 7 | 8 | import { Swiper, SwiperSlide } from 'swiper/vue' 9 | // Import Swiper Vue.js components 10 | // Import Swiper styles in main 11 | import 'swiper/css' 12 | 13 | import 'swiper/css/effect-creative' 14 | 15 | export const install: UserModule = ({ app }) => { 16 | SwiperCore.use([EffectCreative]) 17 | app.component('VSwiper', Swiper) 18 | app.component('VSwiperSlide', SwiperSlide) 19 | } 20 | -------------------------------------------------------------------------------- /packages/client/pages/[...path].vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 14 | meta: 15 | layout: 404 16 | 17 | -------------------------------------------------------------------------------- /packages/client/pages/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: About 3 | --- 4 | 5 | 6 | meta: 7 | layout: text 8 | 9 | 10 |
11 | 12 |
13 |

About

14 |
15 | 16 | 绝赞开发中! 17 | 18 | > 19 | -------------------------------------------------------------------------------- /packages/client/pages/flow.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 22 | 23 | 24 | meta: 25 | layout: adv 26 | 27 | -------------------------------------------------------------------------------- /packages/client/pages/help.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 帮助 3 | layout: text 4 | --- 5 | 6 |
7 |
8 |

帮助

9 |
10 | 11 | ⁄(⁄ ⁄ ⁄ω⁄ ⁄ ⁄)⁄ 不可以看这里啦! 12 | 人家还没准备好! 13 | 14 |
15 | 16 | 17 |
18 |   19 | advjs 20 | 21 | -------------------------------------------------------------------------------- /packages/client/pages/loading.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /packages/client/pixi/index.ts: -------------------------------------------------------------------------------- 1 | import type { AdvContext } from '../types' 2 | import { PixiGame } from './game' 3 | 4 | let pixiGameInstance: PixiGame | null = null 5 | 6 | export async function initPixi($adv: AdvContext) { 7 | const canvas = document.getElementById('advjs-pixi-canvas') as any as HTMLCanvasElement 8 | if (!canvas) 9 | return 10 | 11 | pixiGameInstance = new PixiGame($adv) 12 | // console.log(renderer) 13 | pixiGameInstance.setAssetsManifest($adv.gameConfig.value.assets?.manifest) 14 | await pixiGameInstance.init(canvas) 15 | 16 | return pixiGameInstance 17 | } 18 | -------------------------------------------------------------------------------- /packages/client/runtime/README.md: -------------------------------------------------------------------------------- 1 | # @advjs/runtime 2 | 3 | Without virtual module. 4 | 5 | Runtime in the browser. 6 | -------------------------------------------------------------------------------- /packages/client/runtime/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@advjs/runtime", 3 | "type": "module", 4 | "version": "0.0.1", 5 | "description": "The runtime for advjs." 6 | } 7 | -------------------------------------------------------------------------------- /packages/client/shims.d.ts: -------------------------------------------------------------------------------- 1 | import type { AdvContext } from '@advjs/core' 2 | 3 | declare interface Window { 4 | // extend the window 5 | $adv: AdvContext 6 | } 7 | 8 | declare module '*.md' { 9 | import type { ComponentOptions } from 'vue' 10 | 11 | const component: ComponentOptions 12 | export default component 13 | } 14 | 15 | declare module 'mermaid/dist/mermaid.esm.mjs' { 16 | import Mermaid from 'mermaid/dist/mermaid.d.ts' 17 | 18 | export default Mermaid 19 | } 20 | -------------------------------------------------------------------------------- /packages/client/stores/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app' 2 | export * from './audio' 3 | export * from './settings' 4 | 5 | export * from './useAdvStore' 6 | export * from './useDialogStore' 7 | export * from './useGameStore' 8 | -------------------------------------------------------------------------------- /packages/client/stores/useDialogStore.ts: -------------------------------------------------------------------------------- 1 | import { acceptHMRUpdate, defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export const useDialogStore = defineStore('@advjs/client/dialog', () => { 5 | // 局部 words order,与全局 order 相区别 6 | const iOrder = ref(0) 7 | 8 | return { 9 | iOrder, 10 | } 11 | }) 12 | 13 | if (import.meta.hot) 14 | import.meta.hot.accept(acceptHMRUpdate(useDialogStore, import.meta.hot)) 15 | -------------------------------------------------------------------------------- /packages/client/styles/index.ts: -------------------------------------------------------------------------------- 1 | import './reset.scss' 2 | import './css-vars.scss' 3 | import './main.scss' 4 | -------------------------------------------------------------------------------- /packages/client/styles/reset.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | -webkit-tap-highlight-color: transparent; 3 | 4 | // set font smooth 5 | // font-synthesis: none; 6 | text-rendering: optimizeLegibility; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | 11 | canvas { 12 | outline: none; 13 | 14 | &:focus { 15 | outline: none; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/client/types/index.ts: -------------------------------------------------------------------------------- 1 | // import type { ViteSSGContext } from 'vite-ssg' 2 | // export type UserModule = (ctx: ViteSSGContext) => void 3 | import type { App } from 'vue' 4 | import type { Router } from 'vue-router' 5 | 6 | export type UserModule = (ctx: { app: App, isClient: boolean, router: Router }) => void | Promise 7 | 8 | export * from './context' 9 | export * from './menu' 10 | -------------------------------------------------------------------------------- /packages/client/types/menu.ts: -------------------------------------------------------------------------------- 1 | export interface MenuButtonItem { 2 | title: string 3 | do: () => void 4 | } 5 | -------------------------------------------------------------------------------- /packages/client/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './init' 2 | export * from './speech' 3 | export * from './statement' 4 | -------------------------------------------------------------------------------- /packages/client/utils/speech.ts: -------------------------------------------------------------------------------- 1 | // useSpeechSynthesis 2 | // https://github.com/vueuse/vueuse/pull/837 3 | 4 | /** 5 | * 语音合成 6 | * @param text 7 | * @param lang 8 | */ 9 | export function speak(text: string, lang: string): void { 10 | const speechInstance = new SpeechSynthesisUtterance(text) 11 | speechInstance.lang = lang 12 | speechSynthesis.speak(speechInstance) 13 | } 14 | -------------------------------------------------------------------------------- /packages/core/README.md: -------------------------------------------------------------------------------- 1 | # @advjs/core 2 | 3 | - Vue Composition API Functions 4 | - Common Functions 5 | -------------------------------------------------------------------------------- /packages/core/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild' 2 | 3 | export default defineBuildConfig({ 4 | declaration: true, 5 | entries: [ 6 | 'src/index', 7 | ], 8 | clean: true, 9 | externals: [ 10 | 'advjs', 11 | '@advjs/parser', 12 | '@advjs/types', 13 | 'consola', 14 | 15 | 'dayjs', 16 | 'howler', 17 | 18 | // vue 19 | 'vue', 20 | 'vue-demi', 21 | '@vueuse/core', 22 | 'pinia', 23 | 24 | 'html2canvas', 25 | ], 26 | }) 27 | -------------------------------------------------------------------------------- /packages/core/src/app/index.ts: -------------------------------------------------------------------------------- 1 | // export * from './adv' 2 | export * from './storage' 3 | -------------------------------------------------------------------------------- /packages/core/src/app/storage.ts: -------------------------------------------------------------------------------- 1 | import { createStorage, prefixStorage } from 'unstorage' 2 | import localStorageDriver from 'unstorage/drivers/localstorage' 3 | import { namespace } from '../utils' 4 | 5 | /** 6 | * create game records storage 7 | * by localStorage 8 | * @param recordsKey 9 | */ 10 | export function createRecordsStorage(recordsKey = 'records') { 11 | const storage = createStorage({ 12 | driver: localStorageDriver({ base: `${namespace}:` }), 13 | }) 14 | return prefixStorage(storage, recordsKey) 15 | } 16 | -------------------------------------------------------------------------------- /packages/core/src/composables/README.md: -------------------------------------------------------------------------------- 1 | # Composables 2 | 3 | 与 ADV.JS 实例无依赖关系的 Vue 组合函数。 4 | -------------------------------------------------------------------------------- /packages/core/src/composables/dark.ts: -------------------------------------------------------------------------------- 1 | import { useDark, useToggle } from '@vueuse/core' 2 | 3 | export const isDark = useDark() 4 | export const toggleDark = useToggle(isDark) 5 | -------------------------------------------------------------------------------- /packages/core/src/composables/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dark' 2 | export * from './sound' 3 | 4 | export * from './useBeforeUnload' 5 | export * from './useImages' 6 | export * from './useScreenLock' 7 | -------------------------------------------------------------------------------- /packages/core/src/composables/sound/store.ts: -------------------------------------------------------------------------------- 1 | // import { useSound } from './index' 2 | // import { assets } from '~/assets' 3 | -------------------------------------------------------------------------------- /packages/core/src/composables/useBeforeUnload.ts: -------------------------------------------------------------------------------- 1 | import { onBeforeMount } from 'vue' 2 | 3 | /** 4 | * 关闭页面前提示 5 | */ 6 | export function useBeforeUnload() { 7 | onBeforeMount(() => { 8 | window.onbeforeunload = () => { 9 | return '关闭提示' 10 | } 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /packages/core/src/constants/nodes.ts: -------------------------------------------------------------------------------- 1 | import type { AdvFlowNode } from '@advjs/types' 2 | 3 | /** 4 | * 结束节点 5 | */ 6 | export const END_NODE: AdvFlowNode = { 7 | id: '@advjs/game/node/end', 8 | type: 'end', 9 | } 10 | -------------------------------------------------------------------------------- /packages/core/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @packageDocumentation ADV.JS 核心 API 3 | * @module @advjs/core 4 | */ 5 | export * from './app' 6 | export * from './composables' 7 | export * from './config' 8 | 9 | export * from './constants' 10 | export * from './pixi' 11 | 12 | export * from './utils' 13 | export * from './vrm' 14 | -------------------------------------------------------------------------------- /packages/core/src/pixi/index.ts: -------------------------------------------------------------------------------- 1 | // import * as PIXI from 'pixi.js' 2 | 3 | // export const PIXI_VERSION = PIXI.VERSION 4 | 5 | // import { autoDetectRenderer } from 'pixi.js' 6 | // import * as PIXI from 'pixi.js' 7 | 8 | export const PIXI_VERSION = 'v8' 9 | -------------------------------------------------------------------------------- /packages/core/src/utils/functions.ts: -------------------------------------------------------------------------------- 1 | import type { AdvCharacter } from '@advjs/types' 2 | 3 | export function getCharacter(characters: AdvCharacter[], name: string): AdvCharacter | undefined { 4 | return characters.find((value) => { 5 | return value.id === name || value.name === name || (typeof value.alias == 'string' ? value.alias === name : value.alias?.includes(name)) 6 | }) 7 | } 8 | -------------------------------------------------------------------------------- /packages/core/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './functions' 2 | export * from './ns' 3 | export * from './screenshots' 4 | export * from './time' 5 | -------------------------------------------------------------------------------- /packages/core/src/utils/ns.ts: -------------------------------------------------------------------------------- 1 | export const namespace = 'advjs' 2 | 3 | export function ns(name: string) { 4 | return `${namespace}:${name}` 5 | } 6 | -------------------------------------------------------------------------------- /packages/core/src/utils/time.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * sleep for ms milliseconds 3 | */ 4 | export function sleep(ms: number) { 5 | return new Promise(resolve => setTimeout(resolve, ms)) 6 | } 7 | -------------------------------------------------------------------------------- /packages/core/src/vrm/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 检查模型格式是否为 vrm 3 | * @param file 4 | */ 5 | export function isVrmModel(file: File) { 6 | if (!file.name.endsWith('.vrm')) 7 | return false 8 | return true 9 | } 10 | -------------------------------------------------------------------------------- /packages/core/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["src/**/*.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/core/tsdown.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'tsdown' 2 | 3 | export default defineConfig({ 4 | entry: ['./src/index.ts'], 5 | clean: true, 6 | dts: true, 7 | external: [ 8 | 'advjs', 9 | '@advjs/types', 10 | '@advjs/parser', 11 | 'consola', 12 | 13 | 'dayjs', 14 | 'howler', 15 | 16 | // vue 17 | 'vue', 18 | 'vue-demi', 19 | '@vueuse/core', 20 | 'pinia', 21 | 22 | 'html2canvas', 23 | ], 24 | }) 25 | -------------------------------------------------------------------------------- /packages/create-adv/README.md: -------------------------------------------------------------------------------- 1 | # create-adv 2 | 3 | Scaffolding Your First ADV Project/Plugin. 4 | 5 | With NPM: 6 | 7 | ```bash 8 | npm init adv 9 | ``` 10 | 11 | With Yarn: 12 | 13 | ```sh 14 | yarn create adv 15 | ``` 16 | 17 | With PNPM: 18 | 19 | ```bash 20 | pnpm create adv 21 | ``` 22 | 23 | Then follow the prompts! 24 | 25 | > Ref [create-vite](https://github.com/vitejs/vite/blob/main/packages/create-vite/README.md). 26 | -------------------------------------------------------------------------------- /packages/create-adv/bin/index.mjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 'use strict' 3 | 4 | import '../dist/index.mjs' 5 | -------------------------------------------------------------------------------- /packages/create-adv/src/index.ts: -------------------------------------------------------------------------------- 1 | import { init } from './cli' 2 | 3 | init().catch((e) => { 4 | console.error(e) 5 | }) 6 | -------------------------------------------------------------------------------- /packages/create-adv/templates/template-adv/_gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | 4 | .vite-ssg-dist 5 | .vite-ssg-temp 6 | 7 | auto-imports.d.ts 8 | components.d.ts 9 | 10 | *.log 11 | -------------------------------------------------------------------------------- /packages/create-adv/templates/template-adv/index.adv.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Doki Doki 3 | --- 4 | 5 | 我:Hello 6 | 7 | 小云: 8 | -------------------------------------------------------------------------------- /packages/create-adv/templates/template-plugin/README.md: -------------------------------------------------------------------------------- 1 | # Plugin Template 2 | -------------------------------------------------------------------------------- /packages/create-adv/templates/template-plugin/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild' 2 | 3 | export default defineBuildConfig({ 4 | declaration: true, 5 | entries: [ 6 | 'src/index', 7 | ], 8 | clean: true, 9 | externals: [ 10 | 'advjs', 11 | '@advjs/client', 12 | '@advjs/shared', 13 | '@advjs/types', 14 | 15 | 'vue', 16 | ], 17 | }) 18 | -------------------------------------------------------------------------------- /packages/devtools/README.md: -------------------------------------------------------------------------------- 1 | # @advjs/devtools 2 | 3 | ## References 4 | 5 | - [nuxt/devtools](https://github.com/nuxt/devtools) 6 | -------------------------------------------------------------------------------- /packages/devtools/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild' 2 | 3 | export default defineBuildConfig({ 4 | declaration: true, 5 | entries: [ 6 | 'src/vite', 7 | ], 8 | externals: [ 9 | 'vite', 10 | // Type only 11 | 'vue', 12 | 'vue-router', 13 | 'unstorage', 14 | 'nitropack', 15 | ], 16 | }) 17 | -------------------------------------------------------------------------------- /packages/devtools/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@advjs/devtools", 3 | "version": "0.0.1", 4 | "description": "Devtools for ADV.JS", 5 | "exports": { 6 | ".": { 7 | "types": "./dist/vite.d.ts", 8 | "import": "./dist/vite.mjs" 9 | }, 10 | "./*": "./*" 11 | }, 12 | "module": "dist/vite.mjs", 13 | "types": "./dist/vite.d.ts", 14 | "scripts": { 15 | "build": "unbuild", 16 | "dev": "unbuild --stub" 17 | }, 18 | "peerDependencies": { 19 | "vite": "*" 20 | }, 21 | "dependencies": { 22 | "consola": "catalog:", 23 | "hookable": "catalog:" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/devtools/src/app.js: -------------------------------------------------------------------------------- 1 | // import { createDevToolsContainer } from '@vite-plugin-vue-devtools/core' 2 | // import App from 'virtual:adv-devtools-path:views/Main.vue' 3 | 4 | // createDevToolsContainer(App) 5 | 6 | // eslint-disable-next-line no-console 7 | console.log('devtools loaded') 8 | -------------------------------------------------------------------------------- /packages/devtools/src/constant.ts: -------------------------------------------------------------------------------- 1 | export const PLUGIN_NAME = 'vite-plugin-adv-devtools' 2 | -------------------------------------------------------------------------------- /packages/devtools/src/dirs.ts: -------------------------------------------------------------------------------- 1 | import { resolve } from 'node:path' 2 | import { fileURLToPath } from 'node:url' 3 | 4 | export const packageDir = resolve(fileURLToPath(import.meta.url), '../..') 5 | export const distDir = resolve(fileURLToPath(import.meta.url), '..') 6 | export const runtimeDir = resolve(distDir, 'runtime') 7 | export const clientDir = resolve(distDir, 'client') 8 | -------------------------------------------------------------------------------- /packages/devtools/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './vite' 2 | -------------------------------------------------------------------------------- /packages/devtools/src/views/Main.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunYouJun/advjs/4b6bf7f6a1651a534cc4254f4020bdfce8a82998/packages/devtools/src/views/Main.vue -------------------------------------------------------------------------------- /packages/devtools/types.d.ts: -------------------------------------------------------------------------------- 1 | export * from './dist/types' 2 | -------------------------------------------------------------------------------- /packages/devtools/types/global.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | interface Window { 3 | __ADV_DEVTOOLS__?: boolean 4 | __ADV_DEVTOOLS_GLOBAL_HOOK__: any 5 | } 6 | } 7 | 8 | export {} 9 | -------------------------------------------------------------------------------- /packages/devtools/types/index.ts: -------------------------------------------------------------------------------- 1 | import './global' 2 | -------------------------------------------------------------------------------- /packages/examples/shims.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.md' { 2 | import type { ComponentOptions } from 'vue' 3 | 4 | const component: ComponentOptions 5 | export default component 6 | } 7 | -------------------------------------------------------------------------------- /packages/examples/test.adv: -------------------------------------------------------------------------------- 1 | --- 2 | author: 云游君 3 | date: 2017-02-11 4 | --- 5 | 6 | # 仓鼠 7 | 8 | ## 序 9 | 10 | 我:喂,你说世界上真的有外星人吗? 11 | 12 | > 夏日的午后总会让人慵懒,好在室内却是凉意凛然。 13 | 14 | 他(笑):虽说眼见为实,不过我想,外星人是一定存在的。至少从人类的渺小程度来看,是这样。 15 | 我:那为什么我们到现在都不能见到他们呢?一定会有科技稍早于我们的外星人搭着如魔法般的飞船来到此地才对啊。 16 | 17 | 他:即便是地球上也仍有许多我们未曾见过的生物啊,不过我宁愿呆在午后,看着前人的幻想,也不想去探索那些未知的… 18 | 他(笑):动物世界? 19 | 20 |
Test
21 | -------------------------------------------------------------------------------- /packages/examples/test.adv.md: -------------------------------------------------------------------------------- 1 | --- 2 | characters: 3 | - name: 他 4 | --- 5 | 6 | # 仓鼠 7 | 8 | ## 序 9 | 10 | 我:喂,你说世界上真的有外星人吗? 11 | 12 | > 夏日的午后总会让人慵懒,好在室内却是凉意凛然。 13 | 14 | 他(笑):虽说眼见为实,不过我想,外星人是一定存在的。至少从人类的渺小程度来看,是这样。 15 | 16 | 我:那为什么我们到现在都不能见到他们呢?一定会有科技稍早于我们的外星人搭着如魔法般的飞船来到此地才对啊。 17 | 18 | 他:即便是地球上也仍有许多我们未曾见过的生物啊,不过我宁愿呆在午后,看着前人的幻想,也不想去探索那些未知的… 19 | 20 | 他(笑):动物世界? 21 | -------------------------------------------------------------------------------- /packages/flow/README.md: -------------------------------------------------------------------------------- 1 | # @advjs/flow 2 | 3 | Decoupling logic for flow editor. 4 | -------------------------------------------------------------------------------- /packages/flow/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './nodes' 2 | -------------------------------------------------------------------------------- /packages/flow/components/nodes/index.ts: -------------------------------------------------------------------------------- 1 | import type { NodeTypesObject } from '@vue-flow/core' 2 | import { defaultNodeTypes } from '@vue-flow/core' 3 | // import { markRaw } from 'vue' 4 | 5 | export const nodeTypes: NodeTypesObject = { 6 | ...defaultNodeTypes, 7 | // ...convertNodesToNodeTypes(flatNodes), 8 | // default: markRaw(FlowWrapperNode) as any, 9 | } 10 | -------------------------------------------------------------------------------- /packages/flow/composables/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useGlobalFlowEditor' 2 | -------------------------------------------------------------------------------- /packages/flow/composables/useGlobalFlowEditor.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * get global flow editor 3 | */ 4 | export function useGlobalFlowEditor() { 5 | // @ts-expect-error global 6 | const editor: FlowEditor = window.__GLOBAL_FLOW_EDITOR__ || inject(GLOBAL_FLOW_EDITOR_KEY) 7 | if (!editor) 8 | throw new Error('useGlobalFlowEditor() is called without provider.') 9 | return editor 10 | } 11 | -------------------------------------------------------------------------------- /packages/flow/constants/index.ts: -------------------------------------------------------------------------------- 1 | export const GLOBAL_FLOW_ID = Symbol('advjs-global-flow') 2 | -------------------------------------------------------------------------------- /packages/flow/index.ts: -------------------------------------------------------------------------------- 1 | export * from './components' 2 | -------------------------------------------------------------------------------- /packages/flow/types/index.ts: -------------------------------------------------------------------------------- 1 | export type FlowNodeStatus = '' | 'running' | 'idle' | 'done' | 'error' 2 | -------------------------------------------------------------------------------- /packages/global.d.ts: -------------------------------------------------------------------------------- 1 | // Global compile-time constants 2 | declare let __DEV__: boolean 3 | 4 | declare module '*.vue' { 5 | import type { defineComponent } from 'vue' 6 | 7 | const component: ReturnType 8 | export default component 9 | } 10 | 11 | declare let Prism: any 12 | -------------------------------------------------------------------------------- /packages/gui/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild' 2 | 3 | export default defineBuildConfig({ 4 | entries: [ 5 | './node/index', 6 | './unocss/index', 7 | ], 8 | 9 | declaration: true, 10 | // clean: true, 11 | clean: false, 12 | }) 13 | -------------------------------------------------------------------------------- /packages/gui/client/browser.ts: -------------------------------------------------------------------------------- 1 | // build gui one file for browser cdn 2 | import { createAGUI } from './utils' 3 | 4 | export * from './components' 5 | export * from './composables' 6 | export * from './types' 7 | export * from './utils' 8 | 9 | if (typeof window !== 'undefined') { 10 | // @ts-expect-error global 11 | window.AGUI = { 12 | createAGUI, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/gui/client/components/AGUIOverlay.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 16 | -------------------------------------------------------------------------------- /packages/gui/client/components/accordion/types.ts: -------------------------------------------------------------------------------- 1 | export interface AGUIAccordionProps { 2 | title: string 3 | value?: string 4 | icon?: string 5 | collapsible?: boolean 6 | } 7 | -------------------------------------------------------------------------------- /packages/gui/client/components/breadcrumb/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types' 2 | -------------------------------------------------------------------------------- /packages/gui/client/components/breadcrumb/types.ts: -------------------------------------------------------------------------------- 1 | export interface AGUIBreadcrumbItem { 2 | label: string 3 | href?: string 4 | onClick?: () => void 5 | } 6 | -------------------------------------------------------------------------------- /packages/gui/client/components/common/AGUIHr.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /packages/gui/client/components/context-menu/types.ts: -------------------------------------------------------------------------------- 1 | export interface AGUIContextMenuItemType { 2 | id?: string 3 | label: string 4 | icon?: string 5 | type?: 'separator' | 'label' | 'radio-group' | 'radio-item' 6 | disabled?: boolean 7 | accelerator?: string 8 | children?: AGUIContextMenuItemType[] 9 | onClick: () => void 10 | } 11 | -------------------------------------------------------------------------------- /packages/gui/client/components/explorer/AGUIFileItemIcon.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 21 | -------------------------------------------------------------------------------- /packages/gui/client/components/explorer/README.md: -------------------------------------------------------------------------------- 1 | # AGUIAssetsExplorer 2 | 3 | - 浏览器限制,`FileSystemDirectoryHandle` 无法实现持久化存储 4 | -------------------------------------------------------------------------------- /packages/gui/client/components/explorer/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types' 2 | export * from './utils' 3 | -------------------------------------------------------------------------------- /packages/gui/client/components/form/AGUIForm.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 18 | -------------------------------------------------------------------------------- /packages/gui/client/components/icon/AGUIIcon.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /packages/gui/client/components/input/AGUIInnerInput.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 25 | -------------------------------------------------------------------------------- /packages/gui/client/components/layout/types.ts: -------------------------------------------------------------------------------- 1 | export interface AGUILayoutType { 2 | name: string 3 | type?: 'horizontal' | 'vertical' 4 | size?: number 5 | min?: number 6 | max?: number 7 | children?: AGUILayoutType[] 8 | } 9 | -------------------------------------------------------------------------------- /packages/gui/client/components/loading/AGUILoading.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 19 | -------------------------------------------------------------------------------- /packages/gui/client/components/menu/types.ts: -------------------------------------------------------------------------------- 1 | export interface MenuItem { 2 | type?: 'checkbox' | 'separator' | 'submenu' | 'normal' 3 | label?: string 4 | /** 5 | * Shortcut key 6 | */ 7 | accelerator?: string 8 | /** 9 | * show … 10 | * @default false 11 | */ 12 | ellipsis?: boolean 13 | 14 | disabled?: boolean 15 | 16 | checked?: boolean 17 | onClick?: () => void 18 | 19 | children?: MenuItem[] 20 | } 21 | 22 | export interface Menu { 23 | name: string 24 | /** 25 | * custom class 26 | */ 27 | class?: string 28 | items: MenuItem[] 29 | } 30 | -------------------------------------------------------------------------------- /packages/gui/client/components/panel/AGUIPropertiesPanel.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /packages/gui/client/components/panel/index.ts: -------------------------------------------------------------------------------- 1 | import type { AGUIPropertyProps } from './types' 2 | 3 | export function createPropertiesForm() { 4 | return { 5 | add(options: AGUIPropertyProps) { 6 | function label(text: string) { 7 | options.name = text 8 | } 9 | 10 | return { 11 | /** 12 | * alias of name 13 | */ 14 | label, 15 | name: label, 16 | } 17 | }, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/gui/client/components/sidebar/types.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Sidebar item 3 | */ 4 | export interface AGUISidebarMenuItem { 5 | key: string 6 | /** 7 | * 标题 8 | */ 9 | title: string 10 | /** 11 | * 图标 class 12 | */ 13 | icon?: string 14 | /** 15 | * 点击事件 16 | * 17 | * router.push 18 | */ 19 | onClick?: () => void 20 | } 21 | -------------------------------------------------------------------------------- /packages/gui/client/components/tabs/AGUITabPanel.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 21 | -------------------------------------------------------------------------------- /packages/gui/client/components/tabs/types.ts: -------------------------------------------------------------------------------- 1 | export interface TabItem { 2 | title: string 3 | key: string 4 | icon?: string 5 | } 6 | -------------------------------------------------------------------------------- /packages/gui/client/components/textarea/AGUITextarea.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 |