diff --git a/examples/js/exporters/GLTFExporter.js b/examples/js/exporters/GLTFExporter.js index 642d2042fbeb6b78d0893f33fd033db2e920f3c2..68b97a8ddf08f64849f9e83e565031a14a55201b 100644 --- a/examples/js/exporters/GLTFExporter.js +++ b/examples/js/exporters/GLTFExporter.js @@ -792,6 +792,7 @@ THREE.GLTFExporter.prototype = { // Morph targets if ( mesh.morphTargetInfluences !== undefined && mesh.morphTargetInfluences.length > 0 ) { + var weights = []; gltfMesh.primitives[ 0 ].targets = []; for ( var i = 0; i < mesh.morphTargetInfluences.length; ++ i ) { @@ -808,8 +809,12 @@ THREE.GLTFExporter.prototype = { gltfMesh.primitives[ 0 ].targets.push( target ); + weights.push( mesh.morphTargetInfluences[ i ] ); + } + gltfMesh.weights = weights; + } outputJSON.meshes.push( gltfMesh );