- Spark AR Studio
- Spark AR Hub
- Features
- Learn
- Creators
- Partners
- Blog
- Community
- Create AR effects for Instagram and Facebook.Get Started

The `WorldTransform`

class describes an object tranform for a sceneObject in world space.

Property | Description |
---|---|

`position` | (get) position: PointSignal Specifies the object position along the X, Y and Z axis of the world coordinate system. |

`rotation` | (get) rotation: QuaternionSignal Specifies the object rotation along the X, Y and Z axis of the object's in world coordinate system. |

`rotationX` | (get) rotationX: ScalarSignal Represents rotation about the X-axis of the world coordinate system, in radians. The signal value is in the range [-PI, PI]. Note: The order of operations (rotations in particular) is the same as in `Transform` . The rotations are applied to the object in Z-Y-X order. The X rotation is applied first to the object. |

`rotationY` | (get) rotationY: ScalarSignal Represents rotation about the Y-axis of the world coordinate system, in radians. The signal value is in the range [-PI, PI]. Note: The order of operations (rotations in particular) is the same as in `Transform` . The rotations are applied to the object in Z-Y-X order. The Y rotation is applied second to the object, therefore if the `rotationX` is not zero, then `rotationY` is applied not in the object's local coordinate system but in the rotated one. |

`rotationZ` | (get) rotationZ: ScalarSignal Represents rotation about the Z-axis of the world coordinate system, in radians. The signal value is in the range [-PI, PI]. Note: The order of operations (rotations in particular) is the same as in `Transform` . The rotations are applied to the object in Z-Y-X order. The Z rotation is applied last to the object, therefore if the `rotationX` or `rotationY` is not zero, then `rotationZ` is applied not in the object's local coordinate system but in the rotated one. |

`scale` | (get) scale: PointSignal Represents scale in the world coordinate system. |

`scaleX` | (get) scaleX: ScalarSignal Represents scale along the X-axis of the world coordinate system. |

`scaleY` | (get) scaleY: ScalarSignal Represents scale along the Y-axis of the world coordinate system. |

`scaleZ` | (get) scaleZ: ScalarSignal Represents scale along the Z-axis of the world coordinate system. |

`x` | (get) x: ScalarSignal Represents the offset along the X-axis of the world coordinate system. |

`y` | (get) y: ScalarSignal Represents the offset along the Y-axis of the world coordinate system. |

`z` | (get) z: ScalarSignal Represents the offset along the Z-axis of the world coordinate system. |

Method | Description |
---|---|

` applyTo ` | applyTo(transform: TransformSignal): TransformSignal Returns a signal with the value that is equal to the value of the provided transformation with the transformation of the current `TransformSignal` applied to it. |

` applyToPoint ` | applyToPoint(signal: PointSignal): PointSignal Returns a signal with the value that is equal to the value of the provided point with the transformation applied to it. This performs a matrix multiplication of the provided point (with an implicit `1` in the 4th dimension) and the receiver transform, and divides by perspective. |

` applyToVector ` | applyToVector(signal: VectorSignal): VectorSignal Returns a signal with the value that is equal to the value of the provided vector with the transformation applied to it. This performs a matrix multiplication of the provided vector (with an implicit `0` in the 4th dimension) and the receiver transform, without change of position. |

` inverse ` | inverse(): TransformSignal Returns a signal with the value that is equal to the inverted transformation value of the given signal at any point of time. |

` lookAt ` | lookAt(targetPosition: PointSignal, selfUp?: VectorSignal): TransformSignal Creates a scene object transform with rotation in direction of target. Note: The self needs to be pointing the scene object alongside the X axis.Default `selfUp` is `ReactiveModule.vector(0, 1, 0)` . |

` toSignal ` | toSignal(): TransformSignal Returns a signal for a given transformation. |