Add gegl:mirrors.
This commit is contained in:
parent
9a3df37966
commit
5c31352e4e
|
@ -1,5 +1,6 @@
|
|||
export * from './base.js';
|
||||
export * from './crop.js';
|
||||
export * from './generic.js';
|
||||
export * from './mirrors.js';
|
||||
export * from './newsprint.js';
|
||||
export * from './simplex-noise.js';
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
import {BaseOperation} from './base.js';
|
||||
|
||||
export interface MirrorsParameters {
|
||||
clip: boolean;
|
||||
cX: number;
|
||||
cY: number;
|
||||
inputScale: number;
|
||||
mAngle: number;
|
||||
nSegs: number;
|
||||
outputScale: number;
|
||||
oX: number;
|
||||
oY: number;
|
||||
rAngle: number;
|
||||
trimX: number;
|
||||
trimY: number;
|
||||
warp: boolean;
|
||||
}
|
||||
|
||||
export class Mirrors extends BaseOperation<MirrorsParameters> {
|
||||
public static default: MirrorsParameters = {
|
||||
clip: true,
|
||||
cX: 0.5,
|
||||
cY: 0.5,
|
||||
inputScale: 100,
|
||||
mAngle: 0,
|
||||
nSegs: 6,
|
||||
outputScale: 1,
|
||||
oX: 0,
|
||||
oY: 0,
|
||||
rAngle: 0,
|
||||
trimX: 0,
|
||||
trimY: 0,
|
||||
warp: true,
|
||||
};
|
||||
|
||||
public appendCrop = false;
|
||||
public name = 'gegl:mirrors';
|
||||
|
||||
constructor(parameters?: Partial<MirrorsParameters>) {
|
||||
super({...Mirrors.default, ...parameters});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue