未验证 提交 f6266518 编写于 作者: J John DeCorato 提交者: GitHub

Fixed bug with indexing

上级 de669872
......@@ -137,14 +137,15 @@ var KhronosTextureContainer = ( function () {
for ( var level = 0; level < mipmapCount; level ++ ) {
var imageSize = new Int32Array( this.arrayBuffer, dataOffset, 1 )[ 0 ]; // size per face, since not supporting array cubemaps
dataOffset += imageSize + 4; // size of the image + 4 for the imageSize field
dataOffset += 4; // size of the image + 4 for the imageSize field
for ( var face = 0; face < this.numberOfFaces; face ++ ) {
var byteArray = new Uint8Array( this.arrayBuffer, dataOffset + 4, imageSize );
var byteArray = new Uint8Array( this.arrayBuffer, dataOffset, imageSize );
mipmaps.push( { "data": byteArray, "width": width, "height": height } );
dataOffset += imageSize;
dataOffset += 3 - ( ( imageSize + 3 ) % 4 ); // add padding for odd sized image
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册