Class: FTransform
3D Transform
Example
import { FTransform } from '@fibbojs/3d'
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 },
})Accessors
position
getposition():FVector3
Get the position.
setposition(position):void
Set the position.
Parameters
• position: FVector3
The new position.
Returns
FVector3
Defined in
rotation
getrotation():FVector3
Get the rotation.
setrotation(rotation):void
Set the rotation.
Parameters
• rotation: FVector3
The new rotation.
Returns
FVector3
Defined in
rotationDegree
getrotationDegree():FVector3
Get the rotation in degrees.
setrotationDegree(rotationDegree):void
Set the rotation in degrees.
Parameters
• rotationDegree: FVector3
The new rotation in degrees.
Returns
FVector3
Defined in
rotationDegreeX
getrotationDegreeX():number
Get the rotation in degrees on the x axis.
setrotationDegreeX(x):void
Set the x rotation in degrees.
Parameters
• x: number
The new rotation on the x axis in degrees.
Returns
number
Defined in
rotationDegreeY
getrotationDegreeY():number
Get the rotation in degrees on the y axis.
setrotationDegreeY(y):void
Set the y rotation in degrees.
Parameters
• y: number
The new rotation on the y axis in degrees.
Returns
number
Defined in
rotationDegreeZ
getrotationDegreeZ():number
Get the rotation in degrees on the z axis.
setrotationDegreeZ(z):void
Set the z rotation in degrees.
Parameters
• z: number
The new rotation on the z axis in degrees.
Returns
number
Defined in
rotationX
getrotationX():number
Get the rotation on the x axis.
setrotationX(x):void
Set the x rotation.
Parameters
• x: number
The new rotation on the x axis.
Returns
number
Defined in
rotationY
getrotationY():number
Get the rotation on the y axis.
setrotationY(y):void
Set the y rotation.
Parameters
• y: number
The new rotation on the y axis.
Returns
number
Defined in
rotationZ
getrotationZ():number
Get the rotation on the z axis.
setrotationZ(z):void
Set the z rotation.
Parameters
• z: number
The new rotation on the z axis.
Returns
number
Defined in
scale
getscale():FVector3
Get the scale.
setscale(scale):void
Set the scale.
Parameters
• scale: FVector3
The new scale.
Returns
FVector3
Defined in
scaleX
getscaleX():number
Get the scale on the x axis.
setscaleX(x):void
Set the x scale.
Parameters
• x: number
The new scale on the x axis.
Returns
number
Defined in
scaleY
getscaleY():number
Get the scale on the y axis.
setscaleY(y):void
Set the y scale.
Parameters
• y: number
The new scale on the y axis.
Returns
number
Defined in
scaleZ
getscaleZ():number
Get the scale on the z axis.
setscaleZ(z):void
Set the z scale.
Parameters
• z: number
The new scale on the z axis.
Returns
number
Defined in
x
getx():number
Get the position on the x axis.
setx(x):void
Set the x position.
Parameters
• x: number
The new position on the x axis.
Returns
number
Defined in
y
gety():number
Get the position on the y axis.
sety(y):void
Set the y position.
Parameters
• y: number
The new position on the y axis.
Returns
number
Defined in
z
getz():number
Get the position on the z axis.
setz(z):void
Set the z position.
Parameters
• z: number
The new position on the z axis.
Returns
number
Defined in
Constructors
new FTransform()
new FTransform(
options?):FTransform
Create a new FTransform.
Parameters
• options?: FTransformOptions
The options for the transform.
Returns
Defined in
Methods
onPositionUpdated()
onPositionUpdated(
callback):void
Add a callback for when the position is updated.
Parameters
• callback
The callback to add.
Returns
void
Defined in
onRotationUpdated()
onRotationUpdated(
callback):void
Add a callback for when the rotation is updated.
Parameters
• callback
The callback to add.
Returns
void
Defined in
onScaleUpdated()
onScaleUpdated(
callback):void
Add a callback for when the scale is updated.
Parameters
• callback
The callback to add.
Returns
void
Defined in
setPosition()
setPosition(
position):void
Set a new position.
Parameters
• position: FVector3
The new position.
Returns
void
Defined in
setRotation()
setRotation(
rotation):void
Set a new rotation.
Parameters
• rotation: FVector3
The new rotation.
Returns
void
Defined in
setRotationDegree()
setRotationDegree(
rotationDegree):void
Set a new rotation in degrees.
Parameters
• rotationDegree: FVector3
The new rotation in degrees.
Returns
void
Defined in
setScale()
setScale(
scale):void
Set a new scale.
Parameters
• scale: FVector3
The new scale.
Returns
void
Defined in
Properties
__CALLBACKS_ON_POSITION_UPDATED__
__CALLBACKS_ON_POSITION_UPDATED__: () =>
void[] =[]
Callback for when the position is updated.
Defined in
__CALLBACKS_ON_ROTATION_UPDATED__
__CALLBACKS_ON_ROTATION_UPDATED__: () =>
void[] =[]
Callback for when the rotation is updated.
Defined in
__CALLBACKS_ON_SCALE_UPDATED__
__CALLBACKS_ON_SCALE_UPDATED__: () =>
void[] =[]
Callback for when the scale is updated.
Defined in
__POSITION__
__POSITION__:
FVector3
The position of the transform.
Defined in
__ROTATION__
__ROTATION__:
FVector3
The rotation of the transform.
Defined in
__SCALE__
__SCALE__:
FVector3
The scale of the transform.

