|
@@ -852,10 +852,10 @@ export class GLTFLoader implements IGLTFLoader {
|
|
|
throw new Error(`${context}: Primitives do not have the same number of targets`);
|
|
|
}
|
|
|
|
|
|
- babylonMesh.morphTargetManager = new MorphTargetManager();
|
|
|
+ babylonMesh.morphTargetManager = new MorphTargetManager(babylonMesh.getScene());
|
|
|
for (let index = 0; index < primitive.targets.length; index++) {
|
|
|
const weight = node.weights ? node.weights[index] : mesh.weights ? mesh.weights[index] : 0;
|
|
|
- babylonMesh.morphTargetManager.addTarget(new MorphTarget(`morphTarget${index}`, weight));
|
|
|
+ babylonMesh.morphTargetManager.addTarget(new MorphTarget(`morphTarget${index}`, weight, babylonMesh.getScene()));
|
|
|
// TODO: tell the target whether it has positions, normals, tangents
|
|
|
}
|
|
|
}
|