浏览代码

Merge pull request #15902 from takahirox/CleanUp3DTexture

Minor DataTexture3D Clean up
Mr.doob 6 年之前
父节点
当前提交
4e1c1a04dc
共有 3 个文件被更改,包括 6 次插入11 次删除
  1. 3 8
      src/renderers/WebGLRenderer.js
  2. 1 1
      src/renderers/webgl/WebGLUniforms.js
  3. 2 2
      src/textures/DataTexture3D.d.ts

+ 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 () {
 	this.setTexture = ( function () {
 
 

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

@@ -476,7 +476,7 @@ function getSingularSetter( type ) {
 		case 0x8b5c: return setValue4fm; // _MAT4
 		case 0x8b5c: return setValue4fm; // _MAT4
 
 
 		case 0x8b5e: case 0x8d66: return setValueT1; // SAMPLER_2D, SAMPLER_EXTERNAL_OES
 		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 0x8b60: return setValueT6; // SAMPLER_CUBE
 
 
 		case 0x1404: case 0x8b56: return setValue1i; // INT, BOOL
 		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(
   constructor(
     data: ArrayBuffer | TypedArray,
     data: ArrayBuffer | TypedArray,
     width: number,
     width: number,
-    heighht: number,
-    depth?: number
+    height: number,
+    depth: number
   );
   );
 }
 }