Newer
Older
remotion_docker_devcontainer / voicevox-remotion-template / src / standee-sets.ts
import type {
  IdleAvatarAnimationType,
  SpeakingAvatarAnimationType,
} from "./avatar-animations";

export type AvatarKind = "zundamon" | "sayo";

export type StandeeImageLayout = Readonly<{
  width?: number;
  maxHeight?: number;
  translateY?: number;
  flipX?: boolean;
}>;

export type StandeeSet = Readonly<{
  kind: AvatarKind;
  imagePath: string;
  mouthImageDir: string;
  imageLayout: StandeeImageLayout;
}>;

export type AvatarDefinition = Readonly<
  StandeeSet & {
    accentColor: string;
    nameplatePosition?: "top" | "bottom" | "none";
    idleAnimationType?: IdleAvatarAnimationType;
    speakingAnimationType?: SpeakingAvatarAnimationType;
  }
>;

export const standeeSets = {
  "zundamon_default": {
    kind: "zundamon",
    imagePath: "image/zundamon-standee-base.png",
    mouthImageDir: "image/zundamon-rhubarb-mouths",
    imageLayout: {
      width: 560,
      maxHeight: 760,
      translateY: -87,
      flipX: true,
    },
  },
  "sayo_default": {
    kind: "sayo",
    imagePath: "image/sayo-standee-base.png",
    mouthImageDir: "image/sayo-rhubarb-mouths",
    imageLayout: {
      width: 560,
      maxHeight: 760,
      translateY: -60,
    },
  },
  "zundamon_ohnegus_ai": {
    kind: "zundamon",
    imagePath: "image/zundamon_ohnegus_ai_base.png",
    mouthImageDir: "image/zundamon-ohnegus-ai-rhubarb-mouths",
    imageLayout: {
      width: 540,
      maxHeight: 730,
      translateY: 0,
      flipX: true,
    },
  },
  "sayo_ohnegus_ai": {
    kind: "sayo",
    imagePath: "image/sayo_ohnegus_ai_base.png",
    mouthImageDir: "image/sayo-ohnegus-ai-rhubarb-mouths",
    imageLayout: {
      width: 520,
      maxHeight: 720,
      translateY: 0,
    },
  },
} as const satisfies Record<string, StandeeSet>;

export type StandeeSetId = keyof typeof standeeSets;

export const getStandeeSet = (id: StandeeSetId): StandeeSet => standeeSets[id];