提交 0bf97352 编写于 作者: B Ben Houston

Matrix4.setRotationFrom* -> Matrix4.makeRotationFrom* and make them fully...

Matrix4.setRotationFrom* -> Matrix4.makeRotationFrom* and make them fully destructive as they are already partially destructive.
上级 af39069f
......@@ -119,7 +119,7 @@ THREE.Matrix4.prototype = {
}(),
setRotationFromEuler: function ( v, order ) {
makeRotationFromEuler: function ( v, order ) {
var te = this.elements;
......@@ -226,11 +226,22 @@ THREE.Matrix4.prototype = {
}
// last column
te[3] = 0;
te[7] = 0;
te[11] = 0;
// bottom row
te[12] = 0;
te[13] = 0;
te[14] = 0;
te[15] = 1;
return this;
},
setRotationFromQuaternion: function ( q ) {
makeRotationFromQuaternion: function ( q ) {
var te = this.elements;
......@@ -252,6 +263,17 @@ THREE.Matrix4.prototype = {
te[6] = yz + wx;
te[10] = 1 - ( xx + yy );
// last column
te[3] = 0;
te[7] = 0;
te[11] = 0;
// bottom row
te[12] = 0;
te[13] = 0;
te[14] = 0;
te[15] = 1;
return this;
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册