From f6d6349528498cb250a87cea2216e75c681d4713 Mon Sep 17 00:00:00 2001 From: Lilia_Chen Date: Tue, 26 Aug 2025 05:51:02 +0100 Subject: [PATCH] feat(stage-ui): NPR skybox environmental lighting functionality added (#457) --------- Co-authored-by: Neko --- packages/i18n/src/locales/en/settings.yaml | 3 + .../i18n/src/locales/zh-Hans/settings.yaml | 3 + .../Scenarios/Settings/ModelSettings/VRM.vue | 24 ++- .../stage-ui/src/components/Scenes/VRM.vue | 33 +++- .../src/components/Scenes/VRM/Model.vue | 176 +++++++++++++++++- ...{Environment.vue => SkyBoxEnvironment.vue} | 40 +++- .../src/components/Scenes/VRM/index.ts | 1 + packages/stage-ui/src/stores/vrm.ts | 11 +- 8 files changed, 262 insertions(+), 29 deletions(-) rename packages/stage-ui/src/components/Scenes/VRM/{Environment.vue => SkyBoxEnvironment.vue} (76%) diff --git a/packages/i18n/src/locales/en/settings.yaml b/packages/i18n/src/locales/en/settings.yaml index e533dff7b..004040738 100644 --- a/packages/i18n/src/locales/en/settings.yaml +++ b/packages/i18n/src/locales/en/settings.yaml @@ -595,3 +595,6 @@ vrm: theme-color-from-model: button-extract: title: Extract + skybox: + skybox-intensity: SkyBox Intensity + skybox-specular-mix: Specular Mix diff --git a/packages/i18n/src/locales/zh-Hans/settings.yaml b/packages/i18n/src/locales/zh-Hans/settings.yaml index f203fbfee..bf1f8b9d9 100644 --- a/packages/i18n/src/locales/zh-Hans/settings.yaml +++ b/packages/i18n/src/locales/zh-Hans/settings.yaml @@ -562,3 +562,6 @@ vrm: theme-color-from-model: button-extract: title: 提取 + skybox: + skybox-intensity: 天空盒光照强度 + skybox-specular-mix: 漫反射/镜面反射混合系数 diff --git a/packages/stage-ui/src/components/Scenarios/Settings/ModelSettings/VRM.vue b/packages/stage-ui/src/components/Scenarios/Settings/ModelSettings/VRM.vue index e1eb258bc..9570042ff 100644 --- a/packages/stage-ui/src/components/Scenarios/Settings/ModelSettings/VRM.vue +++ b/packages/stage-ui/src/components/Scenarios/Settings/ModelSettings/VRM.vue @@ -37,12 +37,13 @@ const { ambientLightIntensity, ambientLightColor, - hemisphereLightPosition, hemisphereLightIntensity, hemisphereSkyColor, hemisphereGroundColor, envSelect, + skyBoxIntensity, + specularMix, } = storeToRefs(vrm) const trackingOptions = computed(() => [ { value: 'camera', label: t('settings.vrm.scale-and-position.eye-tracking-mode.options.option.camera'), class: 'col-start-3' }, @@ -181,15 +182,6 @@ const tabList = [
-
+
+ + +
diff --git a/packages/stage-ui/src/components/Scenes/VRM.vue b/packages/stage-ui/src/components/Scenes/VRM.vue index db5633b31..364ae03a0 100644 --- a/packages/stage-ui/src/components/Scenes/VRM.vue +++ b/packages/stage-ui/src/components/Scenes/VRM.vue @@ -1,5 +1,7 @@