提交 b1c8931d 编写于 作者: A artur.trzesiok

Texture3d support

上级 1b4a538b
......@@ -2357,6 +2357,7 @@ function WebGLRenderer( parameters ) {
// backwards compatibility: peel texture.texture
return function setTexture3D( texture, slot ) {
textures.setTexture3D( texture, slot );
};
......
/**
* @author Artur Trzesiok
*/
import {Texture} from './Texture.js';
import {NearestFilter} from '../constants.js';
function Texture3D(data, width, height, length, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding) {
Texture.call(this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding);
this.image = {data: data, width: width, height: height, length: length};
this.magFilter = magFilter !== undefined ? magFilter : NearestFilter;
this.minFilter = minFilter !== undefined ? minFilter : NearestFilter;
this.generateMipmaps = false;
this.flipY = false;
}
Texture3D.prototype = Object.create(Texture.prototype);
Texture3D.prototype.constructor = Texture3D;
Texture3D.prototype.isTexture3D = true;
export {Texture3D};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册