Add gegl:waves.
This commit is contained in:
parent
c9f87d365c
commit
614ced0049
|
@ -10,3 +10,4 @@ export * from './plasma.js';
|
|||
export * from './simplex-noise.js';
|
||||
export * from './softglow.js';
|
||||
export * from './stereographic-projection.js';
|
||||
export * from './waves.js';
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
import {BaseOperation} from './base.js';
|
||||
|
||||
export interface WavesParameters {
|
||||
amplitude: number;
|
||||
aspect: number;
|
||||
clamp: boolean;
|
||||
period: number;
|
||||
phi: number;
|
||||
samplerType: 'nearest' | 'linear' | 'cubic' | 'nohalo' | 'lohalo';
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export class Waves extends BaseOperation<WavesParameters> {
|
||||
public static default: WavesParameters = {
|
||||
amplitude: 25,
|
||||
aspect: 1,
|
||||
clamp: false,
|
||||
period: 100,
|
||||
phi: 0,
|
||||
samplerType: 'cubic',
|
||||
x: 0.5,
|
||||
y: 0.5,
|
||||
};
|
||||
|
||||
public get default() {
|
||||
return Waves.default;
|
||||
}
|
||||
|
||||
public appendCrop = false;
|
||||
public name = 'gegl:waves';
|
||||
|
||||
constructor(parameters?: Partial<WavesParameters>) {
|
||||
super({...Waves.default, ...parameters});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue