Added DataTexture, for creating textures out of raw data.
DataTexture can be used in the same places like image / video based Texture (WebGLRenderer-only). To be used like this: var width = 64, height = 64, bytes = 3; var data = new Uint8Array( width * height * bytes ); // fill data array with values 0 .. 255 var texture = DataTexture( data, width, height, THREE.RGBFormat ); texture.needsUpdate = true; For the moment only UNSIGNED_BYTE type is supported.
Showing
此差异已折叠。
src/materials/DataTexture.js
0 → 100644
想要评论请 注册 或 登录