vtube-studio/types.ts
James Twose ddb2455416 feat: Add image upload and background removal
Enables users to upload custom avatar assets and automatically remove the background from the generated image.

New features:
- Avatar creation now supports uploading base, blink, and talk textures.
- Added ability to define the main body bounding box during rigging.
- Vision service now includes image segmentation for background removal.
- Studio component dynamically processes the avatar image for background removal if chroma key is enabled.
2025-11-20 21:24:22 +01:00

45 lines
814 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;
mainBody?: Rect;
chromaKeyColor?: string;
}
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>;
}