Add gegl:plasma.
This commit is contained in:
		
							parent
							
								
									7c85ea0eea
								
							
						
					
					
						commit
						347109b0a0
					
				| 
						 | 
				
			
			@ -4,6 +4,7 @@ export * from './focus-blur.js';
 | 
			
		|||
export * from './generic.js';
 | 
			
		||||
export * from './mirrors.js';
 | 
			
		||||
export * from './newsprint.js';
 | 
			
		||||
export * from './plasma.js';
 | 
			
		||||
export * from './simplex-noise.js';
 | 
			
		||||
export * from './softglow.js';
 | 
			
		||||
export * from './stereographic-projection.js';
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,32 @@
 | 
			
		|||
import {BaseOperation} from './base.js';
 | 
			
		||||
 | 
			
		||||
export interface PlasmaParameters {
 | 
			
		||||
  height: number;
 | 
			
		||||
  seed: number;
 | 
			
		||||
  turbulence: number;
 | 
			
		||||
  width: number;
 | 
			
		||||
  x: number;
 | 
			
		||||
  y: number;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export class Plasma extends BaseOperation<PlasmaParameters> {
 | 
			
		||||
  public static default: PlasmaParameters = {
 | 
			
		||||
    height: 768,
 | 
			
		||||
    seed: 0,
 | 
			
		||||
    turbulence: 1,
 | 
			
		||||
    width: 1024,
 | 
			
		||||
    x: 0,
 | 
			
		||||
    y: 0,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  public get default() {
 | 
			
		||||
    return Plasma.default;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public appendCrop = false;
 | 
			
		||||
  public name = 'gegl:plasma';
 | 
			
		||||
 | 
			
		||||
  constructor(parameters?: Partial<PlasmaParameters>) {
 | 
			
		||||
    super({...Plasma.default, ...parameters});
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue