Skip to content

Commit

Permalink
编辑器三期 (#56)
Browse files Browse the repository at this point in the history
* 编辑器三期功能支持
  • Loading branch information
niehongxu116 authored Jan 17, 2025
1 parent f7b02bb commit 6c4ddad
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions client/py/yidong/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ class BgmConfig(BaseModel):

class GlobalEditorConfig(BaseModel):
bgm_config: BgmConfig = BgmConfig()
video_fill_effect: str = "black_border"
output_width: float | None = None
output_height: float | None = None

Expand All @@ -204,6 +205,12 @@ class EffectBase(BaseModel):
duration: float = 0.5


class EffectConfig(BaseModel):
in_effect: EffectBase = EffectBase()
on_effect: EffectBase = EffectBase()
out_effect: EffectBase = EffectBase()


class FontBase(BaseModel):
text: str = ""
font: str = ""
Expand All @@ -222,7 +229,7 @@ class VoiceoverEditorConfig(FontBase):
mask_color: str = "#800080"


class TextoverEditorConfig(FontBase):
class TextoverEditorConfig(FontBase, EffectConfig):
rotate: float = 0.0
position_x: float = 0
position_y: float = -1
Expand All @@ -231,21 +238,16 @@ class TextoverEditorConfig(FontBase):
mask_color: str = ""
style: str = "mask"
style_value: str = ""
in_effect: EffectBase = EffectBase()
on_effect: EffectBase = EffectBase()
out_effect: EffectBase = EffectBase()


class ImageEditorConfig(BaseModel):
class ImageEditorConfig(EffectConfig):
resource_id: str = ""
start: float = 0.0
stop: float = 0.0
scale: float = 1.0
position_x: float = 0
position_y: float = -1
rotate: float = 0.0
in_effect: EffectBase = EffectBase()
out_effect: EffectBase = EffectBase()


class VideoEditorConfig(BaseModel):
Expand Down

0 comments on commit 6c4ddad

Please sign in to comment.