diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-06-15 10:57:29 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-06-15 10:57:29 +0900 |
| commit | e9af9d4451f1ff66c13040b46d8316b52539901b (patch) | |
| tree | 0b15b9f65132fd5bef6fb36f80db46a84498875b /packages/frontend | |
| parent | enhance(frontend/image-effector): add blockNoise fx (diff) | |
| download | misskey-e9af9d4451f1ff66c13040b46d8316b52539901b.tar.gz misskey-e9af9d4451f1ff66c13040b46d8316b52539901b.tar.bz2 misskey-e9af9d4451f1ff66c13040b46d8316b52539901b.zip | |
enhance(frontend/image-effector): tweak fxs
Diffstat (limited to 'packages/frontend')
| -rw-r--r-- | packages/frontend/src/utility/image-effector/fxs/glitch.ts | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/packages/frontend/src/utility/image-effector/fxs/glitch.ts b/packages/frontend/src/utility/image-effector/fxs/glitch.ts index 94027e0e31..702b476a0b 100644 --- a/packages/frontend/src/utility/image-effector/fxs/glitch.ts +++ b/packages/frontend/src/utility/image-effector/fxs/glitch.ts @@ -52,17 +52,19 @@ export const FX_glitch = defineImageEffectorFx({ }, strength: { type: 'number' as const, - default: 5, - min: -100, - max: 100, + default: 0.05, + min: -1, + max: 1, step: 0.01, + toViewValue: v => Math.round(v * 100) + '%', }, size: { type: 'number' as const, - default: 20, + default: 0.2, min: 0, - max: 100, + max: 1, step: 0.01, + toViewValue: v => Math.round(v * 100) + '%', }, channelShift: { type: 'number' as const, @@ -88,10 +90,10 @@ export const FX_glitch = defineImageEffectorFx({ gl.uniform1f(o, rnd()); const s = gl.getUniformLocation(program, `u_shiftStrengths[${i.toString()}]`); - gl.uniform1f(s, (1 - (rnd() * 2)) * (params.strength / 100)); + gl.uniform1f(s, (1 - (rnd() * 2)) * params.strength); const h = gl.getUniformLocation(program, `u_shiftHeights[${i.toString()}]`); - gl.uniform1f(h, rnd() * (params.size / 100)); + gl.uniform1f(h, rnd() * params.size); } }, }); |