Skip to content

Commit b2ca569

Browse files
authored
Merge pull request #14964 from takahirox/RenameTexture3D
Rename Texture3D to DataTexture3D
2 parents d718ff7 + b59cdc0 commit b2ca569

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

examples/webgl_materials_texture3d.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
var zip = new JSZip( data );
120120
var array = zip.files[ 'head256x256x109' ].asUint8Array();
121121

122-
var texture = new THREE.Texture3D( array, 256, 256, 109 );
122+
var texture = new THREE.DataTexture3D( array, 256, 256, 109 );
123123

124124
texture.format = THREE.RedFormat;
125125
texture.type = THREE.UnsignedByteType;

examples/webgl_materials_texture3d_volume.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
// THREEJS will select R32F (33326) based on the RedFormat and FloatType.
122122
// Also see https://www.khronos.org/registry/webgl/specs/latest/2.0/#TEXTURE_TYPES_FORMATS_FROM_DOM_ELEMENTS_TABLE
123123
// TODO: look the dtype up in the volume metadata
124-
var texture = new THREE.Texture3D( volume.data, volume.xLength, volume.yLength, volume.zLength );
124+
var texture = new THREE.DataTexture3D( volume.data, volume.xLength, volume.yLength, volume.zLength );
125125
texture.format = THREE.RedFormat;
126126
texture.type = THREE.FloatType;
127127
texture.minFilter = texture.magFilter = THREE.LinearFilter;

src/Three.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export { Points } from './objects/Points.js';
2424
export { Group } from './objects/Group.js';
2525
export { VideoTexture } from './textures/VideoTexture.js';
2626
export { DataTexture } from './textures/DataTexture.js';
27-
export { Texture3D } from './textures/Texture3D.js';
27+
export { DataTexture3D } from './textures/DataTexture3D.js';
2828
export { CompressedTexture } from './textures/CompressedTexture.js';
2929
export { CubeTexture } from './textures/CubeTexture.js';
3030
export { CanvasTexture } from './textures/CanvasTexture.js';

src/renderers/webgl/WebGLTextures.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
489489

490490
var textureType;
491491

492-
if ( texture.isTexture3D ) {
492+
if ( texture.isDataTexture3D ) {
493493

494494
textureType = _gl.TEXTURE_3D;
495495

@@ -648,7 +648,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
648648

649649
textureProperties.__maxMipLevel = mipmaps.length - 1;
650650

651-
} else if ( texture.isTexture3D ) {
651+
} else if ( texture.isDataTexture3D ) {
652652

653653
state.texImage3D( _gl.TEXTURE_3D, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data );
654654
textureProperties.__maxMipLevel = 0;

src/renderers/webgl/WebGLUniforms.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@
5151

5252
import { CubeTexture } from '../../textures/CubeTexture.js';
5353
import { Texture } from '../../textures/Texture.js';
54-
import { Texture3D } from '../../textures/Texture3D.js';
54+
import { DataTexture3D } from '../../textures/DataTexture3D.js';
5555

5656
var emptyTexture = new Texture();
57-
var emptyTexture3d = new Texture3D();
57+
var emptyTexture3d = new DataTexture3D();
5858
var emptyCubeTexture = new CubeTexture();
5959

6060
// --- Base for inner nodes (including the root) ---

src/textures/Texture3D.js renamed to src/textures/DataTexture3D.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
import { Texture } from './Texture.js';
66
import { NearestFilter } from '../constants.js';
77

8-
function Texture3D( data, width, height, depth ) {
8+
function DataTexture3D( data, width, height, depth ) {
99

1010
// We're going to add .setXXX() methods for setting properties later.
11-
// Users can still set in Texture3D directly.
11+
// Users can still set in DataTexture3D directly.
1212
//
13-
// var texture = new THREE.Texture3D( data, width, height, depth );
13+
// var texture = new THREE.DataTexture3D( data, width, height, depth );
1414
// texture.anisotropy = 16;
1515
//
1616
// See #14839
@@ -27,8 +27,8 @@ function Texture3D( data, width, height, depth ) {
2727

2828
}
2929

30-
Texture3D.prototype = Object.create( Texture.prototype );
31-
Texture3D.prototype.constructor = Texture3D;
32-
Texture3D.prototype.isTexture3D = true;
30+
DataTexture3D.prototype = Object.create( Texture.prototype );
31+
DataTexture3D.prototype.constructor = DataTexture3D;
32+
DataTexture3D.prototype.isDataTexture3D = true;
3333

34-
export { Texture3D };
34+
export { DataTexture3D };

0 commit comments

Comments
 (0)