Skip to main content

Class: CssTransformBuilder

A utility class for building CSS transforms.

Constructors

constructor

new CssTransformBuilder(): CssTransformBuilder

Returns

CssTransformBuilder

Methods

concat

concat<T>(...transforms): CssTransformChain<T>

Concatenates zero or more CSS transformations.

Type parameters

NameType
Textends CssTransform[]

Parameters

NameTypeDescription
...transformsTThe individual transforms to concatentate. The order of the transforms passed to the function determines the order of concatenation. Concatenation follows the standard CSS transform convention: for a concatenation of transforms [A, B, C], the resulting transformation is equivalent to the one produced by multiplying the transformation matrices in the order (A * B) * C.

Returns

CssTransformChain<T>

A new CssTransformChain object representing the concatenation of the specified transforms.

Defined in

src/sdk/graphics/css/CssTransform.ts:725


matrix

matrix(): CssMatrixTransform

Creates a new instance of a CSS matrix transform, initialized to the identity transformation.

Returns

CssMatrixTransform

A new instance of a CSS matrix transform, initialized to the identity transformation.

Defined in

src/sdk/graphics/css/CssTransform.ts:607


rotate

rotate(unit): CssRotateTransform

Creates a new instance of a CSS rotate transform, initialized to zero rotation.

Parameters

NameTypeDescription
unit"rad" | "deg"The angle unit to use for the new transform.

Returns

CssRotateTransform

A new instance of a CSS rotate transform, initialized to zero rotation.

Defined in

src/sdk/graphics/css/CssTransform.ts:616


rotate3d

rotate3d(unit): CssRotate3dTransform

Creates a new instance of a CSS rotate3d transform, initialized to zero rotation about the z axis.

Parameters

NameTypeDescription
unit"rad" | "deg"The angle unit to use for the new transform.

Returns

CssRotate3dTransform

A new instance of a CSS rotate3d transform, initialized to zero rotation about the z axis.

Defined in

src/sdk/graphics/css/CssTransform.ts:625


scale

scale(): CssScaleTransform

Creates a new instance of a CSS scale transform, initialized to the identity scaling.

Returns

CssScaleTransform

A new instance of a CSS scale transform, initialized to the identity scaling.

Defined in

src/sdk/graphics/css/CssTransform.ts:705


scale3d

scale3d(): CssScale3dTransform

Creates a new instance of a CSS scale3d transform, initialized to the identity scaling.

Returns

CssScale3dTransform

A new instance of a CSS scale3d transform, initialized to the identity scaling.

Defined in

src/sdk/graphics/css/CssTransform.ts:713


scaleX

scaleX(): CssScaleXTransform

Creates a new instance of a CSS scaleX transform, initialized to the identity scaling.

Returns

CssScaleXTransform

A new instance of a CSS scaleX transform, initialized to the identity scaling.

Defined in

src/sdk/graphics/css/CssTransform.ts:681


scaleY

scaleY(): CssScaleYTransform

Creates a new instance of a CSS scaleY transform, initialized to the identity scaling.

Returns

CssScaleYTransform

A new instance of a CSS scaleY transform, initialized to the identity scaling.

Defined in

src/sdk/graphics/css/CssTransform.ts:689


scaleZ

scaleZ(): CssScaleZTransform

Creates a new instance of a CSS scaleZ transform, initialized to the identity scaling.

Returns

CssScaleZTransform

A new instance of a CSS scaleZ transform, initialized to the identity scaling.

Defined in

src/sdk/graphics/css/CssTransform.ts:697


translate

translate(unitX, unitY?): CssTranslateTransform

Creates a new instance of a CSS translate transform, initialized to zero translation.

Parameters

NameTypeDescription
unitXstringThe unit to use for the new transform's x translation.
unitY?stringThe unit to use for the new transform's y translation.

Returns

CssTranslateTransform

A new instance of a CSS translate transform, initialized to zero translation.

Defined in

src/sdk/graphics/css/CssTransform.ts:662


translate3d

translate3d(unitX, unitY?, unitZ?): CssTranslate3dTransform

Creates a new instance of a CSS translate3d transform, initialized to zero translation.

Parameters

NameTypeDescription
unitXstringThe unit to use for the new transform's x translation.
unitY?stringThe unit to use for the new transform's y translation.
unitZ?stringThe unit to use for the new transform's z translation.

Returns

CssTranslate3dTransform

A new instance of a CSS translate3d transform, initialized to zero translation.

Defined in

src/sdk/graphics/css/CssTransform.ts:673


translateX

translateX(unit): CssTranslateXTransform

Creates a new instance of a CSS translateX transform, initialized to zero translation.

Parameters

NameTypeDescription
unitstringThe unit to use for the new transform.

Returns

CssTranslateXTransform

A new instance of a CSS translateX transform, initialized to zero translation.

Defined in

src/sdk/graphics/css/CssTransform.ts:634


translateY

translateY(unit): CssTranslateYTransform

Creates a new instance of a CSS translateY transform, initialized to zero translation.

Parameters

NameTypeDescription
unitstringThe unit to use for the new transform.

Returns

CssTranslateYTransform

A new instance of a CSS translateY transform, initialized to zero translation.

Defined in

src/sdk/graphics/css/CssTransform.ts:643


translateZ

translateZ(unit): CssTranslateZTransform

Creates a new instance of a CSS translateZ transform, initialized to zero translation.

Parameters

NameTypeDescription
unitstringThe unit to use for the new transform.

Returns

CssTranslateZTransform

A new instance of a CSS translateZ transform, initialized to zero translation.

Defined in

src/sdk/graphics/css/CssTransform.ts:652