未验证 提交 bf8383d0 编写于 作者: E Elias Hasle 提交者: GitHub

Always init true, default data to null

上级 5ca1fd0b
......@@ -9,7 +9,7 @@ function DataTexture( data, width, height, format, type, mapping, wrapS, wrapT,
Texture.call( this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
this.image = { data: data, width: width, height: height };
this.image = { data: data || null, width: width || 1, height: height || 1 };
this.magFilter = magFilter !== undefined ? magFilter : NearestFilter;
this.minFilter = minFilter !== undefined ? minFilter : NearestFilter;
......@@ -18,11 +18,8 @@ function DataTexture( data, width, height, format, type, mapping, wrapS, wrapT,
this.flipY = false;
this.unpackAlignment = 1;
if ( data ) {
this.needsUpdate = true;
this.needsUpdate = true;
}
}
DataTexture.prototype = Object.create( Texture.prototype );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册