From 4cc239d660ce5708dc7e319ddbfdd6b5a6e36a72 Mon Sep 17 00:00:00 2001 From: plum <40649341+plum-k@users.noreply.github.com> Date: Wed, 8 Apr 2026 16:51:47 +0800 Subject: [PATCH] =?UTF-8?q?feat(all):=20=E5=90=8E=E5=A4=84=E7=90=86?= =?UTF-8?q?=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/editor/src/language/zh-CN-en-US.ts | 76 +++++- .../editor/src/utils/common/postprocessing.ts | 48 ++++ .../editor/layouts/sidebar/SidebarEffect.vue | 218 ++++++++++++++---- .../effect/Sidebar.Effect.Afterimage.vue | 5 +- .../sidebar/effect/Sidebar.Effect.Bokeh.vue | 5 +- .../Sidebar.Effect.BrightnessContrast.vue | 67 ++++++ .../Sidebar.Effect.ChromaticAberration.vue | 83 +++++++ .../effect/Sidebar.Effect.ColorDepth.vue | 59 +++++ .../sidebar/effect/Sidebar.Effect.FXAA.vue | 5 +- .../sidebar/effect/Sidebar.Effect.Glitch.vue | 121 ++++++++++ .../effect/Sidebar.Effect.Halftone.vue | 5 +- .../effect/Sidebar.Effect.HueSaturation.vue | 69 ++++++ .../sidebar/effect/Sidebar.Effect.LUT.vue | 5 +- .../effect/Sidebar.Effect.LensDistortion.vue | 98 ++++++++ .../sidebar/effect/Sidebar.Effect.Outline.vue | 5 +- .../effect/Sidebar.Effect.Pixelate.vue | 5 +- .../sidebar/effect/Sidebar.Effect.SMAA.vue | 62 +++++ .../sidebar/effect/Sidebar.Effect.SSAO.vue | 208 +++++++++++++++++ .../effect/Sidebar.Effect.Scanline.vue | 75 ++++++ .../effect/Sidebar.Effect.ShockWave.vue | 91 ++++++++ .../effect/Sidebar.Effect.TiltShift.vue | 91 ++++++++ .../effect/Sidebar.Effect.ToneMapping.vue | 81 +++++++ .../effect/Sidebar.Effect.UnrealBloom.vue | 5 +- .../effect/Sidebar.Effect.Vignette.vue | 70 ++++++ packages/sdk/lib/core/app/modules/Project.ts | 153 +++++++++++- 25 files changed, 1644 insertions(+), 66 deletions(-) create mode 100644 packages/editor/src/utils/common/postprocessing.ts create mode 100644 packages/editor/src/views/editor/layouts/sidebar/effect/Sidebar.Effect.BrightnessContrast.vue create mode 100644 packages/editor/src/views/editor/layouts/sidebar/effect/Sidebar.Effect.ChromaticAberration.vue create mode 100644 packages/editor/src/views/editor/layouts/sidebar/effect/Sidebar.Effect.ColorDepth.vue create mode 100644 packages/editor/src/views/editor/layouts/sidebar/effect/Sidebar.Effect.Glitch.vue create mode 100644 packages/editor/src/views/editor/layouts/sidebar/effect/Sidebar.Effect.HueSaturation.vue create mode 100644 packages/editor/src/views/editor/layouts/sidebar/effect/Sidebar.Effect.LensDistortion.vue create mode 100644 packages/editor/src/views/editor/layouts/sidebar/effect/Sidebar.Effect.SMAA.vue create mode 100644 packages/editor/src/views/editor/layouts/sidebar/effect/Sidebar.Effect.SSAO.vue create mode 100644 packages/editor/src/views/editor/layouts/sidebar/effect/Sidebar.Effect.Scanline.vue create mode 100644 packages/editor/src/views/editor/layouts/sidebar/effect/Sidebar.Effect.ShockWave.vue create mode 100644 packages/editor/src/views/editor/layouts/sidebar/effect/Sidebar.Effect.TiltShift.vue create mode 100644 packages/editor/src/views/editor/layouts/sidebar/effect/Sidebar.Effect.ToneMapping.vue create mode 100644 packages/editor/src/views/editor/layouts/sidebar/effect/Sidebar.Effect.Vignette.vue diff --git a/packages/editor/src/language/zh-CN-en-US.ts b/packages/editor/src/language/zh-CN-en-US.ts index 2063e27..0ec4bb1 100644 --- a/packages/editor/src/language/zh-CN-en-US.ts +++ b/packages/editor/src/language/zh-CN-en-US.ts @@ -226,6 +226,27 @@ export default { "Post processing": "后期处理", postProcessing: { "Anti-aliasing": "抗锯齿", + "Quality Preset": "质量预设", + "Tone Mapping": "色调映射", + "Exposure": "曝光度", + "SSAO": "环境光遮蔽", + "Samples": "采样数", + "Rings": "环数", + "Bias": "偏置", + "Fade": "衰减", + "Luminance Influence": "亮度影响", + "Min Radius Scale": "最小半径缩放", + "Depth-aware Upsampling": "深度感知上采样", + "Distance Threshold": "距离阈值", + "Distance Falloff": "距离衰减", + "Range Threshold": "范围阈值", + "Range Falloff": "范围衰减", + "World Distance Threshold": "世界距离阈值", + "World Distance Falloff": "世界距离衰减", + "World Proximity Threshold": "世界邻近阈值", + "World Proximity Falloff": "世界邻近衰减", + "Colorize": "颜色化", + "AO Color": "遮蔽颜色", "Outline": "描边线", "Edge Strength": "边缘强度", "Edge Glow": "边缘发光", @@ -237,6 +258,57 @@ export default { "Radius": "半径", "Threshold": "阈值", "Strength": "强度", + "Brightness Contrast": "亮度对比度", + "Brightness": "亮度", + "Contrast": "对比度", + "Chromatic Aberration": "色差", + "Offset X": "偏移 X", + "Offset Y": "偏移 Y", + "Radial Modulation": "径向调制", + "Modulation Offset": "调制偏移", + "Color Depth": "色深", + "Bits": "位数", + "Hue Saturation": "色相饱和度", + "Hue": "色相", + "Saturation": "饱和度", + "Tilt Shift": "移轴模糊", + "Offset": "偏移", + "Rotation": "旋转", + "Focus Area": "焦点区域", + "Feather": "羽化", + "Scanline": "扫描线", + "Density": "密度", + "Scroll Speed": "滚动速度", + "Glitch": "故障", + "Glitch Mode": "故障模式", + "Sporadic": "偶发", + "Constant Mild": "持续轻微", + "Constant Wild": "持续剧烈", + "Delay Min": "延迟最小值", + "Delay Max": "延迟最大值", + "Duration Min": "持续最小值", + "Duration Max": "持续最大值", + "Strength Min": "强度最小值", + "Strength Max": "强度最大值", + "Ratio": "出现概率", + "Lens Distortion": "镜头畸变", + "Distortion X": "畸变 X", + "Distortion Y": "畸变 Y", + "Principal Point X": "主点 X", + "Principal Point Y": "主点 Y", + "Focal Length X": "焦距 X", + "Focal Length Y": "焦距 Y", + "Skew": "倾斜", + "Shock Wave": "冲击波", + "Click on scene to trigger shock wave effect": "点击场景触发冲击波效果", + "Amplitude": "振幅", + "Wave Size": "波浪大小", + "Speed": "传播速度", + "Max Radius": "最大半径", + "Click Trigger": "点击触发", + "Vignette": "暗角", + "Darkness": "暗度", + "Blend Function": "混合模式", "LUT Color filter":"LUT 颜色滤镜", "Intensity":"强度", "Afterimage":"运动残影", @@ -245,6 +317,7 @@ export default { "Focus": "焦距", "Aperture": "孔径", "MaxBlur": "最大模糊", + "Resolution Scale": "分辨率缩放", "Pixelate": "像素风", "PixelSize": "像素大小", "NormalEdgeStrength": "法向边缘强度", @@ -747,6 +820,7 @@ export default { Open: "开启", Close: "关闭", Enable: "启用", + Enabled: "启用", Minimum: "最小值", Maximum: "最大值", Width: "宽度", @@ -1255,4 +1329,4 @@ export default { "Camera": '相机', } } -}; \ No newline at end of file +}; diff --git a/packages/editor/src/utils/common/postprocessing.ts b/packages/editor/src/utils/common/postprocessing.ts new file mode 100644 index 0000000..82b70f1 --- /dev/null +++ b/packages/editor/src/utils/common/postprocessing.ts @@ -0,0 +1,48 @@ +import { t } from "@/language"; + +// Blend mode options for post-processing blendFunction config. +const BLEND_FUNCTION_KEYS = [ + "NORMAL", + "ADD", + "ALPHA", + "AVERAGE", + "COLOR", + "COLOR_BURN", + "COLOR_DODGE", + "DARKEN", + "DIFFERENCE", + "DIVIDE", + "DST", + "EXCLUSION", + "HARD_LIGHT", + "HARD_MIX", + "HUE", + "INVERT", + "INVERT_RGB", + "LIGHTEN", + "LINEAR_BURN", + "LINEAR_DODGE", + "LINEAR_LIGHT", + "LUMINOSITY", + "MULTIPLY", + "NEGATION", + "OVERLAY", + "PIN_LIGHT", + "REFLECT", + "SATURATION", + "SCREEN", + "SET", + "SOFT_LIGHT", + "SRC", + "SUBTRACT", + "VIVID_LIGHT", +] as const; + +export const blendFunctionOptions = BLEND_FUNCTION_KEYS.map(k => ({ label: k, value: k })); + +// Glitch mode options. +export const glitchModeOptions = [ + { label: t("layout.sider.postProcessing.Sporadic"), value: "SPORADIC" }, + { label: t("layout.sider.postProcessing.Constant Mild"), value: "CONSTANT_MILD" }, + { label: t("layout.sider.postProcessing.Constant Wild"), value: "CONSTANT_WILD" }, +]; diff --git a/packages/editor/src/views/editor/layouts/sidebar/SidebarEffect.vue b/packages/editor/src/views/editor/layouts/sidebar/SidebarEffect.vue index ea8a1b4..95b519d 100644 --- a/packages/editor/src/views/editor/layouts/sidebar/SidebarEffect.vue +++ b/packages/editor/src/views/editor/layouts/sidebar/SidebarEffect.vue @@ -1,37 +1,122 @@