---
Product: Aspose.3D
Platform: typescript
Page Type: reference
Canonical URL: https://reference.aspose.org/3d/typescript/TransformBuilder
---

# TransformBuilder

## Overview

`TransformBuilder` is a class in Aspose.3D FOSS for Typescript.

TransformBuilder.constructor creates a new TransformBuilder; overloads allow initial matrix and compose order.

This class provides 13 methods for working with TransformBuilder objects in Typescript programs.
Available methods include: `append`, `compose`, `constructor`, `prepend`, `rearrange`, `reset`, `rotate`, `rotateDegree`, `rotateEulerDegree`, `rotateEulerRadian`, `rotateRadian`, `scale`, and 1 additional methods.
All public members are accessible to any Typescript application after installing the Aspose.3D FOSS for Typescript package.
Properties: `composeOrder`, `matrix`.

## Description

`TransformBuilder` is a class in the Aspose.3D FOSS library for TypeScript that exposes 23 methods and 2 properties for programmatic use.

Core capabilities include: `matrix4`; `composeorder`; creates a new transformbuilder; overloads allow initial matrix and compose order. These operations enable developers to integrate transformbuilder functionality directly into TypeScript applications.

The class offers 4 constructor overloads, allowing flexible initialization depending on the calling context.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `matrix` | `Matrix4` | Read/Write | Gets the matrix. |
| `composeOrder` | `ComposeOrder` | Read/Write | Gets the compose order. |

## Methods

| Signature | Description |
|-----------|-------------|
| `constructor()` | Creates a new TransformBuilder; overloads allow initial matrix and compose order |
| `constructor(initial: Matrix4, order: ComposeOrder)` | Creates a TransformBuilder initialized with the given matrix and compose order |
| `constructor(order: ComposeOrder)` | Creates a TransformBuilder using the identity matrix and the specified compose order |
| `constructor()` | Creates a default TransformBuilder with identity matrix |
| `scale(s: number)` → `TransformBuilder` | Sets non‑uniform scaling factors x, y, z and returns the builder |
| `scale(x: number, y: number, z: number)` → `TransformBuilder` | Sets non-uniform scaling factors x, y, z and returns the builder |
| `scale(s: Vector3)` → `TransformBuilder` | Sets scaling from a Vector3 and returns the builder |
| `scale()` → `TransformBuilder` | Applies scaling from the packed argument and returns the builder |
| `rotateDegree(angle: number, axis: Vector3)` → `TransformBuilder` | Returns the builder or does nothing when called without arguments |
| `rotateDegree(rot: Vector3, order: RotationOrder)` | Rotates by Euler angles in degrees using the specified rotation order and returns the builder |
| `rotateDegree()` → `TransformBuilder \| void` | Applies rotation in degrees using the packed argument and returns the builder |
| `rotateRadian(angle: number, axis: Vector3)` → `TransformBuilder` | Rotates by angle (radians) around the given axis and returns the builder |
| `rotateRadian(rot: Vector3, order: RotationOrder)` | Rotates by Euler angles in radians using the specified rotation order and returns the builder |
| `rotateRadian()` → `TransformBuilder \| void` | Applies rotation in radians using the packed argument and returns the builder |
| `rotateEulerRadian(x: number, y: number, z: number)` → `TransformBuilder` | Rotates by Euler angles from Vector3 r (radians) and returns the builder |
| `rotateEulerRadian(r: Vector3)` → `TransformBuilder` | Rotates by Euler angles from the Vector3 r (in radians) and returns the builder |
| `rotateEulerRadian()` → `TransformBuilder` | Applies Euler rotation in radians from packed arguments and returns the builder |
| `translate(tx: number, ty: number, tz: number)` → `TransformBuilder` | Moves by tx, ty, tz and returns the builder |
| `translate(v: Vector3)` → `TransformBuilder` |  |
| `translate()` → `TransformBuilder` |  |
| `compose(m: Matrix4)` | Composes the given matrix into the builder's current matrix |
| `append(m: Matrix4)` → `TransformBuilder` | Appends matrix m to the current transformation and returns the builder |
| `prepend(m: Matrix4)` → `TransformBuilder` | Prepends matrix m before the current transformation and returns the builder |
| `rearrange(newX: Axis, newY: Axis, newZ: Axis)` → `TransformBuilder` | Reorders axes to newX, newY, newZ and returns the builder |
| `rotate(q: Quaternion)` → `TransformBuilder` | Applies quaternion rotation q to the builder and returns the builder |
| `rotateEulerDegree(degX: number, degY: number, degZ: number)` → `TransformBuilder` | Rotates by Euler angles in degrees and returns the builder |
| `reset()` | Clears all transformations, resetting to the identity matrix |

## See Also

- [Aspose.3D — Enterprise API Reference](https://reference.aspose.com/3d/)