File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -926,6 +926,15 @@ 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+ attribute = new THREE . Uint16BufferAttribute ( new Uint16Array ( attribute . array ) , attribute . itemSize , attribute . normalized ) ;
935+
936+ }
937+
929938 if ( attributeName . substr ( 0 , 5 ) !== 'MORPH' ) {
930939
931940 attributes [ attributeName ] = processAccessor ( attribute , geometry ) ;
You can’t perform that action at this time.
0 commit comments