diff --git a/source/gegl/cell-noise.ts b/source/gegl/cell-noise.ts new file mode 100644 index 0000000..5084534 --- /dev/null +++ b/source/gegl/cell-noise.ts @@ -0,0 +1,32 @@ +import {BaseOperation} from './base.js'; + +export interface CellNoiseParameters { + iterations: number; + palettize: boolean; + rank: number; + scale: number; + seed: number; + shape: number; +} + +export class CellNoise extends BaseOperation { + public static default: CellNoiseParameters = { + iterations: 1, + palettize: false, + rank: 1, + scale: 1, + seed: 0, + shape: 2, + }; + + public get default() { + return CellNoise.default; + } + + public appendCrop = true; + public name = 'gegl:cell-noise'; + + constructor(parameters?: Partial) { + super({...CellNoise.default, ...parameters}); + } +} diff --git a/source/gegl/exports.ts b/source/gegl/exports.ts index 481a548..2b788d2 100644 --- a/source/gegl/exports.ts +++ b/source/gegl/exports.ts @@ -1,4 +1,5 @@ export * from './base.js'; +export * from './cell-noise.js'; export * from './crop.js'; export * from './focus-blur.js'; export * from './generic.js';