David Catuhe 10 лет назад
Родитель
Сommit
ff301804db
2 измененных файлов с 5911 добавлено и 13 удалено
  1. 5876 0
      Preview release/babylon.2.2.d.ts
  2. 35 13
      babylon.2.1.d.ts

Разница между файлами не показана из-за своего большого размера
+ 5876 - 0
Preview release/babylon.2.2.d.ts


+ 35 - 13
babylon.2.1.d.ts

@@ -374,7 +374,7 @@ interface MSStyleCSSProperties {
 }
 interface Navigator {
     getVRDevices: () => any;
-    mozGetVRDevices: (any) => any;
+    mozGetVRDevices: (any: any) => any;
     isCocoonJS: boolean;
 }
 interface Screen {
@@ -1878,6 +1878,20 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
+    class VRCamera extends FreeCamera {
+        private _leftCamera;
+        private _rightCamera;
+        private _offsetOrientation;
+        private _deviceOrientationHandler;
+        constructor(name: string, position: Vector3, scene: Scene, compensateDistorsion?: boolean);
+        _update(): void;
+        _updateCamera(camera: FreeCamera): void;
+        _onOrientationEvent(evt: DeviceOrientationEvent): void;
+        attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
+        detachControl(element: HTMLElement): void;
+    }
+}
+declare module BABYLON {
     class VRDeviceOrientationFreeCamera extends FreeCamera {
         _alpha: number;
         _beta: number;
@@ -3782,7 +3796,7 @@ declare module BABYLON {
         _delayInfo: any;
         private _indexBuffer;
         _boundingInfo: BoundingInfo;
-        _delayLoadingFunction: (any, Geometry) => void;
+        _delayLoadingFunction: (any: any, geometry: Geometry) => void;
         constructor(id: string, scene: Scene, vertexData?: VertexData, updatable?: boolean, mesh?: Mesh);
         getScene(): Scene;
         getEngine(): Engine;
@@ -4012,7 +4026,7 @@ declare module BABYLON {
         private _onBeforeRenderCallbacks;
         private _onAfterRenderCallbacks;
         _delayInfo: any;
-        _delayLoadingFunction: (any, Mesh) => void;
+        _delayLoadingFunction: (any: any, mesh: Mesh) => void;
         _visibleInstances: any;
         private _renderIdForInstances;
         private _batchCache;
@@ -4717,8 +4731,9 @@ declare module BABYLON {
         private _distortion;
         private _highlightsGain;
         private _highlightsThreshold;
-        private _dofDepth;
+        private _dofDistance;
         private _dofAperture;
+        private _dofDarken;
         private _dofPentagon;
         private _blurNoise;
         /**
@@ -4731,11 +4746,12 @@ declare module BABYLON {
          *      distortion: number;                 // from 0 to x (1 for realism)
          *      grain_amount: number;               // from 0 to 1
          *      grain_texture: BABYLON.Texture;     // texture to use for grain effect; if unset, use random B&W noise
-         *      dof_focus_depth: number;            // depth-of-field: focus depth; unset to disable (disabled by default)
+         *      dof_focus_distance: number;         // depth-of-field: focus distance; unset to disable (disabled by default)
          *      dof_aperture: number;               // depth-of-field: focus blur bias (default: 1)
+         *      dof_darken: number;                 // depth-of-field: darken that which is out of focus (from 0 to 1, disabled by default)
          *      dof_pentagon: boolean;              // depth-of-field: makes a pentagon-like "bokeh" effect
-         *      dof_gain: number;                   // depth-of-field: depthOfField gain; unset to disable (disabled by default)
-         *      dof_threshold: number;              // depth-of-field: depthOfField threshold (default: 1)
+         *      dof_gain: number;                   // depth-of-field: highlights gain; unset to disable (disabled by default)
+         *      dof_threshold: number;              // depth-of-field: highlights threshold (default: 1)
          *      blur_noise: boolean;                // add a little bit of noise to the blur (default: true)
          * }
          * Note: if an effect parameter is unset, effect is disabled
@@ -4755,9 +4771,10 @@ declare module BABYLON {
         disableChromaticAberration(): void;
         setEdgeDistortion(amount: number): void;
         disableEdgeDistortion(): void;
-        setFocusDepth(amount: number): void;
+        setFocusDistance(amount: number): void;
         disableDepthOfField(): void;
         setAperture(amount: number): void;
+        setDarkenOutOfFocus(amount: number): void;
         enablePentagonBokeh(): void;
         disablePentagonBokeh(): void;
         enableNoiseBlur(): void;
@@ -4783,10 +4800,10 @@ declare module BABYLON {
 declare module BABYLON {
     class PostProcess {
         name: string;
-        onApply: (Effect) => void;
-        onBeforeRender: (Effect) => void;
+        onApply: (effect: Effect) => void;
+        onBeforeRender: (effect: Effect) => void;
         onSizeChanged: () => void;
-        onActivate: (Camera) => void;
+        onActivate: (camera: Camera) => void;
         width: number;
         height: number;
         renderTargetSamplingMode: number;
@@ -4954,6 +4971,11 @@ declare module BABYLON {
         */
         mesh: Mesh;
         /**
+        * Set to true to use the diffuseColor instead of the diffuseTexture
+        * @type {boolean}
+        */
+        useDiffuseColor: boolean;
+        /**
         * Array containing the excluded meshes not rendered in the internal pass
         */
         excludedMeshes: AbstractMesh[];
@@ -5241,7 +5263,7 @@ declare module BABYLON {
 }
 declare module BABYLON.Internals {
     class AndOrNotEvaluator {
-        static Eval(query: string, evaluateCallback: (val) => boolean): boolean;
+        static Eval(query: string, evaluateCallback: (val: any) => boolean): boolean;
         private static _HandleParenthesisContent(parenthesisContent, evaluateCallback);
         private static _SimplifyNegation(booleanString);
     }
@@ -5344,7 +5366,7 @@ declare module BABYLON {
         private idbFactory;
         static IsUASupportingBlobStorage: boolean;
         static IDBStorageEnabled: boolean;
-        constructor(urlToScene: string, callbackManifestChecked: (boolean) => any);
+        constructor(urlToScene: string, callbackManifestChecked: (checked: boolean) => any);
         static parseURL: (url: string) => string;
         static ReturnFullUrlLocation: (url: string) => string;
         checkManifestFile(): void;