diff --git a/voicevox-remotion-template/src/data/zundamon-jiron/script.ts b/voicevox-remotion-template/src/data/zundamon-jiron/script.ts index a0def4e..f89a342 100644 --- a/voicevox-remotion-template/src/data/zundamon-jiron/script.ts +++ b/voicevox-remotion-template/src/data/zundamon-jiron/script.ts @@ -38,10 +38,18 @@ } >; +export type HideTitleEvent = VQCustomTimelineEvent< + "hideTitle", + { + id: string; + } +>; + export type TimelineEvent = VQTimelineEvent< CharacterId, VoicevoxVoice, | ShowEvent + | HideTitleEvent | VQStandeeFacingDirectionEvent | VQStandeeShakeEvent | VQStandeeVerticalOffsetEvent @@ -50,6 +58,7 @@ CharacterId, VoicevoxVoice, | ShowEvent + | HideTitleEvent | VQStandeeFacingDirectionEvent | VQStandeeShakeEvent | VQStandeeVerticalOffsetEvent @@ -67,6 +76,11 @@ ...options, }); +export const hideTitle = (id: string): HideTitleEvent => ({ + type: "hideTitle", + id, +}); + export const timeline = defineVQTimeline([ still("zundamon-jiron-background-001", "image/still/nc238325_living_day.jpg", { fit: "cover", @@ -77,7 +91,8 @@ }), say("zundamon-jiron-zunda-001", "zundamon", "ふー、着替えて落ち着いたのだ。"), say("zundamon-jiron-zunda-002", "zundamon", "やっぱり寮ではこのスタイルが一番なのだ。"), - standeeVerticalOffset("zundamon-jiron-zunda-y-001", "zundamon", -150), + hideTitle("zundamon-jiron-hide-title-001"), + standeeVerticalOffset("zundamon-jiron-zunda-y-001", "zundamon", -20), audio("zundamon-jiron-sound-effect-002", "audio/common_soundeffect/Door 6_5 Open.wav", { playback: "once", diff --git a/voicevox-remotion-template/src/data/zundamon-jiron/timing.ts b/voicevox-remotion-template/src/data/zundamon-jiron/timing.ts index 482bdfd..c56bf75 100644 --- a/voicevox-remotion-template/src/data/zundamon-jiron/timing.ts +++ b/voicevox-remotion-template/src/data/zundamon-jiron/timing.ts @@ -80,6 +80,7 @@ event.type === "still" || event.type === "clearStill" || event.type === "clearVideo" || + event.type === "hideTitle" || event.type === "standeePosition" || event.type === "standeeFacingDirection" || event.type === "standeeVerticalOffset" @@ -98,6 +99,7 @@ event.type !== "still" && event.type !== "clearStill" && event.type !== "audio" && + event.type !== "hideTitle" && event.type !== "standeeFacingDirection" && event.type !== "standeeVerticalOffset" && event.type !== "standeeShake"; diff --git a/voicevox-remotion-template/src/zundamon-jiron.tsx b/voicevox-remotion-template/src/zundamon-jiron.tsx index 9cce6ba..4cffe92 100644 --- a/voicevox-remotion-template/src/zundamon-jiron.tsx +++ b/voicevox-remotion-template/src/zundamon-jiron.tsx @@ -39,6 +39,7 @@ event: TimelineEvent; from: number; durationInFrames: number; + titleVisible: boolean; visibleCharacters: CharacterId[]; focusedCharacter?: CharacterId; avatarFlipXByCharacter: Partial>; @@ -67,6 +68,7 @@ event.type !== "still" && event.type !== "clearStill" && event.type !== "audio" && + event.type !== "hideTitle" && event.type !== "standeeFacingDirection" && event.type !== "standeeVerticalOffset" && event.type !== "standeeShake"; @@ -93,6 +95,7 @@ const avatarFlipXByCharacter: Partial> = {}; const avatarTranslateYByCharacter: Partial> = {}; let focusedCharacter: CharacterId | undefined = initialVisibleCharacters[0]; + let titleVisible = true; return timeline.map((event, index) => { const eventCharacter = characterForEvent(event); @@ -101,6 +104,10 @@ focusedCharacter = eventCharacter; } + if (event.type === "hideTitle") { + titleVisible = false; + } + if (event.type === "standeeFacingDirection") { avatarFlipXByCharacter[event.character] = flipXForFacingDirection( event.direction @@ -116,6 +123,7 @@ event, from: cursor, durationInFrames, + titleVisible, visibleCharacters: Array.from(visibleCharacters), focusedCharacter, avatarFlipXByCharacter: {...avatarFlipXByCharacter}, @@ -362,7 +370,7 @@ > - + {activeSegment.titleVisible ? <Title progress={titleProgress} /> : null} <VQCharacterStage characters={characters} visibleCharacters={activeSegment.visibleCharacters}