Skip to main content

Class: CssTransformBuilder

Defined in: src/sdk/graphics/css/CssTransform.ts:602

A utility class for building CSS transforms.

Constructors

Constructor

new CssTransformBuilder(): CssTransformBuilder

Returns

CssTransformBuilder

Methods

concat()

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

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

Concatenates zero or more CSS transformations.

Type Parameters

Type Parameter
T extends CssTransform[]

Parameters

ParameterTypeDescription
...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.


matrix()

static matrix(): CssMatrixTransform

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

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.


rotate()

static rotate(unit): CssRotateTransform

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

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

Parameters

ParameterTypeDescription
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.


rotate3d()

static rotate3d(unit): CssRotate3dTransform

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

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

Parameters

ParameterTypeDescription
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.


scale()

static scale(): CssScaleTransform

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

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.


scale3d()

static scale3d(): CssScale3dTransform

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

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.


scaleX()

static scaleX(): CssScaleXTransform

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

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.


scaleY()

static scaleY(): CssScaleYTransform

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

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.


scaleZ()

static scaleZ(): CssScaleZTransform

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

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.


translate()

static translate(unitX, unitY?): CssTranslateTransform

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

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

Parameters

ParameterTypeDescription
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.


translate3d()

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

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

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

Parameters

ParameterTypeDescription
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.


translateX()

static translateX(unit): CssTranslateXTransform

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

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

Parameters

ParameterTypeDescription
unitstringThe unit to use for the new transform.

Returns

CssTranslateXTransform

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


translateY()

static translateY(unit): CssTranslateYTransform

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

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

Parameters

ParameterTypeDescription
unitstringThe unit to use for the new transform.

Returns

CssTranslateYTransform

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


translateZ()

static translateZ(unit): CssTranslateZTransform

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

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

Parameters

ParameterTypeDescription
unitstringThe unit to use for the new transform.

Returns

CssTranslateZTransform

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