|
@@ -2613,7 +2613,13 @@ THREE.GLTFLoader = ( function () {
|
|
|
? new THREE.SkinnedMesh( geometry, material )
|
|
|
: new THREE.Mesh( geometry, material );
|
|
|
|
|
|
- if ( mesh.isSkinnedMesh === true ) mesh.normalizeSkinWeights(); // #15319
|
|
|
+ if ( mesh.isSkinnedMesh === true && !mesh.geometry.attributes.skinWeight.normalized ) {
|
|
|
+
|
|
|
+ // we normalize floating point skin weight array to fix malformed assets (see #15319)
|
|
|
+ // it's important to skip this for non-float32 data since normalizeSkinWeights assumes non-normalized inputs
|
|
|
+ mesh.normalizeSkinWeights();
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
if ( primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP ) {
|
|
|
|