interlinked/source/gegl/waves.ts

37 lines
730 B
TypeScript
Raw Normal View History

2022-03-10 17:09:25 +00:00
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});
}
}