Represents position, rotation, and scale in 3D space.
const t = new Editor.Transform( new vec3(1, 2, 3), new vec3(0, 45, 0), new vec3(1, 1, 1) ); console.log(`position: ${t.position}`); console.log(`rotation: ${t.rotation}`); console.log(`scale: ${t.scale}`); t.position = new vec3(10, 20, 30); t.rotation = new vec3(90, 0, 0); t.scale = new vec3(2, 2, 2); console.log(`Updated position: ${t.position}`); console.log(`Updated rotation: ${t.rotation}`); console.log(`Updated scale: ${t.scale}`); Copy
const t = new Editor.Transform( new vec3(1, 2, 3), new vec3(0, 45, 0), new vec3(1, 1, 1) ); console.log(`position: ${t.position}`); console.log(`rotation: ${t.rotation}`); console.log(`scale: ${t.scale}`); t.position = new vec3(10, 20, 30); t.rotation = new vec3(90, 0, 0); t.scale = new vec3(2, 2, 2); console.log(`Updated position: ${t.position}`); console.log(`Updated rotation: ${t.rotation}`); console.log(`Updated scale: ${t.scale}`);
Constructs a Transform with the given position, rotation, and scale vectors.
World-space position of the transform as a vec3.
Euler rotation of the transform as a vec3.
Scale of the transform as a vec3.
Represents position, rotation, and scale in 3D space.
Example