瀏覽代碼

misc docs

Trevor Baron 7 年之前
父節點
當前提交
78b9a26d41

+ 67 - 1
src/Culling/Octrees/babylon.octree.ts

@@ -1,27 +1,66 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Contains an array of blocks representing the octree
+     */
     export interface IOctreeContainer<T> {
     export interface IOctreeContainer<T> {
+        /**
+         * Blocks within the octree
+         */
         blocks: Array<OctreeBlock<T>>;
         blocks: Array<OctreeBlock<T>>;
     }
     }
 
 
+    /**
+     * Octrees are a really powerful data structure that can quickly select entities based on space coordinates.
+     * @see https://doc.babylonjs.com/how_to/optimizing_your_scene_with_octrees
+     */
     export class Octree<T> {
     export class Octree<T> {
+        /**
+         * Blocks within the octree containing objects
+         */
         public blocks: Array<OctreeBlock<T>>;
         public blocks: Array<OctreeBlock<T>>;
+        /**
+         * Content stored in the octree
+         */
         public dynamicContent = new Array<T>();
         public dynamicContent = new Array<T>();
 
 
         private _maxBlockCapacity: number;
         private _maxBlockCapacity: number;
         private _selectionContent: SmartArrayNoDuplicate<T>;       
         private _selectionContent: SmartArrayNoDuplicate<T>;       
         private _creationFunc: (entry: T, block: OctreeBlock<T>) => void;
         private _creationFunc: (entry: T, block: OctreeBlock<T>) => void;
 
 
-        constructor(creationFunc: (entry: T, block: OctreeBlock<T>) => void, maxBlockCapacity?: number, public maxDepth = 2) {
+        /**
+         * Creates a octree
+         * @see https://doc.babylonjs.com/how_to/optimizing_your_scene_with_octrees
+         * @param creationFunc function to be used to instatiate the octree
+         * @param maxBlockCapacity defines the maximum number of meshes you want on your octree's leaves (default: 64)
+         * @param maxDepth defines the maximum depth (sub-levels) for your octree. Default value is 2, which means 8 8 8 = 512 blocks :) (This parameter takes precedence over capacity.)
+         */
+        constructor(creationFunc: (
+            entry: T,
+            block: OctreeBlock<T>) => void,
+            maxBlockCapacity?: number, 
+            /** Defines the maximum depth (sub-levels) for your octree. Default value is 2, which means 8 8 8 = 512 blocks :) (This parameter takes precedence over capacity.) */
+            public maxDepth = 2
+        ) {
             this._maxBlockCapacity = maxBlockCapacity || 64;
             this._maxBlockCapacity = maxBlockCapacity || 64;
             this._selectionContent = new SmartArrayNoDuplicate<T>(1024);
             this._selectionContent = new SmartArrayNoDuplicate<T>(1024);
             this._creationFunc = creationFunc;
             this._creationFunc = creationFunc;
         }
         }
 
 
         // Methods
         // Methods
+        /**
+         * Updates the octree by adding blocks for the passed in meshes within the min and max world parameters
+         * @param worldMin worldMin for the octree blocks var blockSize = new Vector3((worldMax.x - worldMin.x) / 2, (worldMax.y - worldMin.y) / 2, (worldMax.z - worldMin.z) / 2);
+         * @param worldMax worldMax for the octree blocks var blockSize = new Vector3((worldMax.x - worldMin.x) / 2, (worldMax.y - worldMin.y) / 2, (worldMax.z - worldMin.z) / 2);
+         * @param entries meshes to be added to the octree blocks
+         */
         public update(worldMin: Vector3, worldMax: Vector3, entries: T[]): void {
         public update(worldMin: Vector3, worldMax: Vector3, entries: T[]): void {
             Octree._CreateBlocks(worldMin, worldMax, entries, this._maxBlockCapacity, 0, this.maxDepth, this, this._creationFunc);
             Octree._CreateBlocks(worldMin, worldMax, entries, this._maxBlockCapacity, 0, this.maxDepth, this, this._creationFunc);
         }
         }
 
 
+        /**
+         * Adds a mesh to the octree
+         * @param entry Mesh to add to the octree
+         */
         public addMesh(entry: T): void {
         public addMesh(entry: T): void {
             for (var index = 0; index < this.blocks.length; index++) {
             for (var index = 0; index < this.blocks.length; index++) {
                 var block = this.blocks[index];
                 var block = this.blocks[index];
@@ -29,6 +68,12 @@
             }
             }
         }
         }
 
 
+        /**
+         * Selects an array of meshes within the frustum
+         * @param frustumPlanes The frustum planes to use which will select all meshes within it
+         * @param allowDuplicate If duplicate objects are allowed in the resulting object array
+         * @returns array of meshes within the frustum
+         */
         public select(frustumPlanes: Plane[], allowDuplicate?: boolean): SmartArray<T> {
         public select(frustumPlanes: Plane[], allowDuplicate?: boolean): SmartArray<T> {
             this._selectionContent.reset();
             this._selectionContent.reset();
 
 
@@ -46,6 +91,13 @@
             return this._selectionContent;
             return this._selectionContent;
         }
         }
 
 
+        /**
+         * Test if the octree intersect with the given bounding sphere and if yes, then add its content to the selection array
+         * @param sphereCenter defines the bounding sphere center
+         * @param sphereRadius defines the bounding sphere radius
+         * @param allowDuplicate defines if the selection array can contains duplicated entries
+         * @returns an array of objects that intersect the sphere
+         */
         public intersects(sphereCenter: Vector3, sphereRadius: number, allowDuplicate?: boolean): SmartArray<T> {
         public intersects(sphereCenter: Vector3, sphereRadius: number, allowDuplicate?: boolean): SmartArray<T> {
             this._selectionContent.reset();
             this._selectionContent.reset();
 
 
@@ -63,6 +115,11 @@
             return this._selectionContent;
             return this._selectionContent;
         }
         }
 
 
+        /**
+        * Test if the octree intersect with the given ray and if yes, then add its content to resulting array
+         * @param ray defines the ray to test with
+         * @returns array of intersected objects
+         */
         public intersectsRay(ray: Ray): SmartArray<T> {
         public intersectsRay(ray: Ray): SmartArray<T> {
             this._selectionContent.reset();
             this._selectionContent.reset();
 
 
@@ -76,6 +133,9 @@
             return this._selectionContent;
             return this._selectionContent;
         }
         }
 
 
+        /**
+         * @hidden
+         */
         public static _CreateBlocks<T>(worldMin: Vector3, worldMax: Vector3, entries: T[], maxBlockCapacity: number, currentDepth: number, maxDepth: number, target: IOctreeContainer<T>, creationFunc: (entry: T, block: OctreeBlock<T>) => void): void {
         public static _CreateBlocks<T>(worldMin: Vector3, worldMax: Vector3, entries: T[], maxBlockCapacity: number, currentDepth: number, maxDepth: number, target: IOctreeContainer<T>, creationFunc: (entry: T, block: OctreeBlock<T>) => void): void {
             target.blocks = new Array<OctreeBlock<T>>();
             target.blocks = new Array<OctreeBlock<T>>();
             var blockSize = new Vector3((worldMax.x - worldMin.x) / 2, (worldMax.y - worldMin.y) / 2, (worldMax.z - worldMin.z) / 2);
             var blockSize = new Vector3((worldMax.x - worldMin.x) / 2, (worldMax.y - worldMin.y) / 2, (worldMax.z - worldMin.z) / 2);
@@ -95,6 +155,9 @@
             }
             }
         }
         }
 
 
+        /**
+         * Adds a mesh into the octree block if it intersects the block
+         */
         public static CreationFuncForMeshes = (entry: AbstractMesh, block: OctreeBlock<AbstractMesh>): void => {
         public static CreationFuncForMeshes = (entry: AbstractMesh, block: OctreeBlock<AbstractMesh>): void => {
             let boundingInfo = entry.getBoundingInfo();
             let boundingInfo = entry.getBoundingInfo();
             if (!entry.isBlocked && boundingInfo.boundingBox.intersectsMinMax(block.minPoint, block.maxPoint)) {
             if (!entry.isBlocked && boundingInfo.boundingBox.intersectsMinMax(block.minPoint, block.maxPoint)) {
@@ -102,6 +165,9 @@
             }
             }
         }
         }
 
 
+        /**
+         * Adds a submesh into the octree block if it intersects the block
+         */
         public static CreationFuncForSubMeshes = (entry: SubMesh, block: OctreeBlock<SubMesh>): void => {
         public static CreationFuncForSubMeshes = (entry: SubMesh, block: OctreeBlock<SubMesh>): void => {
             let boundingInfo = entry.getBoundingInfo();
             let boundingInfo = entry.getBoundingInfo();
             if (boundingInfo.boundingBox.intersectsMinMax(block.minPoint, block.maxPoint)) {
             if (boundingInfo.boundingBox.intersectsMinMax(block.minPoint, block.maxPoint)) {

+ 1 - 0
src/Particles/babylon.particle.ts

@@ -81,6 +81,7 @@
 
 
         /** @hidden */
         /** @hidden */
         public _initialStartSpriteCellID: number;
         public _initialStartSpriteCellID: number;
+        /** @hidden */
         public _initialEndSpriteCellID: number;
         public _initialEndSpriteCellID: number;
 
 
         /** @hidden */
         /** @hidden */

+ 2 - 1
src/Particles/babylon.particleHelper.ts

@@ -88,7 +88,8 @@ module BABYLON {
         /**
         /**
          * Static function used to export a particle system to a ParticleSystemSet variable.
          * Static function used to export a particle system to a ParticleSystemSet variable.
          * Please note that the emitter shape is not exported
          * Please note that the emitter shape is not exported
-         * @param system defines the particle systems to export
+         * @param systems defines the particle systems to export
+         * @returns the created particle system set
          */
          */
         public static ExportSet(systems: IParticleSystem[]): ParticleSystemSet {
         public static ExportSet(systems: IParticleSystem[]): ParticleSystemSet {
             var set = new ParticleSystemSet();
             var set = new ParticleSystemSet();

+ 4 - 0
src/Particles/babylon.particleSystem.ts

@@ -809,6 +809,7 @@
          * @param gradient defines the gradient to use (between 0 and 1)
          * @param gradient defines the gradient to use (between 0 and 1)
          * @param color1 defines the color to affect to the specified gradient
          * @param color1 defines the color to affect to the specified gradient
          * @param color2 defines an additional color used to define a range ([color, color2]) with main color to pick the final color from
          * @param color2 defines an additional color used to define a range ([color, color2]) with main color to pick the final color from
+         * @returns this particle system
          */
          */
         public addColorGradient(gradient: number, color1: Color4, color2?: Color4): IParticleSystem {
         public addColorGradient(gradient: number, color1: Color4, color2?: Color4): IParticleSystem {
             if (!this._colorGradients) {
             if (!this._colorGradients) {
@@ -837,6 +838,7 @@
         /**
         /**
          * Remove a specific color gradient
          * Remove a specific color gradient
          * @param gradient defines the gradient to remove
          * @param gradient defines the gradient to remove
+         * @returns this particle system
          */
          */
         public removeColorGradient(gradient: number): IParticleSystem {
         public removeColorGradient(gradient: number): IParticleSystem {
             if (!this._colorGradients) {
             if (!this._colorGradients) {
@@ -1451,6 +1453,7 @@
             return attributeNamesOrOptions;
             return attributeNamesOrOptions;
         }
         }
 
 
+        /** @hidden */
         public static _GetEffectCreationOptions(isAnimationSheetEnabled = false): string[] {
         public static _GetEffectCreationOptions(isAnimationSheetEnabled = false): string[] {
             var effectCreationOption = ["invView", "view", "projection", "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "textureMask", "translationPivot", "eyePosition"];
             var effectCreationOption = ["invView", "view", "projection", "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "textureMask", "translationPivot", "eyePosition"];
 
 
@@ -1461,6 +1464,7 @@
             return effectCreationOption;
             return effectCreationOption;
         }
         }
 
 
+        /** @hidden */
         private _getEffect(blendMode: number): Effect {
         private _getEffect(blendMode: number): Effect {
             if (this._customEffect) {
             if (this._customEffect) {
                 return this._customEffect;
                 return this._customEffect;

+ 2 - 0
src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts

@@ -11,10 +11,12 @@
 		 */
 		 */
         private readonly SharpenPostProcessId: string = "SharpenPostProcessEffect";
         private readonly SharpenPostProcessId: string = "SharpenPostProcessEffect";
         /**
         /**
+         * @ignore
 		 * ID of the image processing post process;
 		 * ID of the image processing post process;
 		 */
 		 */
         readonly ImageProcessingPostProcessId: string = "ImageProcessingPostProcessEffect";
         readonly ImageProcessingPostProcessId: string = "ImageProcessingPostProcessEffect";
         /**
         /**
+         * @ignore
 		 * ID of the Fast Approximate Anti-Aliasing post process;
 		 * ID of the Fast Approximate Anti-Aliasing post process;
 		 */
 		 */
         readonly FxaaPostProcessId: string = "FxaaPostProcessEffect";
         readonly FxaaPostProcessId: string = "FxaaPostProcessEffect";

+ 6 - 0
src/PostProcess/RenderPipeline/Pipelines/babylon.standardRenderingPipeline.ts

@@ -1,4 +1,9 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Standard rendering pipeline
+     * Default pipeline should be used going forward but the standard pipeline will be kept for backwards compatibility.
+     * @see https://doc.babylonjs.com/how_to/using_standard_rendering_pipeline
+     */
     export class StandardRenderingPipeline extends PostProcessRenderPipeline implements IDisposable, IAnimatable {
     export class StandardRenderingPipeline extends PostProcessRenderPipeline implements IDisposable, IAnimatable {
         /**
         /**
         * Public members
         * Public members
@@ -433,6 +438,7 @@
         }
         }
 
 
         /**
         /**
+         * Default pipeline should be used going forward but the standard pipeline will be kept for backwards compatibility.
          * @constructor
          * @constructor
          * @param {string} name - The rendering pipeline name
          * @param {string} name - The rendering pipeline name
          * @param {BABYLON.Scene} scene - The scene linked to this pipeline
          * @param {BABYLON.Scene} scene - The scene linked to this pipeline

+ 29 - 0
src/PostProcess/RenderPipeline/babylon.postProcessRenderPipeline.ts

@@ -1,15 +1,27 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * PostProcessRenderPipeline
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocessrenderpipeline
+     */
     export class PostProcessRenderPipeline {
     export class PostProcessRenderPipeline {
 
 
         private _renderEffects: { [key: string]: PostProcessRenderEffect };
         private _renderEffects: { [key: string]: PostProcessRenderEffect };
         private _renderEffectsForIsolatedPass: PostProcessRenderEffect[];
         private _renderEffectsForIsolatedPass: PostProcessRenderEffect[];
 
 
+        /**
+         * @hidden
+         */
         protected _cameras: Camera[];
         protected _cameras: Camera[];
 
 
         /** @hidden */
         /** @hidden */
         @serialize()
         @serialize()
         public _name: string;
         public _name: string;
 
 
+        /**
+         * Initializes a PostProcessRenderPipeline
+         * @param engine engine to add the pipeline to
+         * @param name name of the pipeline
+         */
         constructor(private engine: Engine, name: string) {
         constructor(private engine: Engine, name: string) {
             this._name = name;
             this._name = name;
 
 
@@ -19,10 +31,17 @@ module BABYLON {
             this._cameras = [];
             this._cameras = [];
         }
         }
 
 
+        /**
+         * "PostProcessRenderPipeline"
+         * @returns "PostProcessRenderPipeline"
+         */
         public getClassName(): string {
         public getClassName(): string {
             return "PostProcessRenderPipeline";
             return "PostProcessRenderPipeline";
         }
         }
 
 
+        /**
+         * If all the render effects in the pipeline are support
+         */
         public get isSupported(): boolean {
         public get isSupported(): boolean {
             for (var renderEffectName in this._renderEffects) {
             for (var renderEffectName in this._renderEffects) {
                 if (this._renderEffects.hasOwnProperty(renderEffectName)) {
                 if (this._renderEffects.hasOwnProperty(renderEffectName)) {
@@ -35,6 +54,10 @@ module BABYLON {
             return true;
             return true;
         }
         }
 
 
+        /**
+         * Adds an effect to the pipeline
+         * @param renderEffect the effect to add
+         */
         public addEffect(renderEffect: PostProcessRenderEffect): void {
         public addEffect(renderEffect: PostProcessRenderEffect): void {
             (<any>this._renderEffects)[renderEffect._name] = renderEffect;
             (<any>this._renderEffects)[renderEffect._name] = renderEffect;
         }
         }
@@ -61,8 +84,11 @@ module BABYLON {
             renderEffects._enable(Tools.MakeArray(cameras || this._cameras));
             renderEffects._enable(Tools.MakeArray(cameras || this._cameras));
         }
         }
 
 
+        /** @hidden */
         public _disableEffect(renderEffectName: string, cameras: Nullable<Camera[]>): void;
         public _disableEffect(renderEffectName: string, cameras: Nullable<Camera[]>): void;
+        /** @hidden */
         public _disableEffect(renderEffectName: string, cameras: Nullable<Camera[]>): void;
         public _disableEffect(renderEffectName: string, cameras: Nullable<Camera[]>): void;
+        /** @hidden */
         public _disableEffect(renderEffectName: string, cameras: Nullable<Camera[]>): void {
         public _disableEffect(renderEffectName: string, cameras: Nullable<Camera[]>): void {
             var renderEffects: PostProcessRenderEffect = (<any>this._renderEffects)[renderEffectName];
             var renderEffects: PostProcessRenderEffect = (<any>this._renderEffects)[renderEffectName];
 
 
@@ -168,6 +194,9 @@ module BABYLON {
             return false;
             return false;
         }
         }
 
 
+        /**
+         * Disposes of the pipeline
+         */
         public dispose() {
         public dispose() {
             // Must be implemented by children 
             // Must be implemented by children 
         }
         }

+ 45 - 12
src/PostProcess/RenderPipeline/babylon.postProcessRenderPipelineManager.ts

@@ -1,18 +1,34 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * PostProcessRenderPipelineManager class
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocessrenderpipeline
+     */
     export class PostProcessRenderPipelineManager {
     export class PostProcessRenderPipelineManager {
         private _renderPipelines: { [Key: string]: PostProcessRenderPipeline };
         private _renderPipelines: { [Key: string]: PostProcessRenderPipeline };
 
 
+        /**
+         * Initializes a PostProcessRenderPipelineManager
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocessrenderpipeline
+         */
         constructor() {
         constructor() {
             this._renderPipelines = {};
             this._renderPipelines = {};
         }
         }
 
 
+        /**
+         * Adds a pipeline to the manager
+         * @param renderPipeline The pipeline to add
+         */
         public addPipeline(renderPipeline: PostProcessRenderPipeline): void {
         public addPipeline(renderPipeline: PostProcessRenderPipeline): void {
             this._renderPipelines[renderPipeline._name] = renderPipeline;
             this._renderPipelines[renderPipeline._name] = renderPipeline;
         }
         }
 
 
-        public attachCamerasToRenderPipeline(renderPipelineName: string, cameras: Camera, unique?: boolean): void;
-        public attachCamerasToRenderPipeline(renderPipelineName: string, cameras: Camera[], unique?: boolean): void;
-        public attachCamerasToRenderPipeline(renderPipelineName: string, cameras: any, unique: boolean = false): void {
+        /**
+         * Attaches a camera to the pipeline
+         * @param renderPipelineName The name of the pipeline to attach to
+         * @param cameras the camera to attach
+         * @param unique if the camera can be attached multiple times to the pipeline
+         */
+        public attachCamerasToRenderPipeline(renderPipelineName: string, cameras: any | Camera[] | Camera, unique: boolean = false): void {
             var renderPipeline: PostProcessRenderPipeline = this._renderPipelines[renderPipelineName];
             var renderPipeline: PostProcessRenderPipeline = this._renderPipelines[renderPipelineName];
 
 
             if (!renderPipeline) {
             if (!renderPipeline) {
@@ -22,9 +38,12 @@ module BABYLON {
             renderPipeline._attachCameras(cameras, unique);
             renderPipeline._attachCameras(cameras, unique);
         }
         }
 
 
-        public detachCamerasFromRenderPipeline(renderPipelineName: string, cameras: Camera): void;
-        public detachCamerasFromRenderPipeline(renderPipelineName: string, cameras: Camera[]): void;
-        public detachCamerasFromRenderPipeline(renderPipelineName: string, cameras: any): void {
+        /**
+         * Detaches a camera from the pipeline
+         * @param renderPipelineName The name of the pipeline to detach from
+         * @param cameras the camera to detach
+         */
+        public detachCamerasFromRenderPipeline(renderPipelineName: string, cameras: any | Camera[] | Camera): void {
             var renderPipeline: PostProcessRenderPipeline = this._renderPipelines[renderPipelineName];
             var renderPipeline: PostProcessRenderPipeline = this._renderPipelines[renderPipelineName];
 
 
             if (!renderPipeline) {
             if (!renderPipeline) {
@@ -34,9 +53,13 @@ module BABYLON {
             renderPipeline._detachCameras(cameras);
             renderPipeline._detachCameras(cameras);
         }
         }
 
 
-        public enableEffectInPipeline(renderPipelineName: string, renderEffectName: string, cameras: Camera): void;
-        public enableEffectInPipeline(renderPipelineName: string, renderEffectName: string, cameras: Camera[]): void;
-        public enableEffectInPipeline(renderPipelineName: string, renderEffectName: string, cameras: any): void {
+        /**
+         * Enables an effect by name on a pipeline
+         * @param renderPipelineName the name of the pipeline to enable the effect in
+         * @param renderEffectName the name of the effect to enable
+         * @param cameras the cameras that the effect should be enabled on
+         */
+        public enableEffectInPipeline(renderPipelineName: string, renderEffectName: string, cameras: any | Camera[] | Camera): void {
             var renderPipeline: PostProcessRenderPipeline = this._renderPipelines[renderPipelineName];
             var renderPipeline: PostProcessRenderPipeline = this._renderPipelines[renderPipelineName];
 
 
             if (!renderPipeline) {
             if (!renderPipeline) {
@@ -46,9 +69,13 @@ module BABYLON {
             renderPipeline._enableEffect(renderEffectName, cameras);
             renderPipeline._enableEffect(renderEffectName, cameras);
         }
         }
 
 
-        public disableEffectInPipeline(renderPipelineName: string, renderEffectName: string, cameras: Camera): void;
-        public disableEffectInPipeline(renderPipelineName: string, renderEffectName: string, cameras: Camera[]): void;
-        public disableEffectInPipeline(renderPipelineName: string, renderEffectName: string, cameras: any): void {
+        /**
+         * Disables an effect by name on a pipeline
+         * @param renderPipelineName the name of the pipeline to disable the effect in
+         * @param renderEffectName the name of the effect to disable
+         * @param cameras the cameras that the effect should be disabled on
+         */
+        public disableEffectInPipeline(renderPipelineName: string, renderEffectName: string, cameras: any | Camera[] | Camera): void {
             var renderPipeline: PostProcessRenderPipeline = this._renderPipelines[renderPipelineName];
             var renderPipeline: PostProcessRenderPipeline = this._renderPipelines[renderPipelineName];
 
 
             if (!renderPipeline) {
             if (!renderPipeline) {
@@ -58,6 +85,9 @@ module BABYLON {
             renderPipeline._disableEffect(renderEffectName, cameras);
             renderPipeline._disableEffect(renderEffectName, cameras);
         }
         }
 
 
+        /**
+         * Updates the state of all contained render pipelines and disposes of any non supported pipelines
+         */
         public update(): void {
         public update(): void {
             for (var renderPipelineName in this._renderPipelines) {
             for (var renderPipelineName in this._renderPipelines) {
                 if (this._renderPipelines.hasOwnProperty(renderPipelineName)) {
                 if (this._renderPipelines.hasOwnProperty(renderPipelineName)) {
@@ -82,6 +112,9 @@ module BABYLON {
             }
             }
         }
         }
 
 
+        /**
+         * Disposes of the manager and pipelines
+         */
         public dispose(): void {
         public dispose(): void {
             for (var renderPipelineName in this._renderPipelines) {
             for (var renderPipelineName in this._renderPipelines) {
                 if (this._renderPipelines.hasOwnProperty(renderPipelineName)) {
                 if (this._renderPipelines.hasOwnProperty(renderPipelineName)) {

+ 16 - 0
src/PostProcess/babylon.blackAndWhitePostProcess.ts

@@ -1,8 +1,24 @@
 module BABYLON {
 module BABYLON {
 
 
+    /**
+     * Post process used to render in black and white
+     */
     export class BlackAndWhitePostProcess extends PostProcess {
     export class BlackAndWhitePostProcess extends PostProcess {
+        /**
+         * Linear about to convert he result to black and white (default: 1)
+         */
         public degree = 1;
         public degree = 1;
     
     
+        /**
+         * Creates a black and white post process
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#black-and-white
+         * @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)
+         */
         constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean) {
         constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean) {
             super(name, "blackAndWhite", ["degree"], null, options, camera, samplingMode, engine, reusable);
             super(name, "blackAndWhite", ["degree"], null, options, camera, samplingMode, engine, reusable);
 
 

+ 13 - 0
src/PostProcess/babylon.displayPassPostProcess.ts

@@ -1,5 +1,18 @@
 module BABYLON {
 module BABYLON {
+
+    /**
+     * DisplayPassPostProcess which produces an output the same as it's input
+     */
     export class DisplayPassPostProcess extends PostProcess {
     export class DisplayPassPostProcess extends PostProcess {
+        /**
+         * Creates the DisplayPassPostProcess
+         * @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)
+         */
         constructor(name: string, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean) {
         constructor(name: string, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean) {
             super(name, "displayPass", ["passSampler"], ["passSampler"], options, camera, samplingMode, engine, reusable);
             super(name, "displayPass", ["passSampler"], ["passSampler"], options, camera, samplingMode, engine, reusable);
         }
         }

+ 22 - 1
src/PostProcess/babylon.filterPostProcess.ts

@@ -1,6 +1,27 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Applies a kernel filter to the image
+     */
     export class FilterPostProcess extends PostProcess {
     export class FilterPostProcess extends PostProcess {
-        constructor(name: string, public kernelMatrix: Matrix, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean) {
+        /**
+         * 
+         * @param name The name of the effect.
+         * @param kernelMatrix The matrix to be applied to the image
+         * @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)
+         */
+        constructor(name: string,
+            /** The matrix to be applied to the image */
+            public kernelMatrix: Matrix, 
+            options: number | PostProcessOptions, 
+            camera: Nullable<Camera>, 
+            samplingMode?: number, 
+            engine?: Engine, 
+            reusable?: boolean
+        ) {
             super(name, "filter", ["kernelMatrix"], null, options, camera, samplingMode, engine, reusable);
             super(name, "filter", ["kernelMatrix"], null, options, camera, samplingMode, engine, reusable);
 
 
             this.onApply = (effect: Effect) => {
             this.onApply = (effect: Effect) => {

+ 15 - 0
src/PostProcess/babylon.highlightsPostProcess.ts

@@ -1,5 +1,20 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Extracts highlights from the image
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses
+     */
     export class HighlightsPostProcess extends PostProcess {
     export class HighlightsPostProcess extends PostProcess {
+        /**
+         * Extracts highlights from the image
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses 
+         * @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 Type of texture for the post process (default: Engine.TEXTURETYPE_UNSIGNED_INT)
+         */
         constructor(name: string, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType: number = Engine.TEXTURETYPE_UNSIGNED_INT) {
         constructor(name: string, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType: number = Engine.TEXTURETYPE_UNSIGNED_INT) {
             super(name, "highlights", null, null, options, camera, samplingMode, engine, reusable, null, textureType);
             super(name, "highlights", null, null, options, camera, samplingMode, engine, reusable, null, textureType);
         }
         }

+ 8 - 1
src/PostProcess/babylon.imageProcessingPostProcess.ts

@@ -1,4 +1,8 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * ImageProcessingPostProcess
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#imageprocessing
+     */
     export class ImageProcessingPostProcess extends PostProcess {
     export class ImageProcessingPostProcess extends PostProcess {
 
 
         /**
         /**
@@ -337,7 +341,10 @@
                 this.imageProcessingConfiguration.bind(effect, this.aspectRatio);
                 this.imageProcessingConfiguration.bind(effect, this.aspectRatio);
             };
             };
         }
         }
-
+        /**
+         *  "ImageProcessingPostProcess"
+         * @returns "ImageProcessingPostProcess"
+         */
         public getClassName(): string {
         public getClassName(): string {
             return "ImageProcessingPostProcess";
             return "ImageProcessingPostProcess";
         }
         }

+ 3 - 0
src/PostProcess/babylon.postProcess.ts

@@ -1,4 +1,7 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Size options for a post process
+     */
     export type PostProcessOptions = { width: number, height: number };
     export type PostProcessOptions = { width: number, height: number };
 
 
     /**
     /**

+ 38 - 2
src/PostProcess/babylon.refractionPostProcess.ts

@@ -1,4 +1,8 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Post process which applies a refractin texture
+     * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#refraction
+     */
     export class RefractionPostProcess extends PostProcess {
     export class RefractionPostProcess extends PostProcess {
         private _refTexture: Texture;
         private _refTexture: Texture;
         private _ownRefractionTexture = true;
         private _ownRefractionTexture = true;
@@ -19,8 +23,36 @@
             this._refTexture = value;
             this._refTexture = value;
             this._ownRefractionTexture = false;
             this._ownRefractionTexture = false;
         }
         }
-
-        constructor(name: string, refractionTextureUrl: string, public color: Color3, public depth: number, public colorLevel: number, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean) {
+        
+        /**
+         * Initializes the RefractionPostProcess
+         * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses#refraction
+         * @param name The name of the effect.
+         * @param refractionTextureUrl Url of the refraction texture to use
+         * @param color the base color of the refraction (used to taint the rendering)
+         * @param depth simulated refraction depth
+         * @param colorLevel the coefficient of the base color (0 to remove base color tainting)
+         * @param camera The camera to apply the render pass to.
+         * @param options The required width/height ratio to downsize to before computing the render pass.
+         * @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)
+         */
+        constructor(
+            name: string, 
+            refractionTextureUrl: string, 
+            /** the base color of the refraction (used to taint the rendering) */
+            public color: Color3, 
+            /** simulated refraction depth */
+            public depth: number, 
+            /** the coefficient of the base color (0 to remove base color tainting) */
+            public colorLevel: number, 
+            options: number | PostProcessOptions, 
+            camera: Camera, 
+            samplingMode?: number, 
+            engine?: Engine, 
+            reusable?: boolean
+        ) {
             super(name, "refraction", ["baseColor", "depth", "colorLevel"], ["refractionSampler"], options, camera, samplingMode, engine, reusable);
             super(name, "refraction", ["baseColor", "depth", "colorLevel"], ["refractionSampler"], options, camera, samplingMode, engine, reusable);
 
 
             this.onActivateObservable.add((cam: Camera) => {
             this.onActivateObservable.add((cam: Camera) => {
@@ -37,6 +69,10 @@
         }
         }
 
 
         // Methods
         // Methods
+        /**
+         * Disposes of the post process
+         * @param camera Camera to dispose post process on
+         */
         public dispose(camera: Camera): void {
         public dispose(camera: Camera): void {
             if (this._refTexture && this._ownRefractionTexture) {
             if (this._refTexture && this._ownRefractionTexture) {
                 this._refTexture.dispose();
                 this._refTexture.dispose();

+ 12 - 0
src/PostProcess/babylon.stereoscopicInterlacePostProcess.ts

@@ -1,8 +1,20 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * StereoscopicInterlacePostProcess used to render stereo views from a rigged camera
+     */
     export class StereoscopicInterlacePostProcess extends PostProcess {
     export class StereoscopicInterlacePostProcess extends PostProcess {
         private _stepSize : Vector2;
         private _stepSize : Vector2;
         private _passedProcess : Nullable<PostProcess>;
         private _passedProcess : Nullable<PostProcess>;
 
 
+        /**
+         * Initializes a StereoscopicInterlacePostProcess
+         * @param name The name of the effect.
+         * @param rigCameras The rig cameras to be appled to the post process
+         * @param isStereoscopicHoriz If the rendered results are horizontal or verticle
+         * @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)
+         */
         constructor(name: string, rigCameras: Camera[], isStereoscopicHoriz: boolean, samplingMode?: number, engine?: Engine, reusable?: boolean) {
         constructor(name: string, rigCameras: Camera[], isStereoscopicHoriz: boolean, samplingMode?: number, engine?: Engine, reusable?: boolean) {
             super(name, "stereoscopicInterlace", ['stepSize'], ['camASampler'], 1, rigCameras[1], samplingMode, engine, reusable, isStereoscopicHoriz ? "#define IS_STEREOSCOPIC_HORIZ 1" : undefined);
             super(name, "stereoscopicInterlace", ['stepSize'], ['camASampler'], 1, rigCameras[1], samplingMode, engine, reusable, isStereoscopicHoriz ? "#define IS_STEREOSCOPIC_HORIZ 1" : undefined);
             
             

+ 10 - 0
src/PostProcess/babylon.vrDistortionCorrectionPostProcess.ts

@@ -1,4 +1,7 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * VRDistortionCorrectionPostProcess used for mobile VR 
+     */
     export class VRDistortionCorrectionPostProcess extends PostProcess {
     export class VRDistortionCorrectionPostProcess extends PostProcess {
         private _isRightEye: boolean;
         private _isRightEye: boolean;
         private _distortionFactors: number[];
         private _distortionFactors: number[];
@@ -8,6 +11,13 @@
         private _scaleFactor: Vector2;
         private _scaleFactor: Vector2;
         private _lensCenter: Vector2;
         private _lensCenter: Vector2;
 
 
+        /**
+         * Initializes the VRDistortionCorrectionPostProcess
+         * @param name The name of the effect.
+         * @param camera The camera to apply the render pass to.
+         * @param isRightEye If this is for the right eye distortion
+         * @param vrMetrics All the required metrics for the VR camera
+         */
         constructor(name: string, camera: Camera, isRightEye: boolean, vrMetrics: VRCameraMetrics) {
         constructor(name: string, camera: Camera, isRightEye: boolean, vrMetrics: VRCameraMetrics) {
             super(name, "vrDistortionCorrection", [
             super(name, "vrDistortionCorrection", [
                 'LensCenter',
                 'LensCenter',