Sfoglia il codice sorgente

Merge pull request #5903 from thscott/GetDefaultSideOrientation

Optimise Mesh._GetDefaultSideOrientation
David Catuhe 6 anni fa
parent
commit
0cc5e1b57b
1 ha cambiato i file con 1 aggiunte e 9 eliminazioni
  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