فهرست منبع

Merge pull request #11469 from andreyyudin/dev

Fix of handling data for UInt32 VTP headers in VTKLoader
Mr.doob 8 سال پیش
والد
کامیت
8c84da36cf
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      examples/js/loaders/VTKLoader.js

+ 2 - 1
examples/js/loaders/VTKLoader.js

@@ -743,7 +743,8 @@ Object.assign( THREE.VTKLoader.prototype, THREE.EventDispatcher.prototype, {
 						for ( var i = 0; i<blocks; i++ ) {
 							var currentBlockSize = byteData[i*numBytes + cSizeStart];
 							for ( var j = 1; j<numBytes-1; j++ ) {
-								currentBlockSize = currentBlockSize | ( byteData[i*numBytes + cSizeStart + j] << (j*numBytes) );
+								// Each data point consists of 8 bytes regardless of the header type
+								currentBlockSize = currentBlockSize | ( byteData[i*numBytes + cSizeStart + j] << (j*8) );
 							}
 							
 							currentOffset = currentOffset + currentBlockSize;