File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -926,6 +926,17 @@ THREE.GLTFExporter.prototype = {
926926 var attribute = geometry . attributes [ attributeName ] ;
927927 attributeName = nameConversion [ attributeName ] || attributeName . toUpperCase ( ) ;
928928
929+ // JOINTS_0 must be UNSIGNED_BYTE or UNSIGNED_SHORT.
930+ if ( attributeName === 'JOINTS_0' &&
931+ ! ( attribute instanceof THREE . Uint16BufferAttribute ) &&
932+ ! ( attribute instanceof THREE . Uint8BufferAttribute ) ) {
933+
934+ console . warn ( 'GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.' ) ;
935+
936+ attribute = new THREE . Uint16BufferAttribute ( attribute . array , attribute . itemSize , attribute . normalized ) ;
937+
938+ }
939+
929940 if ( attributeName . substr ( 0 , 5 ) !== 'MORPH' ) {
930941
931942 attributes [ attributeName ] = processAccessor ( attribute , geometry ) ;
You can’t perform that action at this time.
0 commit comments