DataTexture2DArray.js 600 字节
Newer Older
T
Takahiro 已提交
1 2 3
import { Texture } from './Texture.js';
import { ClampToEdgeWrapping, NearestFilter } from '../constants.js';

R
Rawr 已提交
4
class DataTexture2DArray extends Texture {
T
Takahiro 已提交
5

6
	constructor( data = null, width = 1, height = 1, depth = 1 ) {
T
Takahiro 已提交
7

R
Rawr 已提交
8
		super( null );
T
Takahiro 已提交
9

10
		this.image = { data, width, height, depth };
T
Takahiro 已提交
11

R
Rawr 已提交
12 13
		this.magFilter = NearestFilter;
		this.minFilter = NearestFilter;
T
Takahiro 已提交
14

R
Rawr 已提交
15
		this.wrapR = ClampToEdgeWrapping;
T
Takahiro 已提交
16

R
Rawr 已提交
17 18
		this.generateMipmaps = false;
		this.flipY = false;
19
		this.unpackAlignment = 1;
R
Rawr 已提交
20 21 22 23

		this.needsUpdate = true;

	}
G
gero3 已提交
24

T
Takahiro 已提交
25 26
}

27 28
DataTexture2DArray.prototype.isDataTexture2DArray = true;

T
Takahiro 已提交
29
export { DataTexture2DArray };