浏览代码

More code comments

David Catuhe 7 年之前
父节点
当前提交
d4eebcbdd1

文件差异内容过多而无法显示
+ 4928 - 4757
dist/preview release/babylon.d.ts


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

@@ -2,270 +2,6 @@
   "errors": 4947,
   "babylon.typedoc.json": {
     "errors": 4947,
-    "JoystickAxis": {
-      "Enumeration": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Enumeration member": {
-        "X": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "Y": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "Z": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      }
-    },
-    "Orientation": {
-      "Enumeration": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Enumeration member": {
-        "CCW": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "CW": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      }
-    },
-    "PhysicsRadialImpulseFalloff": {
-      "Enumeration member": {
-        "Constant": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "Linear": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      }
-    },
-    "PhysicsUpdraftMode": {
-      "Enumeration member": {
-        "Center": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "Perpendicular": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      }
-    },
-    "SimplificationType": {
-      "Enumeration member": {
-        "QUADRATIC": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      }
-    },
-    "Space": {
-      "Enumeration": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Enumeration member": {
-        "BONE": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "LOCAL": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "WORLD": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      }
-    },
-    "TonemappingOperator": {
-      "Enumeration": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Enumeration member": {
-        "Hable": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "HejiDawson": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "Photographic": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "Reinhard": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      }
-    },
-    "WorkerReplyType": {
-      "Enumeration": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Enumeration member": {
-        "SUCCESS": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "UNKNOWN_ERROR": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      }
-    },
-    "WorkerTaskType": {
-      "Enumeration": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Enumeration member": {
-        "COLLIDE": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "INIT": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "UPDATE": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      }
-    },
-    "Xbox360Button": {
-      "Enumeration": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Enumeration member": {
-        "A": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "B": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "Back": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "LB": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "LeftStick": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "RB": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "RightStick": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "Start": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "X": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "Y": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      }
-    },
-    "Xbox360Dpad": {
-      "Enumeration": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Enumeration member": {
-        "Down": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "Left": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "Right": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "Up": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      }
-    },
     "AbstractMesh": {
       "Class": {
         "Comments": {
@@ -21695,20 +21431,6 @@
         }
       }
     },
-    "TonemapPostProcess": {
-      "Class": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Property": {
-        "exposureAdjustment": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      }
-    },
     "Tools": {
       "Class": {
         "Comments": {
@@ -25115,104 +24837,6 @@
         }
       }
     },
-    "VirtualJoystick": {
-      "Class": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Constructor": {
-        "new VirtualJoystick": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "leftJoystick": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        }
-      },
-      "Property": {
-        "deltaPosition": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "pressed": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "reverseLeftRight": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "reverseUpDown": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      },
-      "Method": {
-        "releaseCanvas": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "setActionOnTouch": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "action": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "setAxisForLeftRight": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "axis": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "setAxisForUpDown": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "axis": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "setJoystickSensibility": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "newJoystickSensibility": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        }
-      }
-    },
     "VirtualJoysticksCamera": {
       "Class": {
         "Comments": {
@@ -25264,189 +24888,6 @@
         }
       }
     },
-    "Xbox360Pad": {
-      "Class": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Property": {
-        "buttonA": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "buttonB": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "buttonBack": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "buttonLB": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "buttonLeftStick": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "buttonRB": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "buttonRightStick": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "buttonStart": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "buttonX": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "buttonY": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "dPadDown": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "dPadLeft": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "dPadRight": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "dPadUp": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "leftTrigger": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "onButtonDownObservable": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "onButtonUpObservable": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "onPadDownObservable": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "onPadUpObservable": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "rightTrigger": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      },
-      "Method": {
-        "onbuttondown": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "callback": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "onbuttonup": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "callback": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "ondpaddown": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "callback": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "ondpadup": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "callback": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "onlefttriggerchanged": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "callback": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "onrighttriggerchanged": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "callback": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        }
-      }
-    },
     "_AlphaState": {
       "Class": {
         "Comments": {

+ 7 - 0
src/Collisions/babylon.collisionCoordinator.ts

@@ -77,9 +77,13 @@ module BABYLON {
         radius: Array<number>;
     }
 
+    /** Defines supported task for worker process */
     export enum WorkerTaskType {
+        /** Initialization */
         INIT,
+        /** Update of geometry */
         UPDATE,
+        /** Evaluate collision */
         COLLIDE
     }
 
@@ -113,8 +117,11 @@ module BABYLON {
         removedGeometries: Array<string>;
     }
 
+    /** Defines kind of replies returned by worker */
     export enum WorkerReplyType {
+        /** Success */
         SUCCESS,
+        /** Unkown error */
         UNKNOWN_ERROR
     }
 

+ 98 - 2
src/Gamepad/babylon.xboxGamepad.ts

@@ -1,25 +1,46 @@
 module BABYLON {
 
+    /**
+     * Defines supported buttons for XBox360 compatible gamepads
+     */
     export enum Xbox360Button {
+        /** A */
         A,
+        /** B */
         B,
+        /** X */
         X,
+        /** Y */
         Y,
+        /** Start */
         Start,
+        /** Back */
         Back,
+        /** Left button */
         LB,
+        /** Right button */
         RB,
+        /** Left stick */
         LeftStick,
+        /** Right stick */
         RightStick
     }
 
+    /** Defines values for XBox360 DPad  */
     export enum Xbox360Dpad {
+        /** Up */
         Up,
+        /** Down */
         Down,
+        /** Left */
         Left,
+        /** Right */
         Right
     }
 
+    /**
+     * Defines a XBox360 gamepad
+     */
     export class Xbox360Pad extends Gamepad {
         private _leftTrigger: number = 0;
         private _rightTrigger: number = 0;
@@ -32,9 +53,13 @@
         private _ondpaddown: (dPadPressed: Xbox360Dpad) => void;
         private _ondpadup: (dPadReleased: Xbox360Dpad) => void;
 
+        /** Observable raised when a button is pressed */
         public onButtonDownObservable = new Observable<Xbox360Button>();
+        /** Observable raised when a button is released */
         public onButtonUpObservable = new Observable<Xbox360Button>();        
+        /** Observable raised when a pad is pressed */
         public onPadDownObservable = new Observable<Xbox360Dpad>();
+        /** Observable raised when a pad is released */
         public onPadUpObservable = new Observable<Xbox360Dpad>();        
 
         private _buttonA: number = 0;
@@ -55,20 +80,38 @@
 
         private _isXboxOnePad: boolean = false;
 
+        /**
+         * Creates a new XBox360 gamepad object
+         * @param id defines the id of this gamepad
+         * @param index defines its index
+         * @param gamepad defines the internal HTML gamepad object
+         * @param xboxOne defines if it is a XBox One gamepad
+         */
         constructor(id: string, index: number, gamepad: any, xboxOne: boolean = false) {
             super(id, index, gamepad, 0, 1, 2, 3);
             this.type = Gamepad.XBOX;
             this._isXboxOnePad = xboxOne;
         }
 
+        /**
+         * Defines the callback to call when left trigger is pressed
+         * @param callback defines the callback to use
+         */
         public onlefttriggerchanged(callback: (value: number) => void) {
             this._onlefttriggerchanged = callback;
         }
 
+        /**
+         * Defines the callback to call when right trigger is pressed
+         * @param callback defines the callback to use
+         */        
         public onrighttriggerchanged(callback: (value: number) => void) {
             this._onrighttriggerchanged = callback;
         }
-
+ 
+        /**
+         * Gets or sets left trigger value
+         */
         public get leftTrigger(): number {
             return this._leftTrigger;
         }
@@ -79,6 +122,9 @@
             this._leftTrigger = newValue;
         }
 
+        /**
+         * Gets or sets right trigger value
+         */        
         public get rightTrigger(): number {
             return this._rightTrigger;
         }
@@ -89,15 +135,34 @@
             this._rightTrigger = newValue;
         }
 
+        /**
+         * Defines the callback to call when a button is pressed
+         * @param callback defines the callback to use
+         */
         public onbuttondown(callback: (buttonPressed: Xbox360Button) => void) {
             this._onbuttondown = callback;
         }
+
+        /**
+         * Defines the callback to call when a button is released
+         * @param callback defines the callback to use
+         */        
         public onbuttonup(callback: (buttonReleased: Xbox360Button) => void) {
             this._onbuttonup = callback;
         }
+
+        /**
+         * Defines the callback to call when a pad is pressed
+         * @param callback defines the callback to use
+         */             
         public ondpaddown(callback: (dPadPressed: Xbox360Dpad) => void) {
             this._ondpaddown = callback;
         }
+
+        /**
+         * Defines the callback to call when a pad is released
+         * @param callback defines the callback to use
+         */             
         public ondpadup(callback: (dPadReleased: Xbox360Dpad) => void) {
             this._ondpadup = callback;
         }
@@ -143,90 +208,121 @@
             return newValue;
         }
 
+        /** Gets or sets value of A button */
         public get buttonA(): number {
             return this._buttonA;
         }
         public set buttonA(value) {
             this._buttonA = this._setButtonValue(value, this._buttonA, Xbox360Button.A);
         }
+
+        /** Gets or sets value of B button */
         public get buttonB(): number {
             return this._buttonB;
         }
         public set buttonB(value) {
             this._buttonB = this._setButtonValue(value, this._buttonB, Xbox360Button.B);
         }
+
+        /** Gets or sets value of X button */       
         public get buttonX(): number {
             return this._buttonX;
         }
         public set buttonX(value) {
             this._buttonX = this._setButtonValue(value, this._buttonX, Xbox360Button.X);
         }
+
+        /** Gets or sets value of Y button */        
         public get buttonY(): number {
             return this._buttonY;
         }
         public set buttonY(value) {
             this._buttonY = this._setButtonValue(value, this._buttonY, Xbox360Button.Y);
-        }
+        }        
+        
+        /** Gets or sets value of Start button  */
         public get buttonStart(): number {
             return this._buttonStart;
         }
         public set buttonStart(value) {
             this._buttonStart = this._setButtonValue(value, this._buttonStart, Xbox360Button.Start);
         }
+
+        /** Gets or sets value of Back button  */        
         public get buttonBack(): number {
             return this._buttonBack;
         }
         public set buttonBack(value) {
             this._buttonBack = this._setButtonValue(value, this._buttonBack, Xbox360Button.Back);
         }
+
+        /** Gets or sets value of Left button  */        
         public get buttonLB(): number {
             return this._buttonLB;
         }
         public set buttonLB(value) {
             this._buttonLB = this._setButtonValue(value, this._buttonLB, Xbox360Button.LB);
         }
+
+        /** Gets or sets value of Right button  */        
         public get buttonRB(): number {
             return this._buttonRB;
         }
         public set buttonRB(value) {
             this._buttonRB = this._setButtonValue(value, this._buttonRB, Xbox360Button.RB);
         }
+
+        /** Gets or sets value of left stick */  
         public get buttonLeftStick(): number {
             return this._buttonLeftStick;
         }
         public set buttonLeftStick(value) {
             this._buttonLeftStick = this._setButtonValue(value, this._buttonLeftStick, Xbox360Button.LeftStick);
         }
+
+        /** Gets or sets value of right stick */  
         public get buttonRightStick(): number {
             return this._buttonRightStick;
         }
         public set buttonRightStick(value) {
             this._buttonRightStick = this._setButtonValue(value, this._buttonRightStick, Xbox360Button.RightStick);
         }
+
+        /** Gets or sets value of DPad up */  
         public get dPadUp(): number {
             return this._dPadUp;
         }
         public set dPadUp(value) {
             this._dPadUp = this._setDPadValue(value, this._dPadUp, Xbox360Dpad.Up);
         }
+
+        /** Gets or sets value of DPad down */  
         public get dPadDown(): number {
             return this._dPadDown;
         }
         public set dPadDown(value) {
             this._dPadDown = this._setDPadValue(value, this._dPadDown, Xbox360Dpad.Down);
         }
+
+        /** Gets or sets value of DPad left */  
         public get dPadLeft(): number {
             return this._dPadLeft;
         }
         public set dPadLeft(value) {
             this._dPadLeft = this._setDPadValue(value, this._dPadLeft, Xbox360Dpad.Left);
         }
+
+        /** Gets or sets value of DPad right */  
         public get dPadRight(): number {
             return this._dPadRight;
         }
         public set dPadRight(value) {
             this._dPadRight = this._setDPadValue(value, this._dPadRight, Xbox360Dpad.Right);
         }
+
+        /**
+         * Force the gamepad to synchronize with device values
+         */
         public update() {
             super.update();
             if (this._isXboxOnePad) {

+ 15 - 0
src/Math/babylon.math.ts

@@ -5840,15 +5840,23 @@
         }
     }
 
+    /** Defines supported spaces */
     export enum Space {
+        /** Local (object) space */
         LOCAL = 0,
+        /** World space */
         WORLD = 1,
+        /** Bone space */
         BONE = 2
     }
 
+    /** Defines the 3 main axes */
     export class Axis {
+        /** X axis */
         public static X: Vector3 = new Vector3(1.0, 0.0, 0.0);
+        /** Y axis */
         public static Y: Vector3 = new Vector3(0.0, 1.0, 0.0);
+        /** Z axis */
         public static Z: Vector3 = new Vector3(0.0, 0.0, 1.0);
     };
 
@@ -5882,8 +5890,15 @@
         }
     }
 
+    /**
+     * Defines potential orientation for back face culling
+     */
     export enum Orientation {
+        /**
+         * Clockwise
+         */
         CW = 0,
+        /** Counter clockwise */
         CCW = 1
     }
 

+ 3 - 2
src/Mesh/babylon.meshSimplification.ts

@@ -114,10 +114,11 @@
     }
 
     /**
-     * The implemented types of simplification.
-     * At the moment only Quadratic Error Decimation is implemented.
+     * The implemented types of simplification
+     * At the moment only Quadratic Error Decimation is implemented
      */
     export enum SimplificationType {
+        /** Quadratic error decimation */
         QUADRATIC
     }
 

+ 8 - 4
src/Physics/babylon.physicsHelper.ts

@@ -634,16 +634,20 @@ module BABYLON {
     * The strenght of the force in correspondence to the distance of the affected object
     */
     export enum PhysicsRadialImpulseFalloff {
-        Constant, // impulse is constant in strength across it's whole radius
-        Linear // impulse gets weaker if it's further from the origin
+        /** Defines that impulse is constant in strength across it's whole radius */
+        Constant,
+        /** DEfines that impulse gets weaker if it's further from the origin */
+        Linear 
     }
 
     /**
      * The strenght of the force in correspondence to the distance of the affected object
      */
     export enum PhysicsUpdraftMode {
-        Center, // the upstream forces will pull towards the top center of the cylinder
-        Perpendicular // once a impostor is inside the cylinder, it will shoot out perpendicular from the ground of the cylinder
+        /** Defines that the upstream forces will pull towards the top center of the cylinder */
+        Center,
+        /** Defines that once a impostor is inside the cylinder, it will shoot out perpendicular from the ground of the cylinder */
+        Perpendicular
     }
 
 

+ 21 - 1
src/PostProcess/babylon.tonemapPostProcess.ts

@@ -1,14 +1,34 @@
 module BABYLON {
+    /** Defines operator used for tonemapping */
     export enum TonemappingOperator {
+        /** Hable */
         Hable = 0,
+        /** Reinhard */
         Reinhard = 1,
+        /** HejiDawson */
         HejiDawson = 2,
+        /** Photographic */
         Photographic = 3,
     };
 
+    /**
+     * Defines a post process to apply tone mapping
+     */
     export class TonemapPostProcess extends PostProcess {
 
-        constructor(name: string, private _operator: TonemappingOperator, public exposureAdjustment: number, camera: Camera, samplingMode: number = Texture.BILINEAR_SAMPLINGMODE, engine?: Engine, textureFormat = Engine.TEXTURETYPE_UNSIGNED_INT) {
+        /**
+         * Creates a new TonemapPostProcess
+         * @param name defines the name of the postprocess
+         * @param _operator defines the operator to use
+         * @param exposureAdjustment defines the required exposure adjustement
+         * @param camera defines the camera to use (can be null)
+         * @param samplingMode defines the required sampling mode (BABYLON.Texture.BILINEAR_SAMPLINGMODE by default)
+         * @param engine defines the hosting engine (can be ignore if camera is set)
+         * @param textureFormat defines the texture format to use (BABYLON.Engine.TEXTURETYPE_UNSIGNED_INT by default)
+         */
+        constructor(name: string, private _operator: TonemappingOperator, 
+            /** Defines the required exposure adjustement */
+            public exposureAdjustment: number, camera: Camera, samplingMode: number = Texture.BILINEAR_SAMPLINGMODE, engine?: Engine, textureFormat = Engine.TEXTURETYPE_UNSIGNED_INT) {
             super(name, "tonemap", ["_ExposureAdjustment"], null, 1.0, camera, samplingMode, engine, true, null, textureFormat);
 
             var defines = "#define ";

+ 44 - 2
src/Tools/babylon.virtualJoystick.ts

@@ -3,16 +3,37 @@
 // & on Seb Lee-Delisle original work: http://seb.ly/2011/04/multi-touch-game-controller-in-javascripthtml5-for-ipad/ 
 
 module BABYLON {
+    /**
+     * Defines the potential axis of a Joystick
+     */
     export enum JoystickAxis {
+        /** X axis */
         X,
+        /** Y axis */
         Y,
+        /** Z axis */
         Z
     }
 
+    /**
+     * Class used to define virtual joystick (used in touch mode)
+     */
     export class VirtualJoystick {
+        /**
+         * Gets or sets a boolean indicating that left and right values must be inverted
+         */
         public reverseLeftRight: boolean;
+        /**
+         * Gets or sets a boolean indicating that up and down values must be inverted
+         */
         public reverseUpDown: boolean;
+        /**
+         * Gets the offset value for the position (ie. the change of the position value)
+         */
         public deltaPosition: Vector3;
+        /**
+         * Gets a boolean indicating if the virtual joystick was pressed
+         */
         public pressed: boolean;
 
         // Used to draw the virtual joystick inside a 2D canvas on top of the WebGL rendering canvas
@@ -43,6 +64,10 @@ module BABYLON {
         private _onPointerUpHandlerRef: (e: PointerEvent) => any;
         private _onResize: (e: any) => any;
 
+        /**
+         * Creates a new virtual joystick
+         * @param leftJoystick defines that the joystick is for left hand (false by default)
+         */
         constructor(leftJoystick?: boolean) {
             if (leftJoystick) {
                 this._leftJoystick = true;
@@ -140,6 +165,10 @@ module BABYLON {
             requestAnimationFrame(() => { this._drawVirtualJoystick(); });
         }
 
+        /**
+         * Defines joystick sensibility (ie. the ratio beteen a physical move and virtual joystick position change)
+         * @param newJoystickSensibility defines the new sensibility
+         */
         public setJoystickSensibility(newJoystickSensibility: number) {
             this._joystickSensibility = newJoystickSensibility;
             this._inversedSensibility = 1 / (this._joystickSensibility / 1000);
@@ -249,11 +278,18 @@ module BABYLON {
             this._joystickColor = newColor;
         }
 
+        /**
+         * Defines a callback to call when the joystick is touched
+         * @param action defines the callback
+         */
         public setActionOnTouch(action: () => any) {
             this._action = action;
         }
 
-        // Define which axis you'd like to control for left & right 
+        /**
+         * Defines which axis you'd like to control for left & right 
+         * @param axis defines the axis to use
+         */
         public setAxisForLeftRight(axis: JoystickAxis) {
             switch (axis) {
                 case JoystickAxis.X:
@@ -267,7 +303,10 @@ module BABYLON {
             }
         }
 
-        // Define which axis you'd like to control for up & down 
+        /**
+         * Defines which axis you'd like to control for up & down 
+         * @param axis defines the axis to use
+         */
         public setAxisForUpDown(axis: JoystickAxis) {
             switch (axis) {
                 case JoystickAxis.X:
@@ -324,6 +363,9 @@ module BABYLON {
             requestAnimationFrame(() => { this._drawVirtualJoystick(); });
         }
 
+        /**
+         * Release internal HTML canvas
+         */
         public releaseCanvas() {
             if (VirtualJoystick.vjCanvas) {
                 VirtualJoystick.vjCanvas.removeEventListener('pointerdown', this._onPointerDownHandlerRef);