Skip to content

Commit

Permalink
ソングも立ち絵をスタイルごとに変える (VOICEVOX#1803)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba authored Jan 31, 2024
1 parent 5152ee6 commit 5115c12
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/components/Sing/CharacterPortrait.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,22 @@ import { useStore } from "@/store";
const store = useStore();
const isShowSinger = computed(() => store.state.isShowSinger);
const userOrderedCharacterInfos = computed(() =>
store.getters.USER_ORDERED_CHARACTER_INFOS("all")
);
const characterInfo = computed(() => {
if (!userOrderedCharacterInfos.value || !store.state.singer) {
const portraitPath = computed(() => {
const userOrderedCharacterInfos =
store.getters.USER_ORDERED_CHARACTER_INFOS("singerLike");
const singer = store.state.singer;
if (!userOrderedCharacterInfos || !singer) {
return undefined;
}
return store.getters.CHARACTER_INFO(
store.state.singer.engineId,
store.state.singer.styleId
const characterInfo = store.getters.CHARACTER_INFO(
singer.engineId,
singer.styleId
);
const styleInfo = characterInfo?.metas.styles.find(
(style) => style.styleId === singer.styleId
);
return styleInfo?.portraitPath || characterInfo?.portraitPath;
});
const portraitPath = computed(() => characterInfo.value?.portraitPath);
</script>

<style scoped lang="scss">
Expand Down

0 comments on commit 5115c12

Please sign in to comment.