Преглед на файлове

Update GLTFExporter.js

As described in gltf specification, (UNSIGNED_INT) is 4 bytes. 
This commit solve the fact that the exporter failed to export correctly assets containing faces with vertexe's indexes above than 255.
selimbek преди 7 години
родител
ревизия
76eed436df
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      examples/js/exporters/GLTFExporter.js

+ 1 - 1
examples/js/exporters/GLTFExporter.js

@@ -241,7 +241,7 @@ THREE.GLTFExporter.prototype = {
 
 					} else if ( componentType === WEBGL_CONSTANTS.UNSIGNED_INT ) {
 
-						dataView.setUint8( offset, value, true );
+						dataView.setUint32( offset, value, true );
 
 					} else if ( componentType === WEBGL_CONSTANTS.UNSIGNED_SHORT ) {