Add gegl:stereographic-projection.

This commit is contained in:
Bauke 2022-03-08 13:35:45 +01:00
parent 811ee754f6
commit fa08d29675
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
2 changed files with 37 additions and 0 deletions

View File

@ -5,3 +5,4 @@ export * from './mirrors.js';
export * from './newsprint.js';
export * from './simplex-noise.js';
export * from './softglow.js';
export * from './stereographic-projection.js';

View File

@ -0,0 +1,36 @@
import {BaseOperation} from './base.js';
export interface StereographicProjectionParameters {
height: number;
inverse: boolean;
pan: number;
samplerType: 'nearest' | 'linear' | 'cubic' | 'nohalo' | 'lohalo';
spin: number;
tilt: number;
width: number;
zoom: number;
}
export class StereographicProjection extends BaseOperation<StereographicProjectionParameters> {
public static default: StereographicProjectionParameters = {
height: -1,
inverse: false,
pan: 0,
samplerType: 'nearest',
spin: 0,
tilt: 90,
width: -1,
zoom: 100,
};
public get default() {
return StereographicProjection.default;
}
public appendCrop = false;
public name = 'gegl:stereographic-projection';
constructor(parameters?: Partial<StereographicProjectionParameters>) {
super({...StereographicProjection.default, ...parameters});
}
}