Add gegl:waterpixels.

This commit is contained in:
Bauke 2022-03-10 18:31:50 +01:00
parent 567134ebf8
commit d8314f701e
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
2 changed files with 29 additions and 0 deletions

View File

@ -14,4 +14,5 @@ export * from './simplex-noise.js';
export * from './softglow.js';
export * from './stereographic-projection.js';
export * from './tile-seamless.js';
export * from './waterpixels.js';
export * from './waves.js';

View File

@ -0,0 +1,28 @@
import {BaseOperation} from './base.js';
export interface WaterpixelsParameters {
fill: 'average' | 'random';
regularization: number;
size: number;
smoothness: number;
}
export class Waterpixels extends BaseOperation<WaterpixelsParameters> {
public static default: WaterpixelsParameters = {
fill: 'average',
regularization: 0,
size: 32,
smoothness: 1,
};
public get default() {
return Waterpixels.default;
}
public appendCrop = false;
public name = 'gegl:waterpixels';
constructor(parameters?: Partial<WaterpixelsParameters>) {
super({...Waterpixels.default, ...parameters});
}
}