diff --git a/source/gegl/exports.ts b/source/gegl/exports.ts index 4f4cd83..58380b3 100644 --- a/source/gegl/exports.ts +++ b/source/gegl/exports.ts @@ -11,6 +11,7 @@ export * from './median-blur.js'; export * from './mirrors.js'; export * from './mosaic.js'; export * from './newsprint.js'; +export * from './noise-pick.js'; export * from './plasma.js'; export * from './simplex-noise.js'; export * from './softglow.js'; diff --git a/source/gegl/noise-pick.ts b/source/gegl/noise-pick.ts new file mode 100644 index 0000000..04105dc --- /dev/null +++ b/source/gegl/noise-pick.ts @@ -0,0 +1,26 @@ +import {BaseOperation} from './base.js'; + +export interface NoisePickParameters { + pctRandom: number; + repeat: number; + seed: number; +} + +export class NoisePick extends BaseOperation { + public static default: NoisePickParameters = { + pctRandom: 50, + repeat: 1, + seed: 0, + }; + + public get default() { + return NoisePick.default; + } + + public appendCrop = true; + public name = 'gegl:noise-pick'; + + constructor(parameters?: Partial) { + super({...NoisePick.default, ...parameters}); + } +}