mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 19:09:18 +08:00
add vreffects definition
This commit is contained in:
0
threejs/tests/examples/effects/vreffect.ts
Normal file
0
threejs/tests/examples/effects/vreffect.ts
Normal file
@@ -59,3 +59,4 @@ THE SOFTWARE.
|
||||
|
||||
// examples test.
|
||||
/// <reference path="./tests/examples/detector.ts" />
|
||||
/// <reference path="./tests/examples/effects/vreffect.ts" />
|
||||
|
||||
31
threejs/three-vreffect.d.ts
vendored
Normal file
31
threejs/three-vreffect.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
// Type definitions for three.js (VREffect.js)
|
||||
// Project: https://github.com/mrdoob/three.js/blob/master/examples/js/effects/VREffect.js
|
||||
// Definitions by: Toshiya Nakakura <https://github.com/nakakura>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="./three.d.ts" />
|
||||
|
||||
declare module THREE {
|
||||
export class VREffect {
|
||||
constructor(renderer: Renderer, callback?: (params: string)=>void);
|
||||
render(scene: Scene, camera: Camera): void;
|
||||
setSize(width: number, height: number): void;
|
||||
setFullScreen(flag: boolean): void;
|
||||
startFullscreen(): void;
|
||||
FovToNDCScaleOffset(fov: VRFov): VREffectOffset;
|
||||
FovPortToProjection(fov: VRFov, rightHanded: boolean, zNear: number, zFar: number): Matrix4;
|
||||
FovToProjection(fov: VRFov, rightHanded: boolean, zNear: number, zFar: number): Matrix4;
|
||||
}
|
||||
|
||||
export interface VRFov{
|
||||
leftTan: number;
|
||||
rightTan: number;
|
||||
upTan: number;
|
||||
downTan: number;
|
||||
}
|
||||
|
||||
export interface VREffectOffset{
|
||||
scale: number;
|
||||
offset: number;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user