Explorar o código

Optimise Mesh._GetDefaultSideOrientation

thscott %!s(int64=6) %!d(string=hai) anos
pai
achega
c06f429120
Modificáronse 1 ficheiros con 1 adicións e 9 borrados
  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