SetViewMatrix
To set the current view matrix (angle, distance, translation, rotation, scale)
Function
let data = SetViewMatrix(viewMatrix)
Parameters
viewMatrix (Object): An object containing the view matrix parameters:
- angle : (Number) Rotation angle in degrees,
- rotate : (Sym3Vec3) Rotation axis as a 3D vector with X, Y, Z components,
- scale : (Sym3Vec3) Scale factors as a 3D vector with X, Y, Z components,
- translate : (Sym3Vec3) Translation offset as a 3D vector with X, Y, Z components,
- distance : (Number) Camera distance from the target.
Example
// Set the view matrix with custom values
var customView = {
angle: 30.0,
rotate: new Sym3Vec3(0.0, 1.0, 0.0),
scale: new Sym3Vec3(1.5, 1.5, 1.5),
translate: new Sym3Vec3(10.0, 5.0, 0.0),
distance: 150.0
};
SYM3.SetViewMatrix(customView);