Sebastien Vandenberghe преди 7 години
родител
ревизия
02146c4663

+ 0 - 77
dist/preview release/typedocValidationBaseline.json

@@ -19694,83 +19694,6 @@
         }
         }
       }
       }
     },
     },
-    "GeometryBufferRenderer": {
-      "Class": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Constructor": {
-        "new GeometryBufferRenderer": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "scene": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "ratio": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        }
-      },
-      "Property": {
-        "enablePosition": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "isSupported": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "renderList": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "samples": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      },
-      "Method": {
-        "dispose": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "getGBuffer": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "isReady": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "subMesh": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "useInstances": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        }
-      }
-    },
     "GroundGeometry": {
     "GroundGeometry": {
       "Class": {
       "Class": {
         "Comments": {
         "Comments": {

+ 2 - 2
src/Actions/babylon.actionManager.ts

@@ -320,8 +320,8 @@
 
 
         /**
         /**
          * Unregisters an action to this action manager
          * Unregisters an action to this action manager
-         * @param {BABYLON.Action} action - the action to be unregistered
-         * @return {Boolean}
+         * @param action The action to be unregistered
+         * @return whether the action has been unregistered
          */
          */
         public unregisterAction(action: Action): Boolean {
         public unregisterAction(action: Action): Boolean {
             var index = this.actions.indexOf(action);
             var index = this.actions.indexOf(action);

+ 4 - 4
src/Math/babylon.math.ts

@@ -1461,10 +1461,10 @@
 
 
         /**
         /**
          * Get angle between two vectors.
          * Get angle between two vectors.
-         * @param vector0 {BABYLON.Vector3}
-         * @param vector1 {BABYLON.Vector3}
-         * @param normal  {BABYLON.Vector3}  direction of the normal.
-         * @return {number} the angle between vector0 and vector1.
+         * @param vector0 angle between vector0 and vector1
+         * @param vector1 angle between vector0 and vector1
+         * @param normal direction of the normal.
+         * @return the angle between vector0 and vector1.
          */
          */
         public static GetAngleBetweenVectors(vector0: Vector3, vector1: Vector3, normal: Vector3):number {
         public static GetAngleBetweenVectors(vector0: Vector3, vector1: Vector3, normal: Vector3):number {
             var v0:Vector3 = vector0.clone().normalize();
             var v0:Vector3 = vector0.clone().normalize();

+ 48 - 1
src/Rendering/babylon.geometryBufferRenderer.ts

@@ -1,4 +1,7 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * This renderer is helpfull to fill one of the render target with a geometry buffer.
+     */
     export class GeometryBufferRenderer {
     export class GeometryBufferRenderer {
         private _scene: Scene;
         private _scene: Scene;
         private _multiRenderTarget: MultiRenderTarget;
         private _multiRenderTarget: MultiRenderTarget;
@@ -8,32 +11,58 @@ module BABYLON {
         protected _effect: Effect;
         protected _effect: Effect;
         protected _cachedDefines: string;
         protected _cachedDefines: string;
 
 
+        /**
+         * Set the render list (meshes to be rendered) used in the G buffer.
+         */
         public set renderList(meshes: Mesh[]) {
         public set renderList(meshes: Mesh[]) {
             this._multiRenderTarget.renderList = meshes;
             this._multiRenderTarget.renderList = meshes;
         }
         }
 
 
+        /**
+         * Gets wether or not G buffer are supported by the running hardware.
+         * This requires draw buffer supports
+         */
         public get isSupported(): boolean {
         public get isSupported(): boolean {
             return this._multiRenderTarget.isSupported;
             return this._multiRenderTarget.isSupported;
         }
         }
 
 
+        /**
+         * Gets wether or not position are enabled for the G buffer.
+         */
         public get enablePosition(): boolean {
         public get enablePosition(): boolean {
             return this._enablePosition;
             return this._enablePosition;
         }
         }
 
 
+        /**
+         * Sets wether or not position are enabled for the G buffer.
+         */
         public set enablePosition(enable: boolean) {
         public set enablePosition(enable: boolean) {
             this._enablePosition = enable;
             this._enablePosition = enable;
             this.dispose();
             this.dispose();
             this._createRenderTargets();
             this._createRenderTargets();
         }
         }
 
 
+        /**
+         * Gets the scene associated with the buffer.
+         */
         public get scene(): Scene {
         public get scene(): Scene {
             return this._scene;
             return this._scene;
         }
         }
 
 
+        /**
+         * Gets the ratio used by the buffer during its creation.
+         * How big is the buffer related to the main canvas.
+         */
         public get ratio(): number {
         public get ratio(): number {
             return this._ratio
             return this._ratio
         }
         }
 
 
+
+        /**
+         * Creates a new G Buffer for the scene. @see GeometryBufferRenderer
+         * @param scene The scene the buffer belongs to
+         * @param ratio How big is the buffer related to the main canvas.
+         */
         constructor(scene: Scene, ratio: number = 1) {
         constructor(scene: Scene, ratio: number = 1) {
             this._scene = scene;
             this._scene = scene;
             this._ratio = ratio;
             this._ratio = ratio;
@@ -42,6 +71,12 @@ module BABYLON {
             this._createRenderTargets();
             this._createRenderTargets();
         }
         }
 
 
+        /**
+         * Checks wether everything is ready to render a submesh to the G buffer.
+         * @param subMesh the submesh to check readiness for
+         * @param useInstances is the mesh drawn using instance or not
+         * @returns true if ready otherwise false
+         */
         public isReady(subMesh: SubMesh, useInstances: boolean): boolean {
         public isReady(subMesh: SubMesh, useInstances: boolean): boolean {
             var material: any = subMesh.getMaterial();
             var material: any = subMesh.getMaterial();
 
 
@@ -111,19 +146,31 @@ module BABYLON {
             return this._effect.isReady();
             return this._effect.isReady();
         }
         }
 
 
+        /**
+         * Gets the current underlying G Buffer.
+         * @returns the buffer
+         */
         public getGBuffer(): MultiRenderTarget {
         public getGBuffer(): MultiRenderTarget {
             return this._multiRenderTarget;
             return this._multiRenderTarget;
         }
         }
 
 
+        /**
+         * Gets the number of samples used to render the buffer (anti aliasing).
+         */
         public get samples(): number {
         public get samples(): number {
             return this._multiRenderTarget.samples;
             return this._multiRenderTarget.samples;
         }
         }
 
 
+        /**
+         * Sets the number of samples used to render the buffer (anti aliasing).
+         */
         public set samples(value: number) {
         public set samples(value: number) {
             this._multiRenderTarget.samples = value;
             this._multiRenderTarget.samples = value;
         }
         }
 
 
-        // Methods
+        /**
+         * Disposes the renderer and frees up associated resources.
+         */
         public dispose(): void {
         public dispose(): void {
             this.getGBuffer().dispose();
             this.getGBuffer().dispose();
         }
         }

+ 7 - 0
src/babylon.scene.ts

@@ -930,9 +930,16 @@
 
 
         private _depthRenderer: Nullable<DepthRenderer>;
         private _depthRenderer: Nullable<DepthRenderer>;
         private _geometryBufferRenderer: Nullable<GeometryBufferRenderer>;
         private _geometryBufferRenderer: Nullable<GeometryBufferRenderer>;
+
+        /**
+         * Gets the current geometry buffer associated to the scene.
+         */
         public get geometryBufferRenderer(): Nullable<GeometryBufferRenderer> {
         public get geometryBufferRenderer(): Nullable<GeometryBufferRenderer> {
             return this._geometryBufferRenderer;
             return this._geometryBufferRenderer;
         }
         }
+        /**
+         * Sets the current geometry buffer for the scene.
+         */
         public set geometryBufferRenderer(geometryBufferRenderer: Nullable<GeometryBufferRenderer>) {
         public set geometryBufferRenderer(geometryBufferRenderer: Nullable<GeometryBufferRenderer>) {
             if (geometryBufferRenderer && geometryBufferRenderer.isSupported) {
             if (geometryBufferRenderer && geometryBufferRenderer.isSupported) {
                 this._geometryBufferRenderer = geometryBufferRenderer;
                 this._geometryBufferRenderer = geometryBufferRenderer;