This commit is contained in:
syuilo 2025-06-03 18:20:57 +09:00
parent 091eee626b
commit 33c4da96cf
7 changed files with 42 additions and 42 deletions

28
locales/index.d.ts vendored
View File

@ -12102,33 +12102,33 @@ export interface Locale extends ILocale {
*/
"angle": string;
/**
*
*
*/
"dottedGrid": string;
"polkadot": string;
/**
*
*/
"checker": string;
/**
*
*
*/
"gridMajorOpacity": string;
"polkadotMainDotOpacity": string;
/**
*
*
*/
"gridMajorRadius": string;
"polkadotMainDotRadius": string;
/**
*
*
*/
"gridMinorOpacity": string;
"polkadotSubDotOpacity": string;
/**
*
*
*/
"gridMinorRadius": string;
"polkadotSubDotRadius": string;
/**
*
*
*/
"gridMinorDivisions": string;
"polkadotSubDotDivisions": string;
};
"_imageEffector": {
/**
@ -12189,9 +12189,9 @@ export interface Locale extends ILocale {
*/
"stripe": string;
/**
*
*
*/
"dottedGrid": string;
"polkadot": string;
/**
*
*/

View File

@ -3240,13 +3240,13 @@ _watermarkEditor:
stripeWidth: "ラインの幅"
stripeFrequency: "ラインの数"
angle: "角度"
dottedGrid: "点グリッド"
polkadot: "ポルカドット"
checker: "チェッカー"
gridMajorOpacity: "主点の不透明度"
gridMajorRadius: "副点の大きさ"
gridMinorOpacity: "副点の不透明度"
gridMinorRadius: "副点の大きさ"
gridMinorDivisions: "副点の数"
polkadotMainDotOpacity: "メインドットの不透明度"
polkadotMainDotRadius: "メインドットの大きさ"
polkadotSubDotOpacity: "サブドットの不透明度"
polkadotSubDotRadius: "サブドットの大きさ"
polkadotSubDotDivisions: "サブドットの数"
_imageEffector:
title: "エフェクト"
@ -3265,5 +3265,5 @@ _imageEffector:
threshold: "二値化"
zoomLines: "集中線"
stripe: "ストライプ"
dottedGrid: "点グリッド"
polkadot: "ポルカドット"
checker: "チェッカー"

View File

@ -150,7 +150,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkRange>
</template>
<template v-else-if="layer.type === 'dottedGrid'">
<template v-else-if="layer.type === 'polkadot'">
<MkRange
v-model="layer.angle"
:min="-1"
@ -179,7 +179,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:textConverter="(v) => (v * 100).toFixed(1) + '%'"
continuousUpdate
>
<template #label>{{ i18n.ts._watermarkEditor.gridMajorRadius }}</template>
<template #label>{{ i18n.ts._watermarkEditor.polkadotMainDotRadius }}</template>
</MkRange>
<MkRange
@ -190,7 +190,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:textConverter="(v) => (v * 100).toFixed(1) + '%'"
continuousUpdate
>
<template #label>{{ i18n.ts._watermarkEditor.gridMajorOpacity }}</template>
<template #label>{{ i18n.ts._watermarkEditor.polkadotMainDotOpacity }}</template>
</MkRange>
<MkRange
@ -200,7 +200,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:step="1"
continuousUpdate
>
<template #label>{{ i18n.ts._watermarkEditor.gridMinorDivisions }}</template>
<template #label>{{ i18n.ts._watermarkEditor.polkadotSubDotDivisions }}</template>
</MkRange>
<MkRange
@ -211,7 +211,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:textConverter="(v) => (v * 100).toFixed(1) + '%'"
continuousUpdate
>
<template #label>{{ i18n.ts._watermarkEditor.gridMinorRadius }}</template>
<template #label>{{ i18n.ts._watermarkEditor.polkadotSubDotRadius }}</template>
</MkRange>
<MkRange
@ -222,7 +222,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:textConverter="(v) => (v * 100).toFixed(1) + '%'"
continuousUpdate
>
<template #label>{{ i18n.ts._watermarkEditor.gridMinorOpacity }}</template>
<template #label>{{ i18n.ts._watermarkEditor.polkadotSubDotOpacity }}</template>
</MkRange>
</template>

View File

@ -47,7 +47,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<div v-if="layer.type === 'text'">{{ i18n.ts._watermarkEditor.text }}</div>
<div v-if="layer.type === 'image'">{{ i18n.ts._watermarkEditor.image }}</div>
<div v-if="layer.type === 'stripe'">{{ i18n.ts._watermarkEditor.stripe }}</div>
<div v-if="layer.type === 'dottedGrid'">{{ i18n.ts._watermarkEditor.dottedGrid }}</div>
<div v-if="layer.type === 'polkadot'">{{ i18n.ts._watermarkEditor.polkadot }}</div>
<div v-if="layer.type === 'checker'">{{ i18n.ts._watermarkEditor.checker }}</div>
</template>
<template #footer>
@ -129,10 +129,10 @@ function createStripeLayer(): WatermarkPreset['layers'][number] {
};
}
function createDottedGridLayer(): WatermarkPreset['layers'][number] {
function createPolkadotLayer(): WatermarkPreset['layers'][number] {
return {
id: genId(),
type: 'dottedGrid',
type: 'polkadot',
angle: 0.5,
scale: 3,
majorRadius: 0.1,
@ -331,9 +331,9 @@ function addLayer(ev: MouseEvent) {
preset.layers.push(createStripeLayer());
},
}, {
text: i18n.ts._watermarkEditor.dottedGrid,
text: i18n.ts._watermarkEditor.polkadot,
action: () => {
preset.layers.push(createDottedGridLayer());
preset.layers.push(createPolkadotLayer());
},
}, {
text: i18n.ts._watermarkEditor.checker,

View File

@ -8,7 +8,7 @@ import { FX_chromaticAberration } from './fxs/chromaticAberration.js';
import { FX_colorClamp } from './fxs/colorClamp.js';
import { FX_colorClampAdvanced } from './fxs/colorClampAdvanced.js';
import { FX_distort } from './fxs/distort.js';
import { FX_dottedGrid } from './fxs/dottedGrid.js';
import { FX_polkadot } from './fxs/polkadot.js';
import { FX_glitch } from './fxs/glitch.js';
import { FX_grayscale } from './fxs/grayscale.js';
import { FX_invert } from './fxs/invert.js';
@ -32,6 +32,6 @@ export const FXS = [
FX_threshold,
FX_zoomLines,
FX_stripe,
FX_dottedGrid,
FX_polkadot,
FX_checker,
] as const satisfies ImageEffectorFx<string, any>[];

View File

@ -78,9 +78,9 @@ void main() {
}
`;
export const FX_dottedGrid = defineImageEffectorFx({
id: 'dottedGrid' as const,
name: i18n.ts._imageEffector._fxs.dottedGrid,
export const FX_polkadot = defineImageEffectorFx({
id: 'polkadot' as const,
name: i18n.ts._imageEffector._fxs.polkadot,
shader,
uniforms: ['angle', 'scale', 'major_radius', 'major_opacity', 'minor_divisions', 'minor_radius', 'minor_opacity', 'black'] as const,
params: {

View File

@ -5,7 +5,7 @@
import { FX_watermarkPlacement } from './image-effector/fxs/watermarkPlacement.js';
import { FX_stripe } from './image-effector/fxs/stripe.js';
import { FX_dottedGrid } from './image-effector/fxs/dottedGrid.js';
import { FX_polkadot } from './image-effector/fxs/polkadot.js';
import { FX_checker } from './image-effector/fxs/checker.js';
import type { ImageEffectorLayer } from '@/utility/image-effector/ImageEffector.js';
import { ImageEffector } from '@/utility/image-effector/ImageEffector.js';
@ -43,7 +43,7 @@ export type WatermarkPreset = {
opacity: number;
} | {
id: string;
type: 'dottedGrid';
type: 'polkadot';
angle: number;
scale: number;
majorRadius: number;
@ -78,7 +78,7 @@ export class WatermarkRenderer {
renderWidth: options.renderWidth,
renderHeight: options.renderHeight,
image: options.image,
fxs: [FX_watermarkPlacement, FX_stripe, FX_dottedGrid, FX_checker],
fxs: [FX_watermarkPlacement, FX_stripe, FX_polkadot, FX_checker],
});
}
@ -130,9 +130,9 @@ export class WatermarkRenderer {
opacity: layer.opacity,
},
};
} else if (layer.type === 'dottedGrid') {
} else if (layer.type === 'polkadot') {
return {
fxId: 'dottedGrid',
fxId: 'polkadot',
id: layer.id,
params: {
angle: layer.angle,