0

Just like https://threejs.org/examples/?q=morph#webgl_morphtargets_human, but I want to implement a glTF based demo .

I had tried glTF models such as https://github.com/HowardWolosky/glTF-Sample-Models/tree/morphAnimation/2.0/AnimatedMorphCube and https://github.com/HowardWolosky/glTF-Sample-Models/tree/morphAnimation/2.0/AnimatedMorphSphere, but they use animations, I want to control the morph weights manually, like:

mesh.morphTargetInfluences[0] = 0.5;
mesh.morphTargetInfluences[1] = 0;
mesh.morphTargetInfluences[2] = 1;


Thanks

Samuel
  • 127
  • 7
  • Are you asking how to make a glTF file with morph targets? Or you have one, and the control code above isn't working? – Don McCurdy Jul 18 '17 at 14:01
  • 1
    @DonMcCurdy I'm the guy who make a pull request yesterday, I had solve this problem, thanks – Samuel Jul 20 '17 at 03:12
  • Oh hi, great! It might be good to move your code (how to load the glTF, how to change the influences) into your answer below, to help others who find this question. – Don McCurdy Jul 22 '17 at 00:04

1 Answers1

0

I had solve this question myself by changing code in gltfloader.js. see https://github.com/mrdoob/three.js/pull/11786#issuecomment-316423788

Samuel
  • 127
  • 7