浏览代码

Merge pull request #11098 from Mugen87/dev

Blender Exporter: Avoid using MorphAnimMesh
Mr.doob 8 年之前
父节点
当前提交
95728fbd6c
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      utils/exporters/blender/tests/scripts/js/review.js

+ 3 - 2
utils/exporters/blender/tests/scripts/js/review.js

@@ -147,13 +147,14 @@ function loadGeometry( data, url ) {
 
 
     } else {
     } else {
 
 
+        mesh = new THREE.Mesh( data.geometry, material );
+
         if ( data.geometry.morphTargets.length > 0 ) {
         if ( data.geometry.morphTargets.length > 0 ) {
 
 
             console.log( 'loading morph targets' );
             console.log( 'loading morph targets' );
             data.materials[ 0 ].morphTargets = true;
             data.materials[ 0 ].morphTargets = true;
-            mesh = new THREE.MorphAnimMesh( data.geometry, material );
 
 
-            mixer = mesh.mixer;
+            mixer = new THREE.AnimationMixer( mesh );
             animation = mixer.clipAction( mesh.geometry.animations[ 0 ] );
             animation = mixer.clipAction( mesh.geometry.animations[ 0 ] );
             hasMorph = true;
             hasMorph = true;