Try to correct faces.
This commit is contained in:
parent
ab93c7147f
commit
9420ecd626
15
herosaver.js
15
herosaver.js
|
@ -149,6 +149,19 @@ function init() {
|
|||
|
||||
for (var k = 0; k < 4; k++) {
|
||||
|
||||
if (mesh.geometry.morphTargets !== 'undefined') {
|
||||
var tempVector = new THREE.Vector4(morphVector.x, morphVector.y, morphVector.z);
|
||||
} else {
|
||||
var tempVector = new THREE.Vector4(vector.x, vector.y, vector.z);
|
||||
}
|
||||
|
||||
tempVector.multiplyScalar(weights[k]);
|
||||
//the inverse takes the vector into local bone space
|
||||
//which is then transformed to the appropriate world space
|
||||
tempVector.applyMatrix4(inverses[k]).applyMatrix4(skinMatrices[k]);
|
||||
finalVector.add(tempVector);
|
||||
|
||||
/*
|
||||
var tempVector = new THREE.Vector4(vector.x, vector.y, vector.z);
|
||||
tempVector.multiplyScalar(weights[k]);
|
||||
//the inverse takes the vector into local bone space
|
||||
|
@ -156,7 +169,7 @@ function init() {
|
|||
//which is then transformed to the appropriate world space
|
||||
.applyMatrix4(skinMatrices[k]);
|
||||
finalVector.add(tempVector);
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
output += '\t\t\tvertex ' + finalVector.x + ' ' + finalVector.y + ' ' + finalVector.z + '\n';
|
||||
|
|
Loading…
Reference in New Issue