Bläddra i källkod

DepthTexture: Use ES6 default parameters. (#28367)

林炳权 1 år sedan
förälder
incheckning
c52eebb614
1 ändrade filer med 1 tillägg och 3 borttagningar
  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 ) {