vtube-studio/types.ts
James Twose 3eff403fb4 feat: Generate VTuber character sheet with expression assets
The Gemini service has been updated to generate a character sheet rather than a single avatar image. This sheet includes the main character and separate assets for closed eyes and an open mouth.

The `AvatarConfig` type and `RiggingEditor` component have been extended to handle these new expression assets (`textureClosedEye`, `textureOpenMouth`). A new `Sprite` component has been added to `Studio.tsx` to correctly render these specific regions from the generated character sheet. The UI has been updated to reflect the new generation process.
2025-11-20 20:55:47 +01:00

43 lines
768 B
TypeScript

export enum AppState {
SETUP = 'SETUP',
CREATION = 'CREATION',
RIGGING = 'RIGGING',
STUDIO = 'STUDIO',
}
export interface Rect {
x: number;
y: number;
w: number;
h: number;
}
export interface AvatarConfig {
imageUrl: string;
name: string;
description: string;
leftEye?: Rect;
rightEye?: Rect;
mouth?: Rect;
skinColor?: string;
textureClosedEye?: Rect;
textureOpenMouth?: Rect;
}
export interface TrackingData {
rotationX: number; // Pitch
rotationY: number; // Yaw
rotationZ: number; // Roll
translationX: number;
translationY: number;
mouthOpen: number;
isBlinkingLeft: boolean;
isBlinkingRight: boolean;
}
export interface AIStudio {
hasSelectedApiKey(): Promise<boolean>;
openSelectKey(): Promise<void>;
}