wip
This commit is contained in:
parent
091eee626b
commit
33c4da96cf
|
@ -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;
|
||||
/**
|
||||
* チェッカー
|
||||
*/
|
||||
|
|
|
@ -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: "チェッカー"
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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>[];
|
||||
|
|
|
@ -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: {
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue