提交 1e321b91 编写于 作者: M Mr.doob

ObjectLoader backwards compatible temporarily.

上级 59abd194
......@@ -260,10 +260,20 @@ THREE.ObjectLoader.prototype = {
}
matrix.fromArray( data.matrix );
matrix.decompose( object.position, object.quaternion, object.scale );
if ( data.matrix !== undefined ) {
object.rotation.updateEuler();
matrix.fromArray( data.matrix );
matrix.decompose( object.position, object.quaternion, object.scale );
object.rotation.updateEuler();
} else {
if ( data.position !== undefined ) object.position.fromArray( data.position );
if ( data.rotation !== undefined ) object.rotation.fromArray( data.rotation );
if ( data.scale !== undefined ) object.scale.fromArray( data.scale );
}
if ( data.id !== undefined ) object.id = data.id;
if ( data.name !== undefined ) object.name = data.name;
......
......@@ -131,6 +131,7 @@ THREE.Rotation.prototype = {
fromArray: function ( array ) {
this.euler.fromArray( array );
this.updateQuaternion();
return this;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册