|
@@ -1210,7 +1210,7 @@
|
|
|
|
|
|
if ( 'Lcl_Rotation' in node.properties ) {
|
|
if ( 'Lcl_Rotation' in node.properties ) {
|
|
|
|
|
|
- var rotation = parseFloatArray( node.properties.Lcl_Rotation.value ).map( function ( value ) {
|
|
|
|
|
|
+ var rotation = parseFloatArray( node.properties.Lcl_Rotation.value ).map( function ( value, index ) {
|
|
|
|
|
|
return value * Math.PI / 180;
|
|
return value * Math.PI / 180;
|
|
|
|
|
|
@@ -1226,6 +1226,15 @@
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if ( 'PreRotation' in node.properties ) {
|
|
|
|
+
|
|
|
|
+ var preRotations = parseVector3( node.properties.PreRotation ).multiplyScalar( Math.PI / 180 );
|
|
|
|
+ model.rotation.x += preRotations.x;
|
|
|
|
+ model.rotation.y += preRotations.y;
|
|
|
|
+ model.rotation.z += preRotations.z;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
var conns = connections.get( model.FBX_ID );
|
|
var conns = connections.get( model.FBX_ID );
|
|
for ( var parentIndex = 0; parentIndex < conns.parents.length; parentIndex ++ ) {
|
|
for ( var parentIndex = 0; parentIndex < conns.parents.length; parentIndex ++ ) {
|
|
|
|
|
|
@@ -1366,6 +1375,15 @@
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if ( 'PreRotation' in node.properties ) {
|
|
|
|
+
|
|
|
|
+ var preRotations = parseVector3( node.properties.PreRotation ).multiplyScalar( Math.PI / 180 );
|
|
|
|
+ model.rotation.x += preRotations.x;
|
|
|
|
+ model.rotation.y += preRotations.y;
|
|
|
|
+ model.rotation.z += preRotations.z;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
// Silly hack with the animation parsing. We're gonna pretend the scene graph has a skeleton
|
|
// Silly hack with the animation parsing. We're gonna pretend the scene graph has a skeleton
|