|
@@ -3,14 +3,14 @@ import { NearestFilter } from '../constants.js';
|
|
|
|
|
|
class DataTexture extends Texture {
|
|
class DataTexture extends Texture {
|
|
|
|
|
|
- constructor( data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding ) {
|
|
|
|
|
|
+ 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 );
|
|
super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
|
|
|
|
|
|
- this.image = { data: data || null, width: width || 1, height: height || 1 };
|
|
|
|
|
|
+ this.image = { data: data, width: width, height: height };
|
|
|
|
|
|
- this.magFilter = magFilter !== undefined ? magFilter : NearestFilter;
|
|
|
|
- this.minFilter = minFilter !== undefined ? minFilter : NearestFilter;
|
|
|
|
|
|
+ this.magFilter = magFilter;
|
|
|
|
+ this.minFilter = minFilter;
|
|
|
|
|
|
this.generateMipmaps = false;
|
|
this.generateMipmaps = false;
|
|
this.flipY = false;
|
|
this.flipY = false;
|