浏览代码

Merge pull request #5246 from TrevorDev/remainingDocs

remaining docs
sebavan 7 年之前
父节点
当前提交
47e8c54f68

文件差异内容过多而无法显示
+ 3 - 1444
dist/preview release/typedocValidationBaseline.json


+ 6 - 0
src/Animations/babylon.animationGroup.ts

@@ -3,7 +3,13 @@ module BABYLON {
      * This class defines the direct association between an animation and a target
      */
     export class TargetedAnimation {
+        /**
+         * Animation to perform
+         */
         public animation: Animation;
+        /**
+         * Target to animate
+         */
         public target: any;
     }
 

+ 1 - 0
src/Cameras/babylon.cameraInputsManager.ts

@@ -1,5 +1,6 @@
 module BABYLON {
     /**
+     * @ignore
      * This is a list of all the different input types that are available in the application.
      * Fo instance: ArcRotateCameraGamepadInput...
      */

+ 1 - 0
src/Cameras/babylon.freeCameraInputsManager.ts

@@ -24,6 +24,7 @@ module BABYLON {
 
         /**
          * Add mouse input support to the input manager.
+         * @param touchEnabled if the FreeCameraMouseInput should support touch (default: true)
          * @returns the current input manager
          */
         addMouse(touchEnabled = true): FreeCameraInputsManager {

+ 96 - 1
src/Culling/babylon.ray.ts

@@ -1,4 +1,7 @@
 module BABYLON {
+    /**
+     * Class representing a ray with position and direction
+     */
     export class Ray {
         private _edge1: Vector3;
         private _edge2: Vector3;
@@ -8,10 +11,28 @@
 
         private _tmpRay: Ray;
 
-        constructor(public origin: Vector3, public direction: Vector3, public length: number = Number.MAX_VALUE) {
+        /**
+         * Creates a new ray
+         * @param origin origin point
+         * @param direction direction
+         * @param length length of the ray
+         */
+        constructor(
+            /** origin point */
+            public origin: Vector3, 
+            /** direction */
+            public direction: Vector3, 
+            /** length of the ray */
+            public length: number = Number.MAX_VALUE) {
         }
 
         // Methods
+        /**
+         * Checks if the ray intersects a box
+         * @param minimum bound of the box
+         * @param maximum bound of the box
+         * @returns if the box was hit
+         */
         public intersectsBoxMinMax(minimum: Vector3, maximum: Vector3): boolean {
             var d = 0.0;
             var maxValue = Number.MAX_VALUE;
@@ -104,10 +125,20 @@
             return true;
         }
 
+        /**
+         * Checks if the ray intersects a box
+         * @param box the bounding box to check
+         * @returns if the box was hit
+         */
         public intersectsBox(box: BoundingBox): boolean {
             return this.intersectsBoxMinMax(box.minimum, box.maximum);
         }
 
+        /**
+         * If the ray hits a sphere
+         * @param sphere the bounding sphere to check
+         * @returns true if it hits the sphere
+         */
         public intersectsSphere(sphere: BoundingSphere): boolean {
             var x = sphere.center.x - this.origin.x;
             var y = sphere.center.y - this.origin.y;
@@ -129,6 +160,13 @@
             return temp <= rr;
         }
 
+        /**
+         * If the ray hits a triange
+         * @param vertex0 triangle vertex
+         * @param vertex1 triangle vertex
+         * @param vertex2 triangle vertex
+         * @returns intersection information if hit
+         */
         public intersectsTriangle(vertex0: Vector3, vertex1: Vector3, vertex2: Vector3): Nullable<IntersectionInfo> {
             if (!this._edge1) {
                 this._edge1 = Vector3.Zero();
@@ -174,6 +212,11 @@
             return new IntersectionInfo(bu, bv, distance);
         }
 
+        /**
+         * Checks if ray intersects a plane
+         * @param plane the plane to check
+         * @returns the distance away it was hit
+         */
         public intersectsPlane(plane: Plane): Nullable<number> {
             var distance: number;
             var result1 = Vector3.Dot(plane.normal, this.direction);
@@ -195,6 +238,12 @@
             }
         }
 
+        /**
+         * Checks if ray intersects a mesh
+         * @param mesh the mesh to check
+         * @param fastCheck if only the bounding box should checked
+         * @returns picking info of the intersecton
+         */
         public intersectsMesh(mesh:AbstractMesh, fastCheck?: boolean): PickingInfo {
 
             var tm = Tmp.Matrix[0];
@@ -211,6 +260,13 @@
 
         }
 
+        /**
+         * Checks if ray intersects a mesh
+         * @param meshes the meshes to check
+         * @param fastCheck if only the bounding box should checked
+         * @param results array to store result in
+         * @returns Array of picking infos
+         */
         public intersectsMeshes(meshes:Array<AbstractMesh>, fastCheck?: boolean, results?:Array<PickingInfo>): Array<PickingInfo> {
 
             if(results){
@@ -331,6 +387,17 @@
             return -1;
         }
 
+        /**
+         * Update the ray from viewport position
+         * @param x position
+         * @param y y position
+         * @param viewportWidth viewport width 
+         * @param viewportHeight viewport height
+         * @param world world matrix
+         * @param view view matrix
+         * @param projection projection matrix
+         * @returns this ray updated
+         */
         public update(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray {
             Vector3.UnprojectFloatsToRef(x, y, 0, viewportWidth, viewportHeight, world, view, projection, this.origin);
             Vector3.UnprojectFloatsToRef(x, y, 1, viewportWidth, viewportHeight, world, view, projection, Tmp.Vector3[0]);
@@ -341,10 +408,25 @@
         }
 
         // Statics
+        /**
+         * Creates a ray with origin and direction of 0,0,0
+         * @returns the new ray
+         */
         public static Zero(): Ray {
             return new Ray(Vector3.Zero(), Vector3.Zero());
         }
 
+        /**
+         * Creates a new ray from screen space and viewport
+         * @param x position
+         * @param y y position
+         * @param viewportWidth viewport width 
+         * @param viewportHeight viewport height
+         * @param world world matrix
+         * @param view view matrix
+         * @param projection projection matrix
+         * @returns new ray
+         */
         public static CreateNew(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray {
             let result = Ray.Zero();
 
@@ -358,6 +440,7 @@
         * @param origin The origin point
         * @param end The end point
         * @param world a matrix to transform the ray to. Default is the identity matrix.
+        * @returns the new ray
         */
         public static CreateNewFromTo(origin: Vector3, end: Vector3, world: Matrix = Matrix.Identity()): Ray {
             var direction = end.subtract(origin);
@@ -367,6 +450,12 @@
             return Ray.Transform(new Ray(origin, direction, length), world);
         }
 
+        /**
+         * Transforms a ray by a matrix
+         * @param ray ray to transform
+         * @param matrix matrix to apply
+         * @returns the resulting new ray
+         */
         public static Transform(ray: Ray, matrix: Matrix): Ray {
             var result = new Ray(new Vector3(0,0,0), new Vector3(0,0,0));
             Ray.TransformToRef(ray, matrix, result);
@@ -374,6 +463,12 @@
             return result;
         }
 
+        /**
+         * Transforms a ray by a matrix
+         * @param ray ray to transform
+         * @param matrix matrix to apply
+         * @param result ray to store result in
+         */
         public static TransformToRef(ray: Ray, matrix: Matrix, result:Ray): void {
             Vector3.TransformCoordinatesToRef(ray.origin, matrix, result.origin);
             Vector3.TransformNormalToRef(ray.direction, matrix, result.direction);

+ 29 - 0
src/Engine/babylon.nullEngine.ts

@@ -1,12 +1,33 @@
 module BABYLON {
 
+    /**
+     * Options to create the null engine
+     */
     export class NullEngineOptions {
+        /**
+         * Render width (Default: 512)
+         */
         public renderWidth = 512;
+        /**
+         * Render height (Default: 256)
+         */
         public renderHeight = 256;
 
+        /**
+         * Texture size (Default: 512)
+         */
         public textureSize = 512;
 
+        /**
+         * If delta time between frames should be constant
+         * @see https://doc.babylonjs.com/babylon101/animations#deterministic-lockstep
+         */
         public deterministicLockstep = false;
+
+        /**
+         * Maximum about of steps between frames (Default: 4)
+         * @see https://doc.babylonjs.com/babylon101/animations#deterministic-lockstep
+         */
         public lockstepMaxSteps = 4;
     }
 
@@ -17,14 +38,22 @@
     export class NullEngine extends Engine {
         private _options: NullEngineOptions;
 
+        /**
+         * @see https://doc.babylonjs.com/babylon101/animations#deterministic-lockstep
+         */
         public isDeterministicLockStep(): boolean {
             return this._options.deterministicLockstep;
         }
 
+        /** @see https://doc.babylonjs.com/babylon101/animations#deterministic-lockstep */
         public getLockstepMaxSteps(): number {
             return this._options.lockstepMaxSteps;
         }
 
+        /**
+         * Sets hardware scaling, used to save performance if needed
+         * @see https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
+         */
         public getHardwareScalingLevel(): number {
             return 1.0;
         }

+ 4 - 0
src/Gamepad/babylon.gamepadSceneComponent.ts

@@ -31,6 +31,10 @@ module BABYLON {
      * Interface representing a free camera inputs manager
      */
     export interface FreeCameraInputsManager {
+        /**
+         * Adds gamepad input support to the FreeCameraInputsManager.
+         * @returns the FreeCameraInputsManager
+         */
         addGamepad(): FreeCameraInputsManager;
     }
     

+ 79 - 6
src/Math/babylon.math.scalar.ts

@@ -1,5 +1,8 @@
 module BABYLON {
 
+    /**
+     * Scalar computation library
+     */
     export class Scalar {
 
         /**
@@ -9,6 +12,10 @@
 
         /**
          * Boolean : true if the absolute difference between a and b is lower than epsilon (default = 1.401298E-45)
+         * @param a number
+         * @param b number
+         * @param epsilon (default = 1.401298E-45)
+         * @returns true if the absolute difference between a and b is lower than epsilon (default = 1.401298E-45)
          */
         public static WithinEpsilon(a: number, b: number, epsilon: number = 1.401298E-45): boolean {
             var num = a - b;
@@ -17,6 +24,8 @@
 
         /**
          * Returns a string : the upper case translation of the number i to hexadecimal.  
+         * @param i number
+         * @returns the upper case translation of the number i to hexadecimal.  
          */
         public static ToHex(i: number): string {
             var str = i.toString(16);
@@ -30,7 +39,8 @@
 
         /**
          * Returns -1 if value is negative and +1 is value is positive.  
-         * Returns the value itself if it's equal to zero.  
+         * @param value the value
+         * @returns the value itself if it's equal to zero.  
          */
         public static Sign(value: number): number {
             value = +value; // convert to a number
@@ -45,13 +55,19 @@
          * Returns the value itself if it's between min and max.  
          * Returns min if the value is lower than min.
          * Returns max if the value is greater than max.  
+         * @param value the value to clmap
+         * @param min the min value to clamp to (default: 0)
+         * @param max the max value to clamp to (default: 1)
+         * @returns the clamped value
          */
         public static Clamp(value: number, min = 0, max = 1): number {
             return Math.min(max, Math.max(min, value));
         }
 
         /**
-         * Returns the log2 of value.
+         * the log2 of value.
+         * @param value the value to compute log2 of
+         * @returns the log2 of value.
          */
         public static Log2(value: number): number {
             return Math.log(value) * Math.LOG2E;
@@ -64,13 +80,20 @@
         * For example, using 3.0 for t and 2.5 for length, the result would be 0.5. 
         * With t = 5 and length = 2.5, the result would be 0.0. 
         * Note, however, that the behaviour is not defined for negative numbers as it is for the modulo operator
+        * @param value the value
+        * @param length the length
+        * @returns the looped value
         */
         public static Repeat(value: number, length: number): number {
             return value - Math.floor(value / length) * length;
         }
 
-        /**
+       /**
         * Normalize the value between 0.0 and 1.0 using min and max values
+        * @param value value to normalize
+        * @param min max to normalize between
+        * @param max min to normalize between
+        * @returns the normalized value
         */
         public static Normalize(value: number, min: number, max: number): number {
             return (value - min) / (max - min);
@@ -78,6 +101,10 @@
 
         /**
         * Denormalize the value from 0.0 and 1.0 using min and max values
+        * @param normalized value to denormalize
+        * @param min max to denormalize between
+        * @param max min to denormalize between
+        * @returns the denormalized value
         */
         public static Denormalize(normalized: number, min: number, max: number): number {
             return (normalized * (max - min) + min);
@@ -85,6 +112,9 @@
 
         /**
         * Calculates the shortest difference between two given angles given in degrees.
+        * @param current current angle in degrees
+        * @param target target angle in degrees
+        * @returns the delta
         */
         public static DeltaAngle(current: number, target: number): number {
             var num: number = Scalar.Repeat(target - current, 360.0);
@@ -96,8 +126,9 @@
 
         /**
         * PingPongs the value t, so that it is never larger than length and never smaller than 0.
-        * 
-        * The returned value will move back and forth between 0 and length
+        * @param tx value
+        * @param length length
+        * @returns The returned value will move back and forth between 0 and length
         */
         public static PingPong(tx: number, length: number): number {
             var t: number = Scalar.Repeat(tx, length * 2.0);
@@ -109,6 +140,10 @@
         *
         * This function interpolates between min and max in a similar way to Lerp. However, the interpolation will gradually speed up
         * from the start and slow down toward the end. This is useful for creating natural-looking animation, fading and other transitions.
+        * @param from from
+        * @param to to
+        * @param tx value
+        * @returns the smooth stepped value
         */
         public static SmoothStep(from: number, to: number, tx: number): number {
             var t: number = Scalar.Clamp(tx);
@@ -121,6 +156,10 @@
         * 
         * This is essentially the same as Mathf.Lerp but instead the function will ensure that the speed never exceeds maxDelta.
         * Negative values of maxDelta pushes the value away from target.
+        * @param current current value
+        * @param target target value
+        * @param maxDelta max distance to move
+        * @returns resulting value
         */
         public static MoveTowards(current: number, target: number, maxDelta: number): number {
             var result: number = 0;
@@ -137,6 +176,10 @@
         *
         * Variables current and target are assumed to be in degrees. For optimization reasons, negative values of maxDelta
         *  are not supported and may cause oscillation. To push current away from a target angle, add 180 to that angle instead.
+        * @param current current value
+        * @param target target value
+        * @param maxDelta max distance to move
+        * @returns resulting angle
         */
         public static MoveTowardsAngle(current: number, target: number, maxDelta: number): number {
             var num: number = Scalar.DeltaAngle(current, target);
@@ -150,8 +193,12 @@
             return result;
         }
 
-     /**
+        /**
          * Creates a new scalar with values linearly interpolated of "amount" between the start scalar and the end scalar.
+         * @param start start value
+         * @param end target value
+         * @param amount amount to lerp between
+         * @returns the lerped value
          */
         public static Lerp(start: number, end: number, amount: number): number {
             return start + ((end - start) * amount);
@@ -160,6 +207,10 @@
         /**
         * Same as Lerp but makes sure the values interpolate correctly when they wrap around 360 degrees.
         * The parameter t is clamped to the range [0, 1]. Variables a and b are assumed to be in degrees.
+        * @param start start value
+        * @param end target value
+        * @param amount amount to lerp between
+        * @returns the lerped value
         */
         public static LerpAngle(start: number, end: number, amount: number): number {
             var num: number = Scalar.Repeat(end - start, 360.0);
@@ -171,6 +222,10 @@
 
         /**
         * Calculates the linear parameter t that produces the interpolant value within the range [a, b].
+        * @param a start value
+        * @param b target value
+        * @param value value between a and b
+        * @returns the inverseLerp value
         */
         public static InverseLerp(a: number, b: number, value: number): number {
             var result: number = 0;
@@ -184,6 +239,13 @@
 
         /**
          * Returns a new scalar located for "amount" (float) on the Hermite spline defined by the scalars "value1", "value3", "tangent1", "tangent2".
+         * @see http://mathworld.wolfram.com/HermitePolynomial.html
+         * @param value1 spline value
+         * @param tangent1 spline value
+         * @param value2 spline value
+         * @param tangent2 spline value
+         * @param amount input value
+         * @returns hermite result
          */
         public static Hermite(value1: number, tangent1: number, value2: number, tangent2: number, amount: number): number {
             var squared = amount * amount;
@@ -198,6 +260,9 @@
 
         /**
         * Returns a random float number between and min and max values
+        * @param min min value of random
+        * @param max max value of random
+        * @returns random value
         */
         public static RandomRange(min: number, max: number): number {
             if (min === max) return min;
@@ -209,6 +274,10 @@
         * 
         * RangeToPercent(40,20,60) will return 0.5 (50%) 
         * RangeToPercent(34,0,100) will return 0.34 (34%)
+        * @param number to convert to percentage
+        * @param min min range
+        * @param max max range
+        * @returns the percentage
         */
         public static RangeToPercent(number: number, min: number, max: number): number {
             return ((number - min) / (max - min));
@@ -218,6 +287,10 @@
         * This function returns number that corresponds to the percentage in a given range. 
         * 
         * PercentToRange(0.34,0,100) will return 34.
+        * @param percent to convert to number
+        * @param min min range
+        * @param max max range
+        * @returns the number
         */
         public static PercentToRange(percent: number, min: number, max: number): number {
             return ((max - min) * percent + min);

+ 44 - 4
src/Mesh/babylon.groundMesh.ts

@@ -1,5 +1,9 @@
 module BABYLON {
+    /**
+     * Mesh representing the gorund
+     */
     export class GroundMesh extends Mesh {
+        /** If octree should be generated */
         public generateOctree = false;
 
         private _heightQuads: { slope: Vector2; facet1: Vector4; facet2: Vector4 }[];
@@ -25,22 +29,41 @@
             super(name, scene);
         }
 
+        /**
+         * "GroundMesh"
+         * @returns "GroundMesh"
+         */
         public getClassName(): string {
             return "GroundMesh";
         }
 
+        /**
+         * The minimum of x and y subdivisions
+         */
         public get subdivisions(): number {
             return Math.min(this._subdivisionsX, this._subdivisionsY);
         }
 
+        /**
+         * X subdivisions
+         */
         public get subdivisionsX(): number {
             return this._subdivisionsX;
         }
 
+        /**
+         * Y subdivisions
+         */
         public get subdivisionsY(): number {
             return this._subdivisionsY;
         }
 
+        /**
+         * This function will update an octree to help to select the right submeshes for rendering, picking and collision computations.  
+         * Please note that you must have a decent number of submeshes to get performance improvements when using an octree
+         * @param chunksCount the number of subdivisions for x and y
+         * @param octreeBlocksSize (Default: 32)
+         */
         public optimize(chunksCount: number, octreeBlocksSize = 32): void {
             this._subdivisionsX = chunksCount;
             this._subdivisionsY = chunksCount;
@@ -56,7 +79,9 @@
         /**
          * Returns a height (y) value in the Worl system :
          * the ground altitude at the coordinates (x, z) expressed in the World system.
-         * Returns the ground y position if (x, z) are outside the ground surface.
+         * @param x x coordinate
+         * @param z z coordinate
+         * @returns the ground y position if (x, z) are outside the ground surface.
          */
         public getHeightAtCoordinates(x: number, z: number): number {
             var world = this.getWorldMatrix();
@@ -83,7 +108,9 @@
         /**
          * Returns a normalized vector (Vector3) orthogonal to the ground
          * at the ground coordinates (x, z) expressed in the World system.
-         * Returns Vector3(0.0, 1.0, 0.0) if (x, z) are outside the ground surface.
+         * @param x x coordinate
+         * @param z z coordinate
+         * @returns Vector3(0.0, 1.0, 0.0) if (x, z) are outside the ground surface.
          */
         public getNormalAtCoordinates(x: number, z: number): Vector3 {
             var normal = new Vector3(0.0, 1.0, 0.0);
@@ -95,7 +122,10 @@
          * Updates the Vector3 passed a reference with a normalized vector orthogonal to the ground
          * at the ground coordinates (x, z) expressed in the World system.
          * Doesn't uptade the reference Vector3 if (x, z) are outside the ground surface.  
-         * Returns the GroundMesh.  
+         * @param x x coordinate
+         * @param z z coordinate
+         * @param ref vector to store the result
+         * @returns the GroundMesh.  
          */
         public getNormalAtCoordinatesToRef(x: number, z: number, ref: Vector3): GroundMesh {
             var world = this.getWorldMatrix();
@@ -121,7 +151,7 @@
         * Force the heights to be recomputed for getHeightAtCoordinates() or getNormalAtCoordinates()
         * if the ground has been updated.
         * This can be used in the render loop.  
-        * Returns the GroundMesh.  
+        * @returns the GroundMesh.  
         */
         public updateCoordinateHeights(): GroundMesh {
             if (!this._heightQuads || this._heightQuads.length == 0) {
@@ -243,6 +273,10 @@
             return this;
         }
 
+        /**
+         * Serializes this ground mesh
+         * @param serializationObject object to write serialization to
+         */
         public serialize(serializationObject: any): void {
             super.serialize(serializationObject);
             serializationObject.subdivisionsX = this._subdivisionsX;
@@ -258,6 +292,12 @@
             serializationObject.height = this._height;
         }
 
+        /**
+         * Parses a serialized ground mesh
+         * @param parsedMesh the serialized mesh
+         * @param scene the scene to create the ground mesh in
+         * @returns the created ground mesh
+         */
         public static Parse(parsedMesh: any, scene: Scene): GroundMesh {
             var result = new GroundMesh(parsedMesh.name, scene);
 

+ 23 - 2
src/Mesh/babylon.instancedMesh.ts

@@ -38,22 +38,37 @@
         }
 
         // Methods      
+        /**
+         * If the source mesh receives shadows
+         */
         public get receiveShadows(): boolean {
             return this._sourceMesh.receiveShadows;
         }
 
+        /**
+         * The material of the source mesh
+         */
         public get material(): Nullable<Material> {
             return this._sourceMesh.material;
         }
 
+        /**
+         * Visibility of the source mesh
+         */
         public get visibility(): number {
             return this._sourceMesh.visibility;
         }
 
+        /**
+         * Skeleton of the source mesh
+         */
         public get skeleton(): Nullable<Skeleton> {
             return this._sourceMesh.skeleton;
         }
 
+        /**
+         * Rendering ground id of the source mesh
+         */
         public get renderingGroupId(): number {
             return this._sourceMesh.renderingGroupId;
         }
@@ -74,6 +89,9 @@
             return this._sourceMesh.getTotalVertices();
         }
 
+        /**
+         * The source mesh of the instance
+         */
         public get sourceMesh(): Mesh {
             return this._sourceMesh;
         }
@@ -88,7 +106,10 @@
         }
 
         /**
-         * Returns a float array or a Float32Array of the requested kind of data : positons, normals, uvs, etc.  
+         * Returns an array of integers or a typed array (Int32Array, Uint32Array, Uint16Array) populated with the mesh indices.  
+         * @param kind kind of verticies to retreive (eg. positons, normals, uvs, etc.)
+         * @param copyWhenShared If true (default false) and and if the mesh geometry is shared among some other meshes, the returned array is a copy of the internal one.
+         * @returns a float array or a Float32Array of the requested kind of data : positons, normals, uvs, etc.  
          */
         public getVerticesData(kind: string, copyWhenShared?: boolean): Nullable<FloatArray> {
             return this._sourceMesh.getVerticesData(kind, copyWhenShared);
@@ -191,7 +212,7 @@
 
         /**
          * Sets a new updated BoundingInfo to the mesh.  
-         * Returns the mesh.  
+         * @returns the mesh.  
          */
         public refreshBoundingInfo(): InstancedMesh {
             var meshBB = this._sourceMesh.getBoundingInfo();

+ 29 - 2
src/Mesh/babylon.linesMesh.ts

@@ -1,6 +1,16 @@
 module BABYLON {
+    /**
+     * Line mesh
+     * @see https://doc.babylonjs.com/babylon101/parametric_shapes
+     */
     export class LinesMesh extends Mesh {
+        /**
+         * Color of the line (Default: White)
+         */
         public color = new Color3(1, 1, 1);
+        /**
+         * Alpha of the line (Default: 1)
+         */
         public alpha = 1;
 
         /**
@@ -16,7 +26,6 @@
         /**
          * The intersection Threshold is the margin applied when intersection a segment of the LinesMesh with a Ray.
          * This margin is expressed in world space coordinates, so its value may vary.
-         * @param value the new threshold to apply
          */
         public set intersectionThreshold(value: number) {
             if (this._intersectionThreshold === value) {
@@ -32,7 +41,21 @@
         private _intersectionThreshold: number;
         private _colorShader: ShaderMaterial;
 
-        constructor(name: string, scene: Nullable<Scene> = null, parent: Nullable<Node> = null, source?: LinesMesh, doNotCloneChildren?: boolean, public useVertexColor?: boolean, public useVertexAlpha?: boolean) {
+        constructor(
+            name: string, 
+            scene: Nullable<Scene> = null, 
+            parent: Nullable<Node> = null, 
+            source?: LinesMesh, 
+            doNotCloneChildren?: boolean, 
+            /**
+             * If vertex color should be applied to the mesh
+             */
+            public useVertexColor?: boolean, 
+            /**
+             * If vertex alpha should be applied to the mesh
+             */
+            public useVertexAlpha?: boolean
+        ) {
             super(name, scene, parent, source, doNotCloneChildren);
 
             if (source) {
@@ -123,6 +146,10 @@
             return this;
         }
 
+        /**
+         * Disposes of the line mesh
+         * @param doNotRecurse If children should be disposed
+         */
         public dispose(doNotRecurse?: boolean): void {
             this._colorShader.dispose();
 

+ 75 - 4
src/Mesh/babylon.polygonMesh.ts

@@ -1,11 +1,20 @@
 module BABYLON {
     declare var earcut: any;
+    /**
+     * Vector2 wth index property
+     */
     class IndexedVector2 extends Vector2 {
-        constructor(original: Vector2, public index: number) {
+        constructor(
+            original: Vector2,
+            /** Index of the vector2 */
+            public index: number) {
             super(original.x, original.y);
         }
     }
 
+    /**
+     * Defines points to create a polygon
+     */
     class PolygonPoints {
         elements = new Array<IndexedVector2>();
 
@@ -56,7 +65,19 @@ module BABYLON {
         }
     }
 
+    /**
+     * Polygon
+     * @see https://doc.babylonjs.com/how_to/parametric_shapes#non-regular-polygon
+     */
     export class Polygon {
+        /**
+         * Creates a rectangle
+         * @param xmin bottom X coord
+         * @param ymin bottom Y coord
+         * @param xmax top X coord
+         * @param ymax top Y coord
+         * @returns points that make the resulting rectation
+         */
         static Rectangle(xmin: number, ymin: number, xmax: number, ymax: number): Vector2[] {
             return [
                 new Vector2(xmin, ymin),
@@ -66,6 +87,14 @@ module BABYLON {
             ];
         }
 
+        /**
+         * Creates a circle
+         * @param radius radius of circle
+         * @param cx scale in x
+         * @param cy scale in y
+         * @param numberOfSides number of sides that make up the circle 
+         * @returns points that make the resulting circle
+         */
         static Circle(radius: number, cx: number = 0, cy: number = 0, numberOfSides: number = 32): Vector2[] {
             var result = new Array<Vector2>();
 
@@ -83,6 +112,11 @@ module BABYLON {
             return result;
         }
 
+        /**
+         * Creates a polygon from input string
+         * @param input Input polygon data
+         * @returns the parsed points
+         */
         static Parse(input: string): Vector2[] {
             var floats = input.split(/[^-+eE\.\d]+/).map(parseFloat).filter(val => (!isNaN(val)));
             var i: number, result = [];
@@ -92,11 +126,21 @@ module BABYLON {
             return result;
         }
 
+        /**
+         * Starts building a polygon from x and y coordinates
+         * @param x x coordinate
+         * @param y y coordinate
+         * @returns the started path2
+         */
         static StartingAt(x: number, y: number): Path2 {
             return Path2.StartingAt(x, y);
         }
     }
 
+    /**
+     * Builds a polygon
+     * @see https://doc.babylonjs.com/how_to/polygonmeshbuilder
+     */
     export class PolygonMeshBuilder {
 
         private _points = new PolygonPoints();
@@ -115,9 +159,14 @@ module BABYLON {
             }
         }
 
-        constructor(name: string, contours: Path2, scene: Scene)
-        constructor(name: string, contours: Vector2[], scene: Scene)
-        constructor(name: string, contours: any, scene: Scene) {
+
+        /**
+         * Creates a PolygonMeshBuilder
+         * @param name name of the builder
+         * @param contours Path of the polygon
+         * @param scene scene to add to
+         */
+        constructor(name: string, contours: Path2 | Vector2[] | any, scene: Scene) {
             this._name = name;
             this._scene = scene;
 
@@ -138,6 +187,11 @@ module BABYLON {
             }
         }
 
+        /**
+         * Adds a whole within the polygon
+         * @param hole Array of points defining the hole
+         * @returns this
+         */
         addHole(hole: Vector2[]): PolygonMeshBuilder {
             this._points.add(hole);
             var holepoints = new PolygonPoints();
@@ -150,6 +204,12 @@ module BABYLON {
             return this;
         }
 
+        /**
+         * Creates the polygon
+         * @param updatable If the mesh should be updatable
+         * @param depth The depth of the mesh created
+         * @returns the created mesh
+         */
         build(updatable: boolean = false, depth: number = 0): Mesh {
             var result = new Mesh(this._name, this._scene);
 
@@ -208,6 +268,17 @@ module BABYLON {
             return result;
         }
 
+        /**
+         * Adds a side to the polygon
+         * @param positions points that make the polygon
+         * @param normals normals of the polygon
+         * @param uvs uvs of the polygon
+         * @param indices indices of the polygon 
+         * @param bounds bounds of the polygon 
+         * @param points points of the polygon 
+         * @param depth depth of the polygon 
+         * @param flip flip of the polygon 
+         */
         private addSide(positions: any[], normals: any[], uvs: any[], indices: any[], bounds: any, points: PolygonPoints, depth: number, flip: boolean) {
             var StartIndex: number = positions.length / 3;
             var ulength: number = 0;

+ 81 - 9
src/PostProcess/RenderPipeline/Pipelines/babylon.lensRenderingPipeline.ts

@@ -1,10 +1,13 @@
-// BABYLON.JS Chromatic Aberration GLSL Shader
-// Author: Olivier Guyot
-// Separates very slightly R, G and B colors on the edges of the screen
-// Inspired by Francois Tarlier & Martins Upitis
+
 
 
 module BABYLON {
+    /**
+     * BABYLON.JS Chromatic Aberration GLSL Shader
+     * Author: Olivier Guyot
+     * Separates very slightly R, G and B colors on the edges of the screen
+     * Inspired by Francois Tarlier & Martins Upitis
+     */
     export class LensRenderingPipeline extends PostProcessRenderPipeline {
 
         // Lens effects can be of the following:
@@ -20,14 +23,17 @@ module BABYLON {
         // - grain texture
 
         /**
-        * The chromatic aberration PostProcess id in the pipeline
-        */
+         * @ignore
+         * The chromatic aberration PostProcess id in the pipeline
+         */
         public LensChromaticAberrationEffect: string = "LensChromaticAberrationEffect";
         /**
-        * The highlights enhancing PostProcess id in the pipeline
-        */
+         * @ignore
+         * The highlights enhancing PostProcess id in the pipeline
+         */
         public HighlightsEnhancingEffect: string = "HighlightsEnhancingEffect";
         /**
+         * @ignore
         * The depth-of-field PostProcess id in the pipeline
         */
         public LensDepthOfFieldEffect: string = "LensDepthOfFieldEffect";
@@ -124,42 +130,108 @@ module BABYLON {
         }
 
         // public methods (self explanatory)
-
+        /**
+         * Sets the amount of blur at the edges
+         * @param amount blur amount
+         */
         public setEdgeBlur(amount: number) { this._edgeBlur = amount; }
+        /**
+         * Sets edge blur to 0
+         */
         public disableEdgeBlur() { this._edgeBlur = 0; }
+        /**
+         * Sets the amout of grain
+         * @param amount Amount of grain
+         */
         public setGrainAmount(amount: number) { this._grainAmount = amount; }
+        /**
+         * Set grain amount to 0
+         */
         public disableGrain() { this._grainAmount = 0; }
+        /**
+         * Sets the chromatic aberration amount
+         * @param amount amount of chromatic aberration 
+         */
         public setChromaticAberration(amount: number) { this._chromaticAberration = amount; }
+        /**
+         * Sets chromatic aberration amount to 0
+         */
         public disableChromaticAberration() { this._chromaticAberration = 0; }
+        /**
+         * Sets the EdgeDistortion amount
+         * @param amount amount of EdgeDistortion 
+         */
         public setEdgeDistortion(amount: number) { this._distortion = amount; }
+        /**
+         * Sets edge distortion to 0
+         */
         public disableEdgeDistortion() { this._distortion = 0; }
+        /**
+         * Sets the FocusDistance amount
+         * @param amount amount of FocusDistance 
+         */
         public setFocusDistance(amount: number) { this._dofDistance = amount; }
+         /**
+         * Disables depth of field
+         */
         public disableDepthOfField() { this._dofDistance = -1; }
+        /**
+         * Sets the Aperture amount
+         * @param amount amount of Aperture 
+         */
         public setAperture(amount: number) { this._dofAperture = amount; }
+        /**
+         * Sets the DarkenOutOfFocus amount
+         * @param amount amount of DarkenOutOfFocus 
+         */
         public setDarkenOutOfFocus(amount: number) { this._dofDarken = amount; }
+        /**
+         * Creates a pentagon bokeh effect
+         */
         public enablePentagonBokeh() {
             this._highlightsPostProcess.updateEffect("#define PENTAGON\n");
         }
+        /**
+         * Disables the pentagon bokeh effect
+         */
         public disablePentagonBokeh() {
             this._highlightsPostProcess.updateEffect();
         }
+        /**
+         * Enables noise blur
+         */
         public enableNoiseBlur() { this._blurNoise = true; }
+        /**
+         * Disables noise blur
+         */
         public disableNoiseBlur() { this._blurNoise = false; }
+        /**
+         * Sets the HighlightsGain amount
+         * @param amount amount of HighlightsGain 
+         */
         public setHighlightsGain(amount: number) {
             this._highlightsGain = amount;
         }
+        /**
+         * Sets the HighlightsThreshold amount
+         * @param amount amount of HighlightsThreshold 
+         */
         public setHighlightsThreshold(amount: number) {
             if (this._highlightsGain === -1) {
                 this._highlightsGain = 1.0;
             }
             this._highlightsThreshold = amount;
         }
+        /**
+         * Disables highlights
+         */
         public disableHighlights() {
             this._highlightsGain = -1;
         }
 
         /**
          * Removes the internal pipeline assets and detaches the pipeline from the scene cameras
+         * @param disableDepthRender If the scens depth rendering should be disabled (default: false)
          */
         public dispose(disableDepthRender: boolean = false): void {
             this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._scene.cameras);

+ 12 - 3
src/PostProcess/RenderPipeline/Pipelines/babylon.ssao2RenderingPipeline.ts

@@ -1,24 +1,32 @@
 module BABYLON {
+    /**
+     * Render pipeline to produce ssao effect
+     */
     export class SSAO2RenderingPipeline extends PostProcessRenderPipeline {
         // Members
 
         /**
+         * @ignore
         * The PassPostProcess id in the pipeline that contains the original scene color
         */
         public SSAOOriginalSceneColorEffect: string = "SSAOOriginalSceneColorEffect";
         /**
+         * @ignore
         * The SSAO PostProcess id in the pipeline
         */
         public SSAORenderEffect: string = "SSAORenderEffect";
         /**
+         * @ignore
         * The horizontal blur PostProcess id in the pipeline
         */
         public SSAOBlurHRenderEffect: string = "SSAOBlurHRenderEffect";
         /**
+         * @ignore
         * The vertical blur PostProcess id in the pipeline
         */
         public SSAOBlurVRenderEffect: string = "SSAOBlurVRenderEffect";
         /**
+         * @ignore
         * The PostProcess id in the pipeline that combines the SSAO-Blur output with the original scene color (SSAOOriginalSceneColorEffect)
         */
         public SSAOCombineRenderEffect: string = "SSAOCombineRenderEffect";
@@ -91,11 +99,12 @@
         */
         private _samplerOffsets: number[];
 
-        /**
-        * Are we using bilateral blur ?
-        */
+        
         @serialize("expensiveBlur")
         private _expensiveBlur: boolean = true;
+        /**
+        * If bilateral blur should be used
+        */
         public set expensiveBlur(b: boolean) {
             this._blurHPostProcess.updateEffect("#define BILATERAL_BLUR\n#define BILATERAL_BLUR_H\n#define SAMPLES 16\n#define EXPENSIVE " + (b ? "1" : "0") + "\n",
                 null, ["textureSampler", "depthSampler"]);

+ 8 - 0
src/PostProcess/RenderPipeline/Pipelines/babylon.ssaoRenderingPipeline.ts

@@ -1,24 +1,32 @@
 module BABYLON {
+    /**
+     * Render pipeline to produce ssao effect
+     */
     export class SSAORenderingPipeline extends PostProcessRenderPipeline {
         // Members
 
         /**
+         * @ignore
         * The PassPostProcess id in the pipeline that contains the original scene color
         */
         public SSAOOriginalSceneColorEffect: string = "SSAOOriginalSceneColorEffect";
         /**
+         * @ignore
         * The SSAO PostProcess id in the pipeline
         */
         public SSAORenderEffect: string = "SSAORenderEffect";
         /**
+         * @ignore
         * The horizontal blur PostProcess id in the pipeline
         */
         public SSAOBlurHRenderEffect: string = "SSAOBlurHRenderEffect";
         /**
+         * @ignore
         * The vertical blur PostProcess id in the pipeline
         */
         public SSAOBlurVRenderEffect: string = "SSAOBlurVRenderEffect";
         /**
+         * @ignore
         * The PostProcess id in the pipeline that combines the SSAO-Blur output with the original scene color (SSAOOriginalSceneColorEffect)
         */
         public SSAOCombineRenderEffect: string = "SSAOCombineRenderEffect";

+ 9 - 1
src/PostProcess/RenderPipeline/Pipelines/babylon.standardRenderingPipeline.ts

@@ -260,6 +260,7 @@
         private _samples: number = 1;
 
         /**
+         * @ignore
          * Specifies if the bloom pipeline is enabled
          */
         @serialize()
@@ -277,6 +278,7 @@
         }
 
         /**
+         * @ignore
          * Specifies if the depth of field pipeline is enabed
          */
         @serialize()
@@ -294,6 +296,7 @@
         }
 
         /**
+         * @ignore
          * Specifies if the lens flare pipeline is enabed
          */
         @serialize()
@@ -311,6 +314,7 @@
         }
 
         /**
+         * @ignore
          * Specifies if the HDR pipeline is enabled
          */
         @serialize()
@@ -328,6 +332,7 @@
         }
 
         /**
+         * @ignore
          * Specifies if the volumetric lights scattering effect is enabled
          */
         @serialize()
@@ -353,6 +358,7 @@
         }
 
         /**
+         * @ignore
          * Specifies if the motion blur effect is enabled
          */
         @serialize()
@@ -1077,7 +1083,9 @@
             return p;
         }
 
-        // Luminance steps
+        /**
+         * Luminance steps
+         */
         public static LuminanceSteps: number = 6;
     }
 }

+ 6 - 0
src/PostProcess/babylon.fxaaPostProcess.ts

@@ -1,6 +1,12 @@
 module BABYLON {
+    /**
+     * Fxaa post process
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#fxaa
+     */
     export class FxaaPostProcess extends PostProcess {
+        /** @hidden */
         public texelWidth: number;
+        /** @hidden */
         public texelHeight: number;
 
         constructor(name: string, options: number | PostProcessOptions, camera: Nullable<Camera> = null, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType: number = Engine.TEXTURETYPE_UNSIGNED_INT) {

+ 14 - 0
src/PostProcess/babylon.passPostProcess.ts

@@ -1,5 +1,19 @@
 module BABYLON {
+    /**
+     * PassPostProcess which produces an output the same as it's input
+     */
     export class PassPostProcess extends PostProcess {    
+        /**
+         * Creates the PassPostProcess
+         * @param name The name of the effect.
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @param camera The camera to apply the render pass to.
+         * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
+         * @param engine The engine which the post process will be applied. (default: current engine)
+         * @param reusable If the post process can be reused on the same frame. (default: false)
+         * @param textureType The type of texture to be used when performing the post processing.
+         * @param blockCompilation If compilation of the shader should not be done in the constructor. The updateEffect method can be used to compile the shader at a later time. (default: false)
+         */
         constructor(name: string, options: number | PostProcessOptions, camera: Nullable<Camera> = null, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType: number = Engine.TEXTURETYPE_UNSIGNED_INT, blockCompilation = false) {
             super(name, "pass", null, null, options, camera, samplingMode, engine, reusable, undefined, textureType, undefined, null, blockCompilation);
         }

+ 1 - 1
src/Tools/HDR/babylon.panoramaToCubemap.ts

@@ -113,7 +113,7 @@ module BABYLON {
          * 
          * @param float32Array The source data.
          * @param inputWidth The width of the input panorama.
-         * @param inputhHeight The height of the input panorama.
+         * @param inputHeight The height of the input panorama.
          * @param size The willing size of the generated cubemap (each faces will be size * size pixels)
          * @return The cubemap data 
          */

+ 6 - 1
src/Tools/babylon.tools.ts

@@ -90,6 +90,7 @@
     }  
 
     /**
+     * @ignore
      * Application error to support additional information when loading a file
      */
     export class LoadFileError extends Error {
@@ -105,7 +106,11 @@
          * @param message defines the message of the error
          * @param request defines the optional XHR request
          */
-        constructor(message: string, public request?: XMLHttpRequest) {
+        constructor(
+            message: string, 
+            /** defines the optional XHR request */
+            public request?: XMLHttpRequest
+        ) {
             super(message);
             this.name = "LoadFileError";