Enhancement @types/three Added definition for THREE.FilmPass #14042 (#22981)

* feat(FilmPass): Added Definition for Three.FilmPass

#14042

* fix(THREE.FilmPass): Definition update

fixed grayscale type, changed to boolean

#14042

* chore(THREE.FilmPass): Added name to efinitions By

#14042

* chore(THREE.FilmPass): Definitions added of variables and functions

#14042

* feat(THREE.Pass/THREE.FilmPass): Added Definitions for THREE.Pass and Extend it on THREE.FilmPass

#14042

* chore(THREE.FilmPass): Removed render function declarartion as it extends from Pass

#14042
This commit is contained in:
Apurva Ojas
2018-01-25 01:31:34 +05:30
committed by Andy
parent 038d712743
commit bd5a9a9abe
3 changed files with 35 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
// Type definitions for three.js 0.89
// Project: https://threejs.org
// Definitions by: Kon <http://phyzkit.net/>, Satoru Kimura <https://github.com/gyohk>, Florent Poujol <https://github.com/florentpoujol>, SereznoKot <https://github.com/SereznoKot>, HouChunlei <https://github.com/omni360>, Ivo <https://github.com/ivoisbelongtous>, David Asmuth <https://github.com/piranha771>, Brandon Roberge, Qinsi ZHU <https://github.com/qszhusightp>, Toshiya Nakakura <https://github.com/nakakura>, Poul Kjeldager Sørensen <https://github.com/s093294>, Stefan Profanter <https://github.com/Pro>, Edmund Fokschaner <https://github.com/efokschaner>, Roelof Jooste <https://github.com/PsychoSTS>, Daniel Hritzkiv <https://github.com/dhritzkiv>
// Definitions by: Kon <http://phyzkit.net/>, Satoru Kimura <https://github.com/gyohk>, Florent Poujol <https://github.com/florentpoujol>, SereznoKot <https://github.com/SereznoKot>, HouChunlei <https://github.com/omni360>, Ivo <https://github.com/ivoisbelongtous>, David Asmuth <https://github.com/piranha771>, Brandon Roberge, Qinsi ZHU <https://github.com/qszhusightp>, Toshiya Nakakura <https://github.com/nakakura>, Poul Kjeldager Sørensen <https://github.com/s093294>, Stefan Profanter <https://github.com/Pro>, Edmund Fokschaner <https://github.com/efokschaner>, Roelof Jooste <https://github.com/PsychoSTS>, Daniel Hritzkiv <https://github.com/dhritzkiv>, Apurva Ojas <https://github.com/apurvaojas>
// Definitions: https://github.com//DefinitelyTyped
export * from "./three-core";
@@ -27,6 +27,7 @@ export * from "./three-projector";
export * from "./three-renderpass";
export * from "./three-shaderpass";
export * from "./three-smaapass";
export * from "./three-filmpass";
export * from "./three-trackballcontrols";
export * from "./three-transformcontrols";
export * from "./three-vrcontrols";

View File

@@ -23,3 +23,23 @@ export class EffectComposer {
setSize(width: number, height: number): void;
}
export class Pass{
// if set to true, the pass is processed by the composer
enabled: boolean;
// if set to true, the pass indicates to swap read and write buffer after rendering
needsSwap: boolean;
// if set to true, the pass clears its buffer before rendering
clear: boolean;
// if set to true, the result of the pass is rendered to screen
renderToScreen: boolean;
setSize(width: number, height:number ): void;
render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, delta: number, maskActive?: boolean): void;
}

13
types/three/three-filmpass.d.ts vendored Normal file
View File

@@ -0,0 +1,13 @@
import { Camera, Scene, WebGLRenderTarget, WebGLRenderer, Material, Mesh, IUniform } from "./three-core";
import {Pass} from "./three-effectcomposer";
export class FilmPass extends Pass {
constructor(noiseIntensity: number, scanlinesIntensity: number, scanlinesCount: number, grayscale: boolean);
scene: Scene;
camera: Camera;
uniforms: IUniform;
material: Material;
quad: Mesh;
}