2022-03-07 15:33:44 +00:00
|
|
|
import {BaseOperation} from './base.js';
|
|
|
|
|
|
|
|
export interface SimplexNoiseParameters {
|
|
|
|
iterations: number;
|
|
|
|
scale: number;
|
|
|
|
seed: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export class SimplexNoise extends BaseOperation<SimplexNoiseParameters> {
|
|
|
|
public static default: SimplexNoiseParameters = {
|
|
|
|
iterations: 1,
|
|
|
|
scale: 1,
|
|
|
|
seed: 1,
|
|
|
|
};
|
|
|
|
|
2022-03-07 21:08:28 +00:00
|
|
|
public get default() {
|
|
|
|
return SimplexNoise.default;
|
|
|
|
}
|
|
|
|
|
2022-03-07 15:33:44 +00:00
|
|
|
public appendCrop = true;
|
|
|
|
public name = 'gegl:simplex-noise';
|
|
|
|
|
|
|
|
constructor(parameters?: Partial<SimplexNoiseParameters>) {
|
|
|
|
super({...SimplexNoise.default, ...parameters});
|
|
|
|
}
|
|
|
|
}
|