Changed the file structure for ease of handling from tsd and added several utility classes.

This commit is contained in:
satoru kimura
2014-10-30 12:21:49 +09:00
parent 1a9210fff5
commit 62b76782c8
12 changed files with 134 additions and 16 deletions

View File

@@ -3,21 +3,20 @@
//////////////////////////////////////////////////////////////
/// <reference path="../../stats/stats.d.ts" />
/// <reference path="../examples/Detector.d.ts" />
/// <reference path="../examples/CSS3DRenderer.d.ts" />
/// <reference path="../examples/OrbitControls.d.ts" />
/// <reference path="../examples/TrackballControls.d.ts" />
/// <reference path="../detector.d.ts" />
/// <reference path="../three-css3drenderer.d.ts" />
/// <reference path="../three-orbitcontrols.d.ts" />
/// <reference path="../three-trackballcontrols.d.ts" />
/// <reference path="../three-effectcomposer.d.ts" />
/// <reference path="../three-renderpass.d.ts" />
/// <reference path="../three-shaderpass.d.ts" />
/// <reference path="../three-copyshader.d.ts" />
declare module THREE {
var AWDLoader: any;
var DotScreenShader: any;
var FlyControls: any;
var RenderPass: any;
var EffectComposer: any;
var RGBShiftShader: any;
var RenderPass: any;
var BloomPass: any;
var ShaderPass: any;
var FXAAShader: any;
var CopyShader: any;
var DotScreenShader: Shader;
var RGBShiftShader: Shader;
var FXAAShader: Shader;
}

10
threejs/three-copyshader.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
// Type definitions for CopyShader.js
// Project: https://github.com/mrdoob/three.js/blob/r68/examples/js/shaders/CopyShader.js
// Definitions by: Satoru Kimura <https://github.com/gyohk>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="./three.d.ts" />
declare module THREE {
export var CopyShader: Shader;
}

View File

@@ -6,7 +6,7 @@
// This renderer does not work in IE. Can be found here for more information.
// https://github.com/mrdoob/three.js/issues/4783
/// <reference path="../three.d.ts" />
/// <reference path="./three.d.ts" />
declare module THREE {
class CSS3DObject extends Object3D {

28
threejs/three-effectcomposer.d.ts vendored Normal file
View File

@@ -0,0 +1,28 @@
// Type definitions for EffectComposer.js
// Project: https://github.com/mrdoob/three.js/blob/r68/examples/js/postprocessing/EffectComposer.js
// Definitions by: Satoru Kimura <https://github.com/gyohk>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="./three.d.ts" />
/// <reference path="./three-shaderpass.d.ts" />
/// <reference path="./three-copyshader.d.ts" />
declare module THREE {
export class EffectComposer {
constructor( renderer: WebGLRenderer, renderTarget?: WebGLRenderTarget);
renderTarget1: WebGLRenderTarget;
renderTarget2: WebGLRenderTarget;
writeBuffer: WebGLRenderTarget;
readBuffer: WebGLRenderTarget;
passes: any[];
copyPass: ShaderPass;
swapBuffers(): void;
addPass(pass: any): void;
insertPass(pass: any, index: number): void;
render(delta: number): void;
reset(renderTarget?: WebGLRenderTarget): void;
setSize( width: number, height: number ): void;
}
}

29
threejs/three-maskpass.d.ts vendored Normal file
View File

@@ -0,0 +1,29 @@
// Type definitions for MaskPass.js
// Project: https://github.com/mrdoob/three.js/blob/r68/examples/js/postprocessing/MaskPass.js
// Definitions by: Satoru Kimura <https://github.com/gyohk>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="./three.d.ts" />
declare module THREE {
export class MaskPass {
constructor( scene: Scene, camera: Camera);
scene: Scene;
camera: Camera;
enabled: boolean;
clear: boolean;
needsSwap: boolean;
inverse: boolean;
render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, delta: number): void;
}
export class ClearMaskPass {
constructor();
enabled: boolean;
render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, delta: number): void;
}
}

View File

@@ -3,7 +3,7 @@
// Definitions by: Satoru Kimura <https://github.com/gyohk>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../three.d.ts" />
/// <reference path="./three.d.ts" />
declare module THREE {
class OrbitControls {

27
threejs/three-renderpass.d.ts vendored Normal file
View File

@@ -0,0 +1,27 @@
// Type definitions for RenderPass.js
// Project: https://github.com/mrdoob/three.js/blob/r68/examples/js/postprocessing/RenderPass.js
// Definitions by: Satoru Kimura <https://github.com/gyohk>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="./three.d.ts" />
declare module THREE {
export class RenderPass {
constructor( scene: Scene, camera: Camera, overrideMaterial?: Material, clearColor?: Color, clearAlpha?: number );
constructor( scene: Scene, camera: Camera, overrideMaterial?: Material, clearColor?: string, clearAlpha?: number );
constructor( scene: Scene, camera: Camera, overrideMaterial?: Material, clearColor?: number, clearAlpha?: number );
scene: Scene;
camera: Camera;
overrideMaterial: Material;
clearColor: any; // Color or string or number
clearAlpha: number;
oldClearColor: Color;
oldClearAlpha: number;
enabled: boolean;
clear: boolean;
needsSwap: boolean;
render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, delta: number): void;
}
}

25
threejs/three-shaderpass.d.ts vendored Normal file
View File

@@ -0,0 +1,25 @@
// Type definitions for ShaderPass.js
// Project: https://github.com/mrdoob/three.js/blob/r68/examples/js/postprocessing/ShaderPass.js
// Definitions by: Satoru Kimura <https://github.com/gyohk>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="./three.d.ts" />
declare module THREE {
export class ShaderPass {
constructor( shader: Shader, textureID?: string );
textureID: string;
uniforms: any;
material: ShaderMaterial;
renderToScreen: boolean;
enabled: boolean;
needsSwap: boolean;
clear: boolean;
camera: Camera;
scene: Scene;
quad: Mesh;
render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, delta: number): void;
}
}

View File

@@ -58,4 +58,4 @@ THE SOFTWARE.
/// <reference path="./tests/canvas/canvas_particles_floor.ts" />
// examples test.
/// <reference path="./tests/examples/Detector.ts" />
/// <reference path="./tests/examples/detector.ts" />

View File

@@ -3,7 +3,7 @@
// Definitions by: Satoru Kimura <https://github.com/gyohk>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../three.d.ts" />
/// <reference path="./three.d.ts" />
declare module THREE {
class TrackballControls {