enhance(frontend/image-effector): tweak fxs

This commit is contained in:
syuilo 2025-06-15 11:06:46 +09:00
parent e9af9d4451
commit fe805fb7f0
6 changed files with 13 additions and 10 deletions

4
locales/index.d.ts vendored
View File

@ -12224,6 +12224,10 @@ export interface Locale extends ILocale {
*
*/
"blockNoise": string;
/**
*
*/
"tearing": string;
};
};
}

View File

@ -3274,3 +3274,4 @@ _imageEffector:
polkadot: "ポルカドット"
checker: "チェッカー"
blockNoise: "ブロックノイズ"
tearing: "ティアリング"

View File

@ -96,7 +96,7 @@ watch(layers, async () => {
}, { deep: true });
function addEffect(ev: MouseEvent) {
os.popupMenu(FXS.filter(fx => fx.id !== 'watermarkPlacement').map((fx) => ({
os.popupMenu(FXS.map((fx) => ({
text: fx.name,
action: () => {
layers.push({

View File

@ -10,21 +10,17 @@ import { FX_colorClamp } from './fxs/colorClamp.js';
import { FX_colorClampAdvanced } from './fxs/colorClampAdvanced.js';
import { FX_distort } from './fxs/distort.js';
import { FX_polkadot } from './fxs/polkadot.js';
import { FX_glitch } from './fxs/glitch.js';
import { FX_tearing } from './fxs/tearing.js';
import { FX_grayscale } from './fxs/grayscale.js';
import { FX_invert } from './fxs/invert.js';
import { FX_mirror } from './fxs/mirror.js';
import { FX_stripe } from './fxs/stripe.js';
import { FX_threshold } from './fxs/threshold.js';
import { FX_watermarkPlacement } from './fxs/watermarkPlacement.js';
import { FX_zoomLines } from './fxs/zoomLines.js';
import { FX_blockNoise } from './fxs/blockNoise.js';
import type { ImageEffectorFx } from './ImageEffector.js';
export const FXS = [
FX_watermarkPlacement,
FX_chromaticAberration,
FX_glitch,
FX_mirror,
FX_invert,
FX_grayscale,
@ -37,5 +33,7 @@ export const FXS = [
FX_stripe,
FX_polkadot,
FX_checker,
FX_chromaticAberration,
FX_tearing,
FX_blockNoise,
] as const satisfies ImageEffectorFx<string, any>[];

View File

@ -49,7 +49,7 @@ void main() {
export const FX_blockNoise = defineImageEffectorFx({
id: 'blockNoise' as const,
name: i18n.ts._imageEffector._fxs.blockNoise,
name: i18n.ts._imageEffector._fxs.glitch + ': ' + i18n.ts._imageEffector._fxs.blockNoise,
shader,
uniforms: ['amount', 'channelShift'] as const,
params: {

View File

@ -37,9 +37,9 @@ void main() {
}
`;
export const FX_glitch = defineImageEffectorFx({
id: 'glitch' as const,
name: i18n.ts._imageEffector._fxs.glitch,
export const FX_tearing = defineImageEffectorFx({
id: 'tearing' as const,
name: i18n.ts._imageEffector._fxs.glitch + ': ' + i18n.ts._imageEffector._fxs.tearing,
shader,
uniforms: ['amount', 'channelShift'] as const,
params: {