Parcourir la source

Optimise Mesh._GetDefaultSideOrientation

thscott il y a 6 ans
Parent
commit
c06f429120
1 fichiers modifiés avec 1 ajouts et 9 suppressions
  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