Explorar o código

Merge pull request #15902 from takahirox/CleanUp3DTexture

Minor DataTexture3D Clean up
Mr.doob %!s(int64=6) %!d(string=hai) anos
pai
achega
4e1c1a04dc

+ 3 - 8
src/renderers/WebGLRenderer.js

@@ -2462,16 +2462,11 @@ function WebGLRenderer( parameters ) {
 
 	}() );
 
-	this.setTexture3D = ( function () {
+	this.setTexture3D = function ( texture, slot ) {
 
-		// backwards compatibility: peel texture.texture
-		return function setTexture3D( texture, slot ) {
-
-			textures.setTexture3D( texture, slot );
-
-		};
+		textures.setTexture3D( texture, slot );
 
-	}() );
+	};
 
 	this.setTexture = ( function () {
 

+ 1 - 1
src/renderers/webgl/WebGLUniforms.js

@@ -476,7 +476,7 @@ function getSingularSetter( type ) {
 		case 0x8b5c: return setValue4fm; // _MAT4
 
 		case 0x8b5e: case 0x8d66: return setValueT1; // SAMPLER_2D, SAMPLER_EXTERNAL_OES
-		case 0x8B5F: return setValueT3D1; // SAMPLER_3D
+		case 0x8b5f: return setValueT3D1; // SAMPLER_3D
 		case 0x8b60: return setValueT6; // SAMPLER_CUBE
 
 		case 0x1404: case 0x8b56: return setValue1i; // INT, BOOL

+ 2 - 2
src/textures/DataTexture3D.d.ts

@@ -6,7 +6,7 @@ export class DataTexture3D extends Texture {
   constructor(
     data: ArrayBuffer | TypedArray,
     width: number,
-    heighht: number,
-    depth?: number
+    height: number,
+    depth: number
   );
 }