Add gegl:plasma.

This commit is contained in:
Bauke 2022-03-08 19:41:50 +01:00
parent 7c85ea0eea
commit 347109b0a0
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
2 changed files with 33 additions and 0 deletions

View File

@ -4,6 +4,7 @@ export * from './focus-blur.js';
export * from './generic.js'; export * from './generic.js';
export * from './mirrors.js'; export * from './mirrors.js';
export * from './newsprint.js'; export * from './newsprint.js';
export * from './plasma.js';
export * from './simplex-noise.js'; export * from './simplex-noise.js';
export * from './softglow.js'; export * from './softglow.js';
export * from './stereographic-projection.js'; export * from './stereographic-projection.js';

32
source/gegl/plasma.ts Normal file
View File

@ -0,0 +1,32 @@
import {BaseOperation} from './base.js';
export interface PlasmaParameters {
height: number;
seed: number;
turbulence: number;
width: number;
x: number;
y: number;
}
export class Plasma extends BaseOperation<PlasmaParameters> {
public static default: PlasmaParameters = {
height: 768,
seed: 0,
turbulence: 1,
width: 1024,
x: 0,
y: 0,
};
public get default() {
return Plasma.default;
}
public appendCrop = false;
public name = 'gegl:plasma';
constructor(parameters?: Partial<PlasmaParameters>) {
super({...Plasma.default, ...parameters});
}
}