wip
This commit is contained in:
parent
091eee626b
commit
33c4da96cf
|
@ -12102,33 +12102,33 @@ export interface Locale extends ILocale {
|
||||||
*/
|
*/
|
||||||
"angle": string;
|
"angle": string;
|
||||||
/**
|
/**
|
||||||
* 点グリッド
|
* ポルカドット
|
||||||
*/
|
*/
|
||||||
"dottedGrid": string;
|
"polkadot": string;
|
||||||
/**
|
/**
|
||||||
* チェッカー
|
* チェッカー
|
||||||
*/
|
*/
|
||||||
"checker": string;
|
"checker": string;
|
||||||
/**
|
/**
|
||||||
* 主点の不透明度
|
* メインドットの不透明度
|
||||||
*/
|
*/
|
||||||
"gridMajorOpacity": string;
|
"polkadotMainDotOpacity": string;
|
||||||
/**
|
/**
|
||||||
* 副点の大きさ
|
* メインドットの大きさ
|
||||||
*/
|
*/
|
||||||
"gridMajorRadius": string;
|
"polkadotMainDotRadius": string;
|
||||||
/**
|
/**
|
||||||
* 副点の不透明度
|
* サブドットの不透明度
|
||||||
*/
|
*/
|
||||||
"gridMinorOpacity": string;
|
"polkadotSubDotOpacity": string;
|
||||||
/**
|
/**
|
||||||
* 副点の大きさ
|
* サブドットの大きさ
|
||||||
*/
|
*/
|
||||||
"gridMinorRadius": string;
|
"polkadotSubDotRadius": string;
|
||||||
/**
|
/**
|
||||||
* 副点の数
|
* サブドットの数
|
||||||
*/
|
*/
|
||||||
"gridMinorDivisions": string;
|
"polkadotSubDotDivisions": string;
|
||||||
};
|
};
|
||||||
"_imageEffector": {
|
"_imageEffector": {
|
||||||
/**
|
/**
|
||||||
|
@ -12189,9 +12189,9 @@ export interface Locale extends ILocale {
|
||||||
*/
|
*/
|
||||||
"stripe": string;
|
"stripe": string;
|
||||||
/**
|
/**
|
||||||
* 点グリッド
|
* ポルカドット
|
||||||
*/
|
*/
|
||||||
"dottedGrid": string;
|
"polkadot": string;
|
||||||
/**
|
/**
|
||||||
* チェッカー
|
* チェッカー
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3240,13 +3240,13 @@ _watermarkEditor:
|
||||||
stripeWidth: "ラインの幅"
|
stripeWidth: "ラインの幅"
|
||||||
stripeFrequency: "ラインの数"
|
stripeFrequency: "ラインの数"
|
||||||
angle: "角度"
|
angle: "角度"
|
||||||
dottedGrid: "点グリッド"
|
polkadot: "ポルカドット"
|
||||||
checker: "チェッカー"
|
checker: "チェッカー"
|
||||||
gridMajorOpacity: "主点の不透明度"
|
polkadotMainDotOpacity: "メインドットの不透明度"
|
||||||
gridMajorRadius: "副点の大きさ"
|
polkadotMainDotRadius: "メインドットの大きさ"
|
||||||
gridMinorOpacity: "副点の不透明度"
|
polkadotSubDotOpacity: "サブドットの不透明度"
|
||||||
gridMinorRadius: "副点の大きさ"
|
polkadotSubDotRadius: "サブドットの大きさ"
|
||||||
gridMinorDivisions: "副点の数"
|
polkadotSubDotDivisions: "サブドットの数"
|
||||||
|
|
||||||
_imageEffector:
|
_imageEffector:
|
||||||
title: "エフェクト"
|
title: "エフェクト"
|
||||||
|
@ -3265,5 +3265,5 @@ _imageEffector:
|
||||||
threshold: "二値化"
|
threshold: "二値化"
|
||||||
zoomLines: "集中線"
|
zoomLines: "集中線"
|
||||||
stripe: "ストライプ"
|
stripe: "ストライプ"
|
||||||
dottedGrid: "点グリッド"
|
polkadot: "ポルカドット"
|
||||||
checker: "チェッカー"
|
checker: "チェッカー"
|
||||||
|
|
|
@ -150,7 +150,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</MkRange>
|
</MkRange>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-else-if="layer.type === 'dottedGrid'">
|
<template v-else-if="layer.type === 'polkadot'">
|
||||||
<MkRange
|
<MkRange
|
||||||
v-model="layer.angle"
|
v-model="layer.angle"
|
||||||
:min="-1"
|
:min="-1"
|
||||||
|
@ -179,7 +179,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
:textConverter="(v) => (v * 100).toFixed(1) + '%'"
|
:textConverter="(v) => (v * 100).toFixed(1) + '%'"
|
||||||
continuousUpdate
|
continuousUpdate
|
||||||
>
|
>
|
||||||
<template #label>{{ i18n.ts._watermarkEditor.gridMajorRadius }}</template>
|
<template #label>{{ i18n.ts._watermarkEditor.polkadotMainDotRadius }}</template>
|
||||||
</MkRange>
|
</MkRange>
|
||||||
|
|
||||||
<MkRange
|
<MkRange
|
||||||
|
@ -190,7 +190,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
:textConverter="(v) => (v * 100).toFixed(1) + '%'"
|
:textConverter="(v) => (v * 100).toFixed(1) + '%'"
|
||||||
continuousUpdate
|
continuousUpdate
|
||||||
>
|
>
|
||||||
<template #label>{{ i18n.ts._watermarkEditor.gridMajorOpacity }}</template>
|
<template #label>{{ i18n.ts._watermarkEditor.polkadotMainDotOpacity }}</template>
|
||||||
</MkRange>
|
</MkRange>
|
||||||
|
|
||||||
<MkRange
|
<MkRange
|
||||||
|
@ -200,7 +200,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
:step="1"
|
:step="1"
|
||||||
continuousUpdate
|
continuousUpdate
|
||||||
>
|
>
|
||||||
<template #label>{{ i18n.ts._watermarkEditor.gridMinorDivisions }}</template>
|
<template #label>{{ i18n.ts._watermarkEditor.polkadotSubDotDivisions }}</template>
|
||||||
</MkRange>
|
</MkRange>
|
||||||
|
|
||||||
<MkRange
|
<MkRange
|
||||||
|
@ -211,7 +211,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
:textConverter="(v) => (v * 100).toFixed(1) + '%'"
|
:textConverter="(v) => (v * 100).toFixed(1) + '%'"
|
||||||
continuousUpdate
|
continuousUpdate
|
||||||
>
|
>
|
||||||
<template #label>{{ i18n.ts._watermarkEditor.gridMinorRadius }}</template>
|
<template #label>{{ i18n.ts._watermarkEditor.polkadotSubDotRadius }}</template>
|
||||||
</MkRange>
|
</MkRange>
|
||||||
|
|
||||||
<MkRange
|
<MkRange
|
||||||
|
@ -222,7 +222,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
:textConverter="(v) => (v * 100).toFixed(1) + '%'"
|
:textConverter="(v) => (v * 100).toFixed(1) + '%'"
|
||||||
continuousUpdate
|
continuousUpdate
|
||||||
>
|
>
|
||||||
<template #label>{{ i18n.ts._watermarkEditor.gridMinorOpacity }}</template>
|
<template #label>{{ i18n.ts._watermarkEditor.polkadotSubDotOpacity }}</template>
|
||||||
</MkRange>
|
</MkRange>
|
||||||
</template>
|
</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 === 'text'">{{ i18n.ts._watermarkEditor.text }}</div>
|
||||||
<div v-if="layer.type === 'image'">{{ i18n.ts._watermarkEditor.image }}</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 === '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>
|
<div v-if="layer.type === 'checker'">{{ i18n.ts._watermarkEditor.checker }}</div>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
@ -129,10 +129,10 @@ function createStripeLayer(): WatermarkPreset['layers'][number] {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function createDottedGridLayer(): WatermarkPreset['layers'][number] {
|
function createPolkadotLayer(): WatermarkPreset['layers'][number] {
|
||||||
return {
|
return {
|
||||||
id: genId(),
|
id: genId(),
|
||||||
type: 'dottedGrid',
|
type: 'polkadot',
|
||||||
angle: 0.5,
|
angle: 0.5,
|
||||||
scale: 3,
|
scale: 3,
|
||||||
majorRadius: 0.1,
|
majorRadius: 0.1,
|
||||||
|
@ -331,9 +331,9 @@ function addLayer(ev: MouseEvent) {
|
||||||
preset.layers.push(createStripeLayer());
|
preset.layers.push(createStripeLayer());
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
text: i18n.ts._watermarkEditor.dottedGrid,
|
text: i18n.ts._watermarkEditor.polkadot,
|
||||||
action: () => {
|
action: () => {
|
||||||
preset.layers.push(createDottedGridLayer());
|
preset.layers.push(createPolkadotLayer());
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
text: i18n.ts._watermarkEditor.checker,
|
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_colorClamp } from './fxs/colorClamp.js';
|
||||||
import { FX_colorClampAdvanced } from './fxs/colorClampAdvanced.js';
|
import { FX_colorClampAdvanced } from './fxs/colorClampAdvanced.js';
|
||||||
import { FX_distort } from './fxs/distort.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_glitch } from './fxs/glitch.js';
|
||||||
import { FX_grayscale } from './fxs/grayscale.js';
|
import { FX_grayscale } from './fxs/grayscale.js';
|
||||||
import { FX_invert } from './fxs/invert.js';
|
import { FX_invert } from './fxs/invert.js';
|
||||||
|
@ -32,6 +32,6 @@ export const FXS = [
|
||||||
FX_threshold,
|
FX_threshold,
|
||||||
FX_zoomLines,
|
FX_zoomLines,
|
||||||
FX_stripe,
|
FX_stripe,
|
||||||
FX_dottedGrid,
|
FX_polkadot,
|
||||||
FX_checker,
|
FX_checker,
|
||||||
] as const satisfies ImageEffectorFx<string, any>[];
|
] as const satisfies ImageEffectorFx<string, any>[];
|
||||||
|
|
|
@ -78,9 +78,9 @@ void main() {
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const FX_dottedGrid = defineImageEffectorFx({
|
export const FX_polkadot = defineImageEffectorFx({
|
||||||
id: 'dottedGrid' as const,
|
id: 'polkadot' as const,
|
||||||
name: i18n.ts._imageEffector._fxs.dottedGrid,
|
name: i18n.ts._imageEffector._fxs.polkadot,
|
||||||
shader,
|
shader,
|
||||||
uniforms: ['angle', 'scale', 'major_radius', 'major_opacity', 'minor_divisions', 'minor_radius', 'minor_opacity', 'black'] as const,
|
uniforms: ['angle', 'scale', 'major_radius', 'major_opacity', 'minor_divisions', 'minor_radius', 'minor_opacity', 'black'] as const,
|
||||||
params: {
|
params: {
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
import { FX_watermarkPlacement } from './image-effector/fxs/watermarkPlacement.js';
|
import { FX_watermarkPlacement } from './image-effector/fxs/watermarkPlacement.js';
|
||||||
import { FX_stripe } from './image-effector/fxs/stripe.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 { FX_checker } from './image-effector/fxs/checker.js';
|
||||||
import type { ImageEffectorLayer } from '@/utility/image-effector/ImageEffector.js';
|
import type { ImageEffectorLayer } from '@/utility/image-effector/ImageEffector.js';
|
||||||
import { ImageEffector } from '@/utility/image-effector/ImageEffector.js';
|
import { ImageEffector } from '@/utility/image-effector/ImageEffector.js';
|
||||||
|
@ -43,7 +43,7 @@ export type WatermarkPreset = {
|
||||||
opacity: number;
|
opacity: number;
|
||||||
} | {
|
} | {
|
||||||
id: string;
|
id: string;
|
||||||
type: 'dottedGrid';
|
type: 'polkadot';
|
||||||
angle: number;
|
angle: number;
|
||||||
scale: number;
|
scale: number;
|
||||||
majorRadius: number;
|
majorRadius: number;
|
||||||
|
@ -78,7 +78,7 @@ export class WatermarkRenderer {
|
||||||
renderWidth: options.renderWidth,
|
renderWidth: options.renderWidth,
|
||||||
renderHeight: options.renderHeight,
|
renderHeight: options.renderHeight,
|
||||||
image: options.image,
|
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,
|
opacity: layer.opacity,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
} else if (layer.type === 'dottedGrid') {
|
} else if (layer.type === 'polkadot') {
|
||||||
return {
|
return {
|
||||||
fxId: 'dottedGrid',
|
fxId: 'polkadot',
|
||||||
id: layer.id,
|
id: layer.id,
|
||||||
params: {
|
params: {
|
||||||
angle: layer.angle,
|
angle: layer.angle,
|
||||||
|
|
Loading…
Reference in New Issue