Browse Source

Optimise Mesh._GetDefaultSideOrientation

thscott 6 năm trước cách đây
mục cha
commit
c06f429120
1 tập tin đã thay đổi với 1 bổ sung9 xóa
  1. 1 9
      src/Meshes/mesh.ts

+ 1 - 9
src/Meshes/mesh.ts

@@ -140,15 +140,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
      * @hidden
      */
     public static _GetDefaultSideOrientation(orientation?: number): number {
-        if (orientation == Mesh.DOUBLESIDE) {
-            return Mesh.DOUBLESIDE;
-        }
-
-        if (orientation === undefined || orientation === null) {
-            return Mesh.FRONTSIDE;
-        }
-
-        return orientation;
+        return orientation || Mesh.FRONTSIDE; // works as Mesh.FRONTSIDE is 0
     }
 
     // Events