提交 6c7a4898 编写于 作者: B Ben Houston

Matrix4.makeShear - standard shear constructor with optional Autodesk Maya style construction.

上级 9c57b1e4
......@@ -146,6 +146,35 @@ THREE.Matrix4.prototype = {
}(),
makeShear: function ( vector3Shear, reverseStyle ) {
var xy = vector3Shear.x;
var xz = vector3Shear.y;
var yz = vector3Shear.z;
if ( reverseStyle ) {
this.set(
1, 0, 0, 0,
xy, 1, 0, 0,
xz, yz, 1, 0,
0, 0, 0, 1
);
} else {
// Maya style
this.set(
1, xy, xz, 0,
0, 1, yz, 0,
0, 0, 1, 0,
0, 0, 0, 1
);
}
return this;
},
makeRotationFromEuler: function ( euler ) {
if ( euler instanceof THREE.Euler === false ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册