@@ -6,12 +6,12 @@ class CanvasTexture extends Texture {
super( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
- Object.defineProperty( this, 'isCanvasTexture', { value: true } );
-
this.needsUpdate = true;
}
+CanvasTexture.prototype.isCanvasTexture = true;
+
export { CanvasTexture };
@@ -6,8 +6,6 @@ class CompressedTexture extends Texture {
super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
- Object.defineProperty( this, 'isCompressedTexture', { value: true } );
this.image = { width: width, height: height };
this.mipmaps = mipmaps;
@@ -25,4 +23,6 @@ class CompressedTexture extends Texture {
+CompressedTexture.prototype.isCompressedTexture = true;
export { CompressedTexture };
@@ -11,8 +11,6 @@ class CubeTexture extends Texture {
super( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
- Object.defineProperty( this, 'isCubeTexture', { value: true } );
// Why CubeTexture._needsFlipEnvMap is necessary:
//
// By convention -- likely based on the RenderMan spec from the 1990's -- cube maps are specified by WebGL (and three.js)
@@ -43,4 +41,6 @@ class CubeTexture extends Texture {
+CubeTexture.prototype.isCubeTexture = true;
export { CubeTexture };
@@ -7,8 +7,6 @@ class DataTexture extends Texture {
- Object.defineProperty( this, 'isDataTexture', { value: true } );
this.image = { data: data || null, width: width || 1, height: height || 1 };
this.magFilter = magFilter !== undefined ? magFilter : NearestFilter;
@@ -24,4 +22,6 @@ class DataTexture extends Texture {
+DataTexture.prototype.isDataTexture = true;
export { DataTexture };
@@ -7,8 +7,6 @@ class DataTexture2DArray extends Texture {
super( null );
- Object.defineProperty( this, 'isDataTexture2DArray', { value: true } );
this.image = { data, width, height, depth };
this.magFilter = NearestFilter;
@@ -25,4 +23,6 @@ class DataTexture2DArray extends Texture {
+DataTexture2DArray.prototype.isDataTexture2DArray = true;
export { DataTexture2DArray };
@@ -15,8 +15,6 @@ class DataTexture3D extends Texture {
- Object.defineProperty( this, 'isDataTexture3D', { value: true } );
@@ -33,4 +31,6 @@ class DataTexture3D extends Texture {
+DataTexture3D.prototype.isDataTexture3D = true;
export { DataTexture3D };
@@ -18,8 +18,6 @@ class DepthTexture extends Texture {
super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
- Object.defineProperty( this, 'isDepthTexture', { value: true } );
@@ -33,4 +31,6 @@ class DepthTexture extends Texture {
+DepthTexture.prototype.isDepthTexture = true;
export { DepthTexture };
@@ -7,8 +7,6 @@ class VideoTexture extends Texture {
super( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
- Object.defineProperty( this, 'isVideoTexture', { value: true } );
this.format = format !== undefined ? format : RGBFormat;
this.minFilter = minFilter !== undefined ? minFilter : LinearFilter;
@@ -54,4 +52,6 @@ class VideoTexture extends Texture {
+VideoTexture.prototype.isVideoTexture = true;
export { VideoTexture };