Add gegl:diffraction-patterns.

This commit is contained in:
Bauke 2022-03-10 18:22:02 +01:00
parent e14c9ae2a6
commit 010f2363bb
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
2 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,48 @@
import {BaseOperation} from './base.js';
export interface DiffractionPatternsParameters {
blueContours: number;
blueFrequency: number;
blueSedges: number;
brightness: number;
greenContours: number;
greenFrequency: number;
greenSedges: number;
height: number;
polarization: number;
redContours: number;
redFrequency: number;
redSedges: number;
scattering: number;
width: number;
}
export class DiffractionPatterns extends BaseOperation<DiffractionPatternsParameters> {
public static default: DiffractionPatternsParameters = {
blueContours: 0.97,
blueFrequency: 1.12,
blueSedges: 0.64,
brightness: 0.07,
greenContours: 0.82,
greenFrequency: 1.22,
greenSedges: 0.68,
height: 200,
polarization: -0.47,
redContours: 0.82,
redFrequency: 0.81,
redSedges: 0.61,
scattering: 37.13,
width: 200,
};
public get default() {
return DiffractionPatterns.default;
}
public appendCrop = true;
public name = 'gegl:diffraction-patterns';
constructor(parameters?: Partial<DiffractionPatternsParameters>) {
super({...DiffractionPatterns.default, ...parameters});
}
}

View File

@ -2,6 +2,7 @@ export * from './base.js';
export * from './cartoon.js';
export * from './cell-noise.js';
export * from './crop.js';
export * from './diffraction-patterns.js';
export * from './focus-blur.js';
export * from './generic.js';
export * from './median-blur.js';