From 3da741a6d17d9de6c4e568e54046e29138f29977 Mon Sep 17 00:00:00 2001 From: Bauke Date: Fri, 11 Mar 2022 22:10:19 +0100 Subject: [PATCH] Add gegl:oilify. --- source/gegl/exports.ts | 1 + source/gegl/oilify.ts | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 source/gegl/oilify.ts diff --git a/source/gegl/exports.ts b/source/gegl/exports.ts index 58380b3..a01e863 100644 --- a/source/gegl/exports.ts +++ b/source/gegl/exports.ts @@ -12,6 +12,7 @@ export * from './mirrors.js'; export * from './mosaic.js'; export * from './newsprint.js'; export * from './noise-pick.js'; +export * from './oilify.js'; export * from './plasma.js'; export * from './simplex-noise.js'; export * from './softglow.js'; diff --git a/source/gegl/oilify.ts b/source/gegl/oilify.ts new file mode 100644 index 0000000..df06951 --- /dev/null +++ b/source/gegl/oilify.ts @@ -0,0 +1,28 @@ +import {BaseOperation} from './base.js'; + +export interface OilifyParameters { + exponent: number; + intensities: number; + maskRadius: number; + useInten: boolean; +} + +export class Oilify extends BaseOperation { + public static default: OilifyParameters = { + exponent: 8, + intensities: 128, + maskRadius: 4, + useInten: true, + }; + + public get default() { + return Oilify.default; + } + + public appendCrop = false; + public name = 'gegl:oilify'; + + constructor(parameters?: Partial) { + super({...Oilify.default, ...parameters}); + } +}