|
@@ -1339,14 +1339,18 @@ THREE.GLTFExporter.prototype = {
|
|
|
// Clones attribute not to override
|
|
|
var relativeAttribute = attribute.clone();
|
|
|
|
|
|
- for ( var j = 0, jl = attribute.count; j < jl; j ++ ) {
|
|
|
-
|
|
|
- relativeAttribute.setXYZ(
|
|
|
- j,
|
|
|
- attribute.getX( j ) - baseAttribute.getX( j ),
|
|
|
- attribute.getY( j ) - baseAttribute.getY( j ),
|
|
|
- attribute.getZ( j ) - baseAttribute.getZ( j )
|
|
|
- );
|
|
|
+ if ( !geometry.morphTargetsRelative ) {
|
|
|
+
|
|
|
+ for ( var j = 0, jl = attribute.count; j < jl; j ++ ) {
|
|
|
+
|
|
|
+ relativeAttribute.setXYZ(
|
|
|
+ j,
|
|
|
+ attribute.getX( j ) - baseAttribute.getX( j ),
|
|
|
+ attribute.getY( j ) - baseAttribute.getY( j ),
|
|
|
+ attribute.getZ( j ) - baseAttribute.getZ( j )
|
|
|
+ );
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|