Browse Source

comment-corrections and var init

Raanan Weber 10 năm trước cách đây
mục cha
commit
4043dfe2b2

+ 1 - 0
Babylon/Collisions/babylon.collider.js

@@ -99,6 +99,7 @@ var BABYLON;
         Collider.prototype._testTriangle = function (faceIndex, trianglePlaneArray, p1, p2, p3, hasMaterial) {
             var t0;
             var embeddedInPlane = false;
+            //defensive programming, actually not needed.
             if (!trianglePlaneArray) {
                 trianglePlaneArray = [];
             }

+ 1 - 0
Babylon/Collisions/babylon.collider.ts

@@ -136,6 +136,7 @@
             var t0;
             var embeddedInPlane = false;
 
+            //defensive programming, actually not needed.
             if (!trianglePlaneArray) {
                 trianglePlaneArray = [];
             }

+ 1 - 1
Babylon/Collisions/babylon.collisionCoordinator.js

@@ -111,7 +111,7 @@ var BABYLON;
             this._toRemoveMeshesArray.push(mesh.uniqueId);
         };
         CollisionCoordinatorWorker.prototype.onGeometryAdded = function (geometry) {
-            //TODO this will break if the user uses his own function. This should be an array on callbacks!
+            //TODO this will break if the user uses his own function. This should be an array of callbacks!
             geometry.onGeometryUpdated = this.onGeometryUpdated;
             this.onGeometryUpdated(geometry);
         };

+ 1 - 1
Babylon/Collisions/babylon.collisionCoordinator.ts

@@ -208,7 +208,7 @@ module BABYLON {
         }
 
         public onGeometryAdded(geometry: Geometry) {
-            //TODO this will break if the user uses his own function. This should be an array on callbacks!
+            //TODO this will break if the user uses his own function. This should be an array of callbacks!
             geometry.onGeometryUpdated = this.onGeometryUpdated;
             this.onGeometryUpdated(geometry);
         }

+ 1 - 0
Babylon/Mesh/babylon.subMesh.js

@@ -12,6 +12,7 @@ var BABYLON;
             this._mesh = mesh;
             this._renderingMesh = renderingMesh || mesh;
             mesh.subMeshes.push(this);
+            this._trianglePlanes = [];
             this._id = mesh.subMeshes.length - 1;
             if (createBoundingBox) {
                 this.refreshBoundingInfo();

+ 2 - 0
Babylon/Mesh/babylon.subMesh.ts

@@ -20,6 +20,8 @@
             this._renderingMesh = renderingMesh || <Mesh>mesh;
             mesh.subMeshes.push(this);
 
+            this._trianglePlanes = [];
+
             this._id = mesh.subMeshes.length - 1;
 
             if (createBoundingBox) {