Spaces:
Running
Running
File size: 694 Bytes
2b7aae2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | import { Texture } from './Texture.js';
import { NearestFilter } from '../constants.js';
class DataTexture extends Texture {
constructor(
data = null,
width = 1,
height = 1,
format,
type,
mapping,
wrapS,
wrapT,
magFilter = NearestFilter,
minFilter = NearestFilter,
anisotropy,
encoding
) {
super(null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding);
this.image = { data: data, width: width, height: height };
this.magFilter = magFilter;
this.minFilter = minFilter;
this.generateMipmaps = false;
this.flipY = false;
this.unpackAlignment = 1;
}
}
DataTexture.prototype.isDataTexture = true;
export { DataTexture };
|