就像https://threejs.org/examples/?q=morph#webgl_morphtargets_human, 但我想實現一個基於glTF的演示。如何使用gltf實現morphtargets人體演示?
我曾試圖glTF模型如https://github.com/HowardWolosky/glTF-Sample-Models/tree/morphAnimation/2.0/AnimatedMorphCube和https://github.com/HowardWolosky/glTF-Sample-Models/tree/morphAnimation/2.0/AnimatedMorphSphere,但它們使用動畫,我想手動控制變形的權重,如:
mesh.morphTargetInfluences [0] = 0.5;
mesh.morphTargetInfluences [1] = 0;
mesh.morphTargetInfluences [2] = 1;
感謝
你問如何使用變形目標製作glTF文件?或者你有一個,上面的控制代碼不起作用? –
@DonMcCurdy我是昨天提出要求的人,我已經解決了這個問題,謝謝 – Samuel
呵呵,太棒了!將代碼(如何加載glTF,如何改變影響)移動到下面的答案中可能會更好,以幫助其他人找到這個問題。 –