Skip to content

@fibbojs / 3d / FTransform

Class: FTransform

3D Transform

Accessors

position

get position(): FVector3

Get the position.

set position(position): void

Set the position.

Parameters

position: FVector3

The new position.

Returns

FVector3

Defined in

3d/src/core/FTransform.ts:160


rotation

get rotation(): FVector3

Get the rotation.

set rotation(rotation): void

Set the rotation.

Parameters

rotation: FVector3

The new rotation.

Returns

FVector3

Defined in

3d/src/core/FTransform.ts:223


rotationDegree

get rotationDegree(): FVector3

Get the rotation in degrees.

set rotationDegree(rotationDegree): void

Set the rotation in degrees.

Parameters

rotationDegree: FVector3

The new rotation in degrees.

Returns

FVector3

Defined in

3d/src/core/FTransform.ts:286


rotationDegreeX

get rotationDegreeX(): number

Get the rotation in degrees on the x axis.

set rotationDegreeX(x): void

Set the x rotation in degrees.

Parameters

x: number

The new rotation on the x axis in degrees.

Returns

number

Defined in

3d/src/core/FTransform.ts:308


rotationDegreeY

get rotationDegreeY(): number

Get the rotation in degrees on the y axis.

set rotationDegreeY(y): void

Set the y rotation in degrees.

Parameters

y: number

The new rotation on the y axis in degrees.

Returns

number

Defined in

3d/src/core/FTransform.ts:323


rotationDegreeZ

get rotationDegreeZ(): number

Get the rotation in degrees on the z axis.

set rotationDegreeZ(z): void

Set the z rotation in degrees.

Parameters

z: number

The new rotation on the z axis in degrees.

Returns

number

Defined in

3d/src/core/FTransform.ts:338


rotationX

get rotationX(): number

Get the rotation on the x axis.

set rotationX(x): void

Set the x rotation.

Parameters

x: number

The new rotation on the x axis.

Returns

number

Defined in

3d/src/core/FTransform.ts:241


rotationY

get rotationY(): number

Get the rotation on the y axis.

set rotationY(y): void

Set the y rotation.

Parameters

y: number

The new rotation on the y axis.

Returns

number

Defined in

3d/src/core/FTransform.ts:256


rotationZ

get rotationZ(): number

Get the rotation on the z axis.

set rotationZ(z): void

Set the z rotation.

Parameters

z: number

The new rotation on the z axis.

Returns

number

Defined in

3d/src/core/FTransform.ts:271


scale

get scale(): FVector3

Get the scale.

set scale(scale): void

Set the scale.

Parameters

scale: FVector3

The new scale.

Returns

FVector3

Defined in

3d/src/core/FTransform.ts:353


scaleX

get scaleX(): number

Get the scale on the x axis.

set scaleX(x): void

Set the x scale.

Parameters

x: number

The new scale on the x axis.

Returns

number

Defined in

3d/src/core/FTransform.ts:371


scaleY

get scaleY(): number

Get the scale on the y axis.

set scaleY(y): void

Set the y scale.

Parameters

y: number

The new scale on the y axis.

Returns

number

Defined in

3d/src/core/FTransform.ts:386


scaleZ

get scaleZ(): number

Get the scale on the z axis.

set scaleZ(z): void

Set the z scale.

Parameters

z: number

The new scale on the z axis.

Returns

number

Defined in

3d/src/core/FTransform.ts:401


x

get x(): number

Get the position on the x axis.

set x(x): void

Set the x position.

Parameters

x: number

The new position on the x axis.

Returns

number

Defined in

3d/src/core/FTransform.ts:178


y

get y(): number

Get the position on the y axis.

set y(y): void

Set the y position.

Parameters

y: number

The new position on the y axis.

Returns

number

Defined in

3d/src/core/FTransform.ts:193


z

get z(): number

Get the position on the z axis.

set z(z): void

Set the z position.

Parameters

z: number

The new position on the z axis.

Returns

number

Defined in

3d/src/core/FTransform.ts:208

Constructors

new FTransform()

new FTransform(options?): FTransform

Create a new FTransform.

Parameters

options?: FTransformOptions

The options for the transform.

Returns

FTransform

Example

ts
const transform = new FTransform({
  position: { x: 0, y: 0, z: 0 },
  scale: { x: 1, y: 1, z: 1 },
  rotation: { x: 0, y: 0, z: 0 },
})

Defined in

3d/src/core/FTransform.ts:59

Methods

onPositionUpdated()

onPositionUpdated(callback): void

Add a callback for when the position is updated.

Parameters

callback

The callback to add.

Returns

void

Defined in

3d/src/core/FTransform.ts:84


onRotationUpdated()

onRotationUpdated(callback): void

Add a callback for when the rotation is updated.

Parameters

callback

The callback to add.

Returns

void

Defined in

3d/src/core/FTransform.ts:92


onScaleUpdated()

onScaleUpdated(callback): void

Add a callback for when the scale is updated.

Parameters

callback

The callback to add.

Returns

void

Defined in

3d/src/core/FTransform.ts:100


setPosition()

setPosition(position): void

Set a new position.

Parameters

position: FVector3

The new position.

Returns

void

Defined in

3d/src/core/FTransform.ts:111


setRotation()

setRotation(rotation): void

Set a new rotation.

Parameters

rotation: FVector3

The new rotation.

Returns

void

Defined in

3d/src/core/FTransform.ts:123


setRotationDegree()

setRotationDegree(rotationDegree): void

Set a new rotation in degrees.

Parameters

rotationDegree: FVector3

The new rotation in degrees.

Returns

void

Defined in

3d/src/core/FTransform.ts:135


setScale()

setScale(scale): void

Set a new scale.

Parameters

scale: FVector3

The new scale.

Returns

void

Defined in

3d/src/core/FTransform.ts:150

Properties

__CALLBACKS_ON_POSITION_UPDATED__

__CALLBACKS_ON_POSITION_UPDATED__: () => void[] = []

Callback for when the position is updated.

Defined in

3d/src/core/FTransform.ts:20


__CALLBACKS_ON_ROTATION_UPDATED__

__CALLBACKS_ON_ROTATION_UPDATED__: () => void[] = []

Callback for when the rotation is updated.

Defined in

3d/src/core/FTransform.ts:24


__CALLBACKS_ON_SCALE_UPDATED__

__CALLBACKS_ON_SCALE_UPDATED__: () => void[] = []

Callback for when the scale is updated.

Defined in

3d/src/core/FTransform.ts:28


__POSITION__

__POSITION__: FVector3

The position of the transform.

Defined in

3d/src/core/FTransform.ts:33


__ROTATION__

__ROTATION__: FVector3

The rotation of the transform.

Defined in

3d/src/core/FTransform.ts:41


__SCALE__

__SCALE__: FVector3

The scale of the transform.

Defined in

3d/src/core/FTransform.ts:37