linearly v0.32.0 • Docs
linearly v0.32.0 / mat4 / fromRotationTranslationScale
Function: fromRotationTranslationScale()
fromRotationTranslationScale(
rot
,trans
,scale
):mat4
Creates a matrix from a quaternion rotation, vector translation and vector scale This is equivalent to (but much faster than):
mat4.identity(dest);
mat4.translate(dest, vec);
const quatMat = mat4.create();
quat4.toMat4(quat, quatMat);
mat4.multiply(dest, quatMat);
mat4.scale(dest, scale)
Parameters
• rot: quat
Rotation quaternion
• trans: vec3
Translation vector
• scale: vec3
= vec3.one
Scaling vector