import type {
VQIdleAvatarAnimationType as IdleAvatarAnimationType,
VQMouthCoverLayer,
VQSpeakingAvatarAnimationType as SpeakingAvatarAnimationType,
} from "./lib/VQRemotionLib";
export type AvatarKind = "zundamon" | "sayo";
export type StandeeImageLayout = Readonly<{
width?: number;
maxHeight?: number;
sourceWidth?: number;
sourceHeadWidth?: number;
targetHeadWidth?: number;
scale?: number;
translateY?: number;
flipX?: boolean;
}>;
export type StandeeSet = Readonly<{
kind: AvatarKind;
description: string;
imagePath: string;
mouthImageDir: string;
mouthCoverLayer?: VQMouthCoverLayer;
imageLayout: StandeeImageLayout;
}>;
export type AvatarDefinition = Readonly<
StandeeSet & {
accentColor: string;
nameplatePosition?: "top" | "bottom" | "none";
idleAnimationType?: IdleAvatarAnimationType;
speakingAnimationType?: SpeakingAvatarAnimationType;
}
>;
// 立ち絵セットの定義
export const standeeSets = {
"zundamon_default": {
kind: "zundamon",
description: "ずんだもんのデフォルト立ち絵",
imagePath: "image/zundamon-standee-base.png",
mouthImageDir: "image/zundamon-rhubarb-mouths",
imageLayout: {
width: 560,
maxHeight: 760,
translateY: -87,
flipX: true,
},
},
"sayo_default": {
kind: "sayo",
description: "小夜のデフォルト立ち絵",
imagePath: "image/sayo-standee-base.png",
mouthImageDir: "image/sayo-rhubarb-mouths",
imageLayout: {
width: 560,
maxHeight: 760,
translateY: -60,
},
},
"zundamon_ohnegus_ai": {
kind: "zundamon",
description: "ずんだもんの立ち絵(シュージの絵柄を再現)",
imagePath: "image/zundamon_ohnegus_ai_base.png",
mouthImageDir: "image/zundamon-ohnegus-ai-rhubarb-mouths",
imageLayout: {
width: 540,
maxHeight: 730,
translateY: 0,
flipX: true,
},
},
"zundamon_ohnegus_rework_baby_default": {
kind: "zundamon",
description: "ずんだもんの別バージョン立ち絵(default表情)",
imagePath: "image/zundamon-ohnegus-rework-baby/06-default-nniya.png",
mouthImageDir: "image/zundamon-ohnegus-rework-baby-default-rhubarb-mouths",
imageLayout: {
width: 540,
maxHeight: 730,
translateY: 0,
flipX: true,
},
},
"sayo_ohnegus_ai": {
kind: "sayo",
description: "小夜の立ち絵(シュージの絵柄を再現)",
imagePath: "image/sayo_ohnegus_ai_base.png",
mouthImageDir: "image/sayo-ohnegus-ai-rhubarb-mouths",
imageLayout: {
width: 520,
maxHeight: 720,
translateY: 0,
},
},
"sayo_by_sayonaka": {
kind: "sayo",
description: "小夜の立ち絵(SAYONAKA 素材)",
imagePath: "image/sayo_by_sayonaka/variants/sayo_001_neutral.png",
mouthImageDir: "image/sayo_by_sayonaka/rhubarb-mouths",
mouthCoverLayer: {
left: "48.4%",
top: "33.65%",
width: "4.35%",
height: "2.25%",
backgroundColor: "#fff8ef",
borderRadius: "50%",
visibleWhen: "activeMouth",
hiddenMouths: ["rest", "closed"],
},
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];