* Sets the vector components to the scale elements of the * given transformation matrix. * * @param {Matrix4} m - The 4x4 matrix. * @return {Vector3} A reference to this vector.
( m )
| 1073 | * @return {Vector3} A reference to this vector. |
| 1074 | */ |
| 1075 | setFromMatrixScale( m ) { |
| 1076 | |
| 1077 | const sx = this.setFromMatrixColumn( m, 0 ).length(); |
| 1078 | const sy = this.setFromMatrixColumn( m, 1 ).length(); |
| 1079 | const sz = this.setFromMatrixColumn( m, 2 ).length(); |
| 1080 | |
| 1081 | this.x = sx; |
| 1082 | this.y = sy; |
| 1083 | this.z = sz; |
| 1084 | |
| 1085 | return this; |
| 1086 | |
| 1087 | } |
| 1088 | |
| 1089 | /** |
| 1090 | * Sets the vector components from the specified matrix column. |
no test coverage detected