From 5738c219b5891f200d7dc9dae04a8e885c8d8c17 Mon Sep 17 00:00:00 2001 From: Neko Ayaka Date: Thu, 5 Dec 2024 02:50:15 +0800 Subject: [PATCH] feat: 3D VRM supported as scene --- .gitignore | 1 + cspell.config.yaml | 1 + packages/stage/src/components/Collapsable.vue | 35 +++ .../src/components/DataGui/DualEndRange.vue | 204 ++++++++++++++++++ .../stage/src/components/DataGui/Range.vue | 149 +++++++++++++ packages/stage/src/components/MainStage.vue | 12 +- .../{ThreeViewer.vue => Screen.vue} | 12 +- packages/stage/src/components/ThreeDScene.vue | 115 ++++++++++ .../src/components/TransitionVertical.vue | 134 ++++++++++++ packages/stage/src/components/VRMModel.vue | 60 ++++++ packages/stage/vite.config.ts | 58 +++++ 11 files changed, 765 insertions(+), 16 deletions(-) create mode 100644 packages/stage/src/components/Collapsable.vue create mode 100644 packages/stage/src/components/DataGui/DualEndRange.vue create mode 100644 packages/stage/src/components/DataGui/Range.vue rename packages/stage/src/components/{ThreeViewer.vue => Screen.vue} (78%) create mode 100644 packages/stage/src/components/ThreeDScene.vue create mode 100644 packages/stage/src/components/TransitionVertical.vue create mode 100644 packages/stage/src/components/VRMModel.vue diff --git a/.gitignore b/.gitignore index 0891574..4fa8b21 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ node_modules coverage/ **/public/assets/js/* **/public/assets/live2d/models/* +**/public/assets/vrm/models/* diff --git a/cspell.config.yaml b/cspell.config.yaml index 022c83f..a7a3970 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -25,6 +25,7 @@ words: - cubismviewmatrix - demi - elevenlabs + - gltf - hiyori - iconify - intlify diff --git a/packages/stage/src/components/Collapsable.vue b/packages/stage/src/components/Collapsable.vue new file mode 100644 index 0000000..a7a627e --- /dev/null +++ b/packages/stage/src/components/Collapsable.vue @@ -0,0 +1,35 @@ + + + diff --git a/packages/stage/src/components/DataGui/DualEndRange.vue b/packages/stage/src/components/DataGui/DualEndRange.vue new file mode 100644 index 0000000..8466d1d --- /dev/null +++ b/packages/stage/src/components/DataGui/DualEndRange.vue @@ -0,0 +1,204 @@ + + + + + diff --git a/packages/stage/src/components/DataGui/Range.vue b/packages/stage/src/components/DataGui/Range.vue new file mode 100644 index 0000000..24edad5 --- /dev/null +++ b/packages/stage/src/components/DataGui/Range.vue @@ -0,0 +1,149 @@ + + + diff --git a/packages/stage/src/components/MainStage.vue b/packages/stage/src/components/MainStage.vue index f068b72..2051284 100644 --- a/packages/stage/src/components/MainStage.vue +++ b/packages/stage/src/components/MainStage.vue @@ -20,7 +20,7 @@ import BasicTextarea from './BasicTextarea.vue' // import AudioWaveform from './AudioWaveform.vue' import Live2DViewer from './Live2DViewer.vue' import Settings from './Settings.vue' -import ThreeViewer from './ThreeViewer.vue' +import ThreeDScene from './ThreeDScene.vue' const nowSpeakingAvatarBorderOpacityMin = 30 const nowSpeakingAvatarBorderOpacityMax = 100 @@ -316,7 +316,7 @@ onUnmounted(() => { -
+
{ model="/assets/live2d/models/hiyori_pro_zh/runtime/hiyori_pro_t11.model3.json" w="50%" min-w="50% -
@@ -413,7 +415,7 @@ onUnmounted(() => { v-model="messageInput" placeholder="Message" p="2" bg="zinc-100 dark:zinc-700" - w="[95%]" rounded-lg outline-none + w="[95%]" rounded-lg outline-none min-h="[100px]" @submit="onSendMessage" />