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

ObjectLoader backwards compatible temporarily.

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