Skip to main content

translate()

Translates objects along the X axis.

Returns: SceneObject

tip

See the guide for detailed usage examples.

Signatures

translate(x: NumberParam, ...targets: SceneObject[]): ITranslate

Translates objects along the X axis.

ParameterTypeDescription
xNumberParamThe X distance
...targetsSceneObject[]The objects to translate (defaults to last object) (optional)

translate(x: NumberParam, copy: BooleanParam, ...targets: SceneObject[]): ITranslate

Translates objects along the X axis, optionally making a copy.

ParameterTypeDescription
xNumberParamThe X distance
copyBooleanParamWhether to copy instead of move
...targetsSceneObject[]The objects to translate (defaults to last object) (optional)

translate(x: NumberParam, y: NumberParam, ...targets: SceneObject[]): ITranslate

Translates objects along the X and Y axes.

ParameterTypeDescription
xNumberParamThe X distance
yNumberParamThe Y distance
...targetsSceneObject[]The objects to translate (defaults to last object) (optional)

translate(x: NumberParam, y: NumberParam, copy: BooleanParam, ...targets: SceneObject[]): ITranslate

Translates objects along the X and Y axes, optionally making a copy.

ParameterTypeDescription
xNumberParamThe X distance
yNumberParamThe Y distance
copyBooleanParamWhether to copy instead of move
...targetsSceneObject[]The objects to translate (defaults to last object) (optional)

translate(x: NumberParam, y: NumberParam, z: NumberParam, ...targets: SceneObject[]): ITranslate

Translates objects along all three axes.

ParameterTypeDescription
xNumberParamThe X distance
yNumberParamThe Y distance
zNumberParamThe Z distance
...targetsSceneObject[]The objects to translate (defaults to last object) (optional)

translate(x: NumberParam, y: NumberParam, z: NumberParam, copy: BooleanParam, ...targets: SceneObject[]): ITranslate

Translates objects along all three axes, optionally making a copy.

ParameterTypeDescription
xNumberParamThe X distance
yNumberParamThe Y distance
zNumberParamThe Z distance
copyBooleanParamWhether to copy instead of move
...targetsSceneObject[]The objects to translate (defaults to last object) (optional)

translate(distance: PointLike, ...targets: SceneObject[]): ITranslate

Translates objects by a point-like offset.

ParameterTypeDescription
distancePointLikeThe offset as a point
...targetsSceneObject[]The objects to translate (defaults to last object) (optional)

translate(distance: PointLike, copy: boolean, ...targets: SceneObject[]): ITranslate

Translates objects by a point-like offset, optionally making a copy.

ParameterTypeDescription
distancePointLikeThe offset as a point
copybooleanWhether to copy instead of move
...targetsSceneObject[]The objects to translate (defaults to last object) (optional)