Explorar o código

Reorder switch cases

Nicolas Buecher %!s(int64=7) %!d(string=hai) anos
pai
achega
52affac0f5
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      src/Tools/babylon.decorators.ts

+ 3 - 3
src/Tools/babylon.decorators.ts

@@ -24,6 +24,9 @@
                     case 6:     // Mesh reference
                         (<any>destination)[property] = sourceProperty;
                         break;
+                    case 1:     // Texture
+                        (<any>destination)[property] = (instanciate||sourceProperty.isRenderTarget)?sourceProperty:sourceProperty.clone();
+                        break;
                     case 2:     // Color3
                     case 3:     // FresnelParameters
                     case 4:     // Vector2
@@ -31,9 +34,6 @@
                     case 7:     // Color Curves
                         (<any>destination)[property] = instanciate?sourceProperty:sourceProperty.clone();
                         break;
-                    case 1:     // Texture
-                        (<any>destination)[property] = (instanciate||sourceProperty.isRenderTarget)?sourceProperty:sourceProperty.clone();
-                        break;
                 }
             }
         }