TkAstral3D/packages/editor/src/utils/common/postprocessing.ts
2026-04-08 16:51:47 +08:00

49 lines
967 B
TypeScript

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" },
];