Parcourir la source

DepthTexture: Use ES6 default parameters. (#28367)

林炳权 il y a 1 an
Parent
commit
c52eebb614
1 fichiers modifiés avec 1 ajouts et 3 suppressions
  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 ) {