Procházet zdrojové kódy

DepthTexture: Use ES6 default parameters. (#28367)

林炳权 před 1 rokem
rodič
revize
c52eebb614
1 změnil soubory, kde provedl 1 přidání a 3 odebrání
  1. 1 3
      src/textures/DepthTexture.js

+ 1 - 3
src/textures/DepthTexture.js

@@ -3,9 +3,7 @@ import { NearestFilter, UnsignedIntType, UnsignedInt248Type, DepthFormat, DepthS
 
 class DepthTexture extends Texture {
 
-	constructor( width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format ) {
-
-		format = format !== undefined ? format : DepthFormat;
+	constructor( width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format = DepthFormat ) {
 
 		if ( format !== DepthFormat && format !== DepthStencilFormat ) {