Transform

Reference

class Transform
module:
position: Vector3

The position of the transform

rotation: Quaternion

The rotation of the transform

scale: Vector3

The scale of the transform

static new()

Create a transform object

Returns:

the new Transform object

Return type:

Transform

static new(position, rotation, scale)

Create a transform object from existing position, rotation and scale

Parameters:
Returns:

the new transform

Return type:

Transform

static fromJson(json)

Create a transform object from json

Parameters:

json (str) – the json string

Returns:

the new Transform object

Return type:

Transform

static fromData(data)

Create a transform object from data

Parameters:

data (object) – the data object

Returns:

the new Transform object

Return type:

Transform

toData()

Returns the data of the transform as simple table

Returns:

the data

Return type:

table

Examples