refactor: delete chroma-key.ts (#1899 #1900)

This commit is contained in:
2026-09-14 20:45:05 +08:00
parent 2fd67ed309
commit 4d21fdd36b
@@ -1,50 +0,0 @@
/**
* 绿幕抠像类型
*/
/** 绿幕抠像颜色预设 */
export type ChromaKeyColorPreset = "green" | "blue" | "red" | "pure_green" | "soft_green"
/** 颜色预设标签 */
export const CHROMA_KEY_PRESET_LABELS: Record<ChromaKeyColorPreset, string> = {
green: "绿",
blue: "蓝",
red: "红",
pure_green: "精绿",
soft_green: "柔绿",
}
/** 颜色预设对应的默认色值 */
export const CHROMA_KEY_PRESET_COLORS: Record<ChromaKeyColorPreset, string> = {
green: "#00FF00",
blue: "#0000FF",
red: "#FF0000",
pure_green: "#00C800",
soft_green: "#40E040",
}
/** 绿幕抠像配置 */
export interface ChromaKeyConfig {
/** 是否启用绿幕抠像 */
enabled: boolean
/** 颜色预设 */
color_preset: ChromaKeyColorPreset
/** 抠像目标颜色(HEX) */
color: string
/** 相似度(0 ~ 100,越大容忍的色差范围越广) */
similarity: number
/** 边缘平滑(0 ~ 100,越大边缘越柔和) */
blend: number
/** 溢色抑制(0 ~ 100,去除边缘颜色溢出) */
spill: number
}
/** 默认绿幕抠像配置 */
export const DEFAULT_CHROMA_KEY_CONFIG: ChromaKeyConfig = {
enabled: false,
color_preset: "green",
color: "#00FF00",
similarity: 30,
blend: 10,
spill: 20,
}