Преглед изворни кода

Adding Scene code comments - step 1

David Catuhe пре 7 година
родитељ
комит
09f231379a

Разлика између датотеке није приказан због своје велике величине
+ 14723 - 14673
dist/preview release/babylon.d.ts


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
dist/preview release/babylon.js


+ 35 - 1
dist/preview release/babylon.max.js

@@ -15708,7 +15708,7 @@ var BABYLON;
             /** @ignore */
             this._isDisposed = false;
             /**
-             * Gets a list of {BABYLON.Animation} associated with the node
+             * Gets a list of Animations associated with the node
              */
             this.animations = new Array();
             this._ranges = {};
@@ -21576,6 +21576,7 @@ var BABYLON;
 "use strict";
 var BABYLON;
 (function (BABYLON) {
+    /** @ignore */
     var ClickInfo = /** @class */ (function () {
         function ClickInfo() {
             this._singleClick = false;
@@ -21665,12 +21666,27 @@ var BABYLON;
          */
         function Scene(engine) {
             // Members
+            /**
+             * Gets or sets a boolean that indicates if the scene must clear the render buffer before rendering a frame
+             */
             this.autoClear = true;
+            /**
+             * Gets or sets a boolean that indicates if the scene must clear the depth and stencil buffers before rendering a frame
+             */
             this.autoClearDepthAndStencil = true;
+            /**
+             * Defines the color used to clear the render buffer (Default is (0.2, 0.2, 0.3, 1.0))
+             */
             this.clearColor = new BABYLON.Color4(0.2, 0.2, 0.3, 1.0);
+            /**
+             * Defines the color used to simulate the ambient color (Default is (0, 0, 0))
+             */
             this.ambientColor = new BABYLON.Color3(0, 0, 0);
             this._forceWireframe = false;
             this._forcePointsCloud = false;
+            /**
+             * Gets or sets a boolean indicating if all rendering must be done in point cloud
+             */
             this.forceShowBoundingBoxes = false;
             this.animationsEnabled = true;
             this.useConstantAnimationDeltaTime = false;
@@ -21682,6 +21698,10 @@ var BABYLON;
              * in order to block unwanted artifacts like system double clicks
              */
             this.preventDefaultOnPointerDown = true;
+            /**
+             * Gets a list of Animations associated with the node
+             */
+            this.animations = new Array();
             // Metadata
             this.metadata = null;
             /**
@@ -22100,6 +22120,9 @@ var BABYLON;
             get: function () {
                 return this._forceWireframe;
             },
+            /**
+             * Gets or sets a boolean indicating if all rendering must be done in wireframe
+             */
             set: function (value) {
                 if (this._forceWireframe === value) {
                     return;
@@ -22114,6 +22137,9 @@ var BABYLON;
             get: function () {
                 return this._forcePointsCloud;
             },
+            /**
+             * Gets or sets a boolean indicating if all rendering must be done in point cloud
+             */
             set: function (value) {
                 if (this._forcePointsCloud === value) {
                     return;
@@ -25987,7 +26013,15 @@ var BABYLON;
         Scene._FOGMODE_EXP2 = 2;
         Scene._FOGMODE_LINEAR = 3;
         Scene._uniqueIdCounter = 0;
+        /**
+         * Gets or sets the minimum deltatime when deterministic lock step is enabled
+         * @see http://doc.babylonjs.com/babylon101/animations#deterministic-lockstep
+         */
         Scene.MinDeltaTime = 1.0;
+        /**
+         * Gets or sets the maximum deltatime when deterministic lock step is enabled
+         * @see http://doc.babylonjs.com/babylon101/animations#deterministic-lockstep
+         */
         Scene.MaxDeltaTime = 1000.0;
         /** The distance in pixel that you have to move to prevent some events */
         Scene.DragMovementThreshold = 10; // in pixels

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
dist/preview release/babylon.worker.js


+ 35 - 1
dist/preview release/es6.js

@@ -15675,7 +15675,7 @@ var BABYLON;
             /** @ignore */
             this._isDisposed = false;
             /**
-             * Gets a list of {BABYLON.Animation} associated with the node
+             * Gets a list of Animations associated with the node
              */
             this.animations = new Array();
             this._ranges = {};
@@ -21543,6 +21543,7 @@ var BABYLON;
 "use strict";
 var BABYLON;
 (function (BABYLON) {
+    /** @ignore */
     var ClickInfo = /** @class */ (function () {
         function ClickInfo() {
             this._singleClick = false;
@@ -21632,12 +21633,27 @@ var BABYLON;
          */
         function Scene(engine) {
             // Members
+            /**
+             * Gets or sets a boolean that indicates if the scene must clear the render buffer before rendering a frame
+             */
             this.autoClear = true;
+            /**
+             * Gets or sets a boolean that indicates if the scene must clear the depth and stencil buffers before rendering a frame
+             */
             this.autoClearDepthAndStencil = true;
+            /**
+             * Defines the color used to clear the render buffer (Default is (0.2, 0.2, 0.3, 1.0))
+             */
             this.clearColor = new BABYLON.Color4(0.2, 0.2, 0.3, 1.0);
+            /**
+             * Defines the color used to simulate the ambient color (Default is (0, 0, 0))
+             */
             this.ambientColor = new BABYLON.Color3(0, 0, 0);
             this._forceWireframe = false;
             this._forcePointsCloud = false;
+            /**
+             * Gets or sets a boolean indicating if all rendering must be done in point cloud
+             */
             this.forceShowBoundingBoxes = false;
             this.animationsEnabled = true;
             this.useConstantAnimationDeltaTime = false;
@@ -21649,6 +21665,10 @@ var BABYLON;
              * in order to block unwanted artifacts like system double clicks
              */
             this.preventDefaultOnPointerDown = true;
+            /**
+             * Gets a list of Animations associated with the node
+             */
+            this.animations = new Array();
             // Metadata
             this.metadata = null;
             /**
@@ -22067,6 +22087,9 @@ var BABYLON;
             get: function () {
                 return this._forceWireframe;
             },
+            /**
+             * Gets or sets a boolean indicating if all rendering must be done in wireframe
+             */
             set: function (value) {
                 if (this._forceWireframe === value) {
                     return;
@@ -22081,6 +22104,9 @@ var BABYLON;
             get: function () {
                 return this._forcePointsCloud;
             },
+            /**
+             * Gets or sets a boolean indicating if all rendering must be done in point cloud
+             */
             set: function (value) {
                 if (this._forcePointsCloud === value) {
                     return;
@@ -25954,7 +25980,15 @@ var BABYLON;
         Scene._FOGMODE_EXP2 = 2;
         Scene._FOGMODE_LINEAR = 3;
         Scene._uniqueIdCounter = 0;
+        /**
+         * Gets or sets the minimum deltatime when deterministic lock step is enabled
+         * @see http://doc.babylonjs.com/babylon101/animations#deterministic-lockstep
+         */
         Scene.MinDeltaTime = 1.0;
+        /**
+         * Gets or sets the maximum deltatime when deterministic lock step is enabled
+         * @see http://doc.babylonjs.com/babylon101/animations#deterministic-lockstep
+         */
         Scene.MaxDeltaTime = 1000.0;
         /** The distance in pixel that you have to move to prevent some events */
         Scene.DragMovementThreshold = 10; // in pixels

Разлика између датотеке није приказан због своје велике величине
+ 0 - 2050
dist/preview release/typedocValidationBaseline.json


+ 1 - 1
dist/preview release/what's new.md

@@ -23,7 +23,7 @@
 - Introduces [PCF](https://doc.babylonjs.com/babylon101/shadows#percentage-closer-filtering-webgl2-only) and [PCSS](https://doc.babylonjs.com/babylon101/shadows#contact-hardening-shadow-webgl2-only) shadow support in Webgl 2 ([sebavan](https://github.com/sebavan)))
 
 ## Documentation
-- Tons of functions and classes received the code comments they deserved (All the community)
+- Tons of functions and classes received the code comments they deserved (All the community with a special thanks to [John King](https://github.com/BabylonJSGuide))
 - Moved the class API documentation to Typedoc ([deltakosh](https://github.com/deltakosh))
 
 ## Updates

+ 3 - 3
src/Materials/Textures/Procedurals/babylon.proceduralTexture.ts

@@ -33,7 +33,7 @@
         constructor(name: string, size: any, fragment: any, scene: Scene, fallbackTexture: Nullable<Texture> = null, generateMipMaps = true, public isCube = false) {
             super(null, scene, !generateMipMaps);
 
-            scene._proceduralTextures.push(this);
+            scene.proceduralTextures.push(this);
 
             this._engine = scene.getEngine();
 
@@ -384,10 +384,10 @@
                 return;
             }
 
-            var index = scene._proceduralTextures.indexOf(this);
+            var index = scene.proceduralTextures.indexOf(this);
 
             if (index >= 0) {
-                scene._proceduralTextures.splice(index, 1);
+                scene.proceduralTextures.splice(index, 1);
             }
 
             var vertexBuffer = this._vertexBuffers[VertexBuffer.PositionKind];

+ 1 - 1
src/babylon.node.ts

@@ -43,7 +43,7 @@
         public _isDisposed = false;        
 
         /**
-         * Gets a list of {BABYLON.Animation} associated with the node
+         * Gets a list of Animations associated with the node
          */
         public animations = new Array<Animation>();
         private _ranges: { [name: string]: Nullable<AnimationRange> } = {};

Разлика између датотеке није приказан због своје велике величине
+ 467 - 47
src/babylon.scene.ts