From d2f2c2c3e578c24dccb59d5d7367b83ba264a819 Mon Sep 17 00:00:00 2001 From: Bauke Date: Tue, 8 Mar 2022 13:30:57 +0100 Subject: [PATCH] Add gegl:softglow. --- source/gegl/exports.ts | 1 + source/gegl/softglow.ts | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 source/gegl/softglow.ts diff --git a/source/gegl/exports.ts b/source/gegl/exports.ts index 87eb6f9..bb14f7c 100644 --- a/source/gegl/exports.ts +++ b/source/gegl/exports.ts @@ -4,3 +4,4 @@ export * from './generic.js'; export * from './mirrors.js'; export * from './newsprint.js'; export * from './simplex-noise.js'; +export * from './softglow.js'; diff --git a/source/gegl/softglow.ts b/source/gegl/softglow.ts new file mode 100644 index 0000000..cb8a1a0 --- /dev/null +++ b/source/gegl/softglow.ts @@ -0,0 +1,26 @@ +import {BaseOperation} from './base.js'; + +export interface SoftglowParameters { + brightness: number; + glowRadius: number; + sharpness: number; +} + +export class Softglow extends BaseOperation { + public static default: SoftglowParameters = { + brightness: 0.3, + glowRadius: 10, + sharpness: 0.85, + }; + + public get default() { + return Softglow.default; + } + + public appendCrop = false; + public name = 'gegl:softglow'; + + constructor(parameters?: Partial) { + super({...Softglow.default, ...parameters}); + } +}