Add gegl:maze.
This commit is contained in:
parent
2d1de9e34b
commit
be6a197419
|
@ -6,6 +6,7 @@ export * from './crop.js';
|
|||
export * from './diffraction-patterns.js';
|
||||
export * from './focus-blur.js';
|
||||
export * from './generic.js';
|
||||
export * from './maze.js';
|
||||
export * from './median-blur.js';
|
||||
export * from './mirrors.js';
|
||||
export * from './mosaic.js';
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
import {BaseOperation} from './base.js';
|
||||
|
||||
export interface MazeParameters {
|
||||
algorithmType: 'depth-first' | 'prim';
|
||||
bgColor: string;
|
||||
fgColor: string;
|
||||
seed: number;
|
||||
tileable: boolean;
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export class Maze extends BaseOperation<MazeParameters> {
|
||||
public static default: MazeParameters = {
|
||||
algorithmType: 'depth-first',
|
||||
bgColor: '#fff',
|
||||
fgColor: '#000',
|
||||
seed: 0,
|
||||
tileable: false,
|
||||
x: 16,
|
||||
y: 16,
|
||||
};
|
||||
|
||||
public get default() {
|
||||
return Maze.default;
|
||||
}
|
||||
|
||||
public appendCrop = false;
|
||||
public name = 'gegl:maze';
|
||||
|
||||
constructor(parameters?: Partial<MazeParameters>) {
|
||||
super({...Maze.default, ...parameters});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue