diff --git a/voicevox-remotion-template/src/data/script.ts b/voicevox-remotion-template/src/data/script.ts index 36e846c..82a2767 100644 --- a/voicevox-remotion-template/src/data/script.ts +++ b/voicevox-remotion-template/src/data/script.ts @@ -13,7 +13,7 @@ translateY?: number; flipX?: boolean; }>; - nameplatePosition?: "top" | "bottom"; + nameplatePosition?: "top" | "bottom" | "none"; }>; export type CharacterDefinition = Readonly<{ @@ -39,7 +39,7 @@ translateY: -87, flipX: true, }, - nameplatePosition: "top", + nameplatePosition: "none", }, }, sayo: { @@ -57,7 +57,7 @@ maxHeight: 760, translateY: -60, }, - nameplatePosition: "top", + nameplatePosition: "none", }, }, } as const satisfies Record; diff --git a/voicevox-remotion-template/src/yukkuri-composition.tsx b/voicevox-remotion-template/src/yukkuri-composition.tsx index a6ba7d5..0e6c7d3 100644 --- a/voicevox-remotion-template/src/yukkuri-composition.tsx +++ b/voicevox-remotion-template/src/yukkuri-composition.tsx @@ -393,10 +393,13 @@ const imageScaleX = avatar.imageLayout?.flipX ? -1 : 1; const imageTransform = `translateY(${imageTranslateY}px) scaleX(${imageScaleX})`; const nameplatePosition = avatar.nameplatePosition ?? "bottom"; + const showNameplate = nameplatePosition !== "none"; const nameplate = (
- {nameplatePosition === "top" ? nameplate : null} + {showNameplate && nameplatePosition === "top" ? nameplate : null} {avatar.imagePath ? ( ) : avatar.kind === "sayo" ? ( -
+
) : ( -
+
)} - {nameplatePosition === "bottom" ? nameplate : null} + {showNameplate && nameplatePosition === "bottom" ? nameplate : null}
); };