📐Transforming Content
Learn how to move, scale, rotate, and add text to 3D content in React Native
Last updated
Learn how to move, scale, rotate, and add text to 3D content in React Native
Last updated
You can go back to the console to add more 3D models, delete 3D models, add metadata, or change existing metadata associated with your entry and instantly see the changes in React Native.
For example, let's add metadata with the key direction
and the value right
.
This will make the 3D model rotate to the right.
If the content is too big or too small or if you'd like to move or rotate it, go back to the console and add metadata to affect its transformation. After adding metadata, restart the app.
The following keys are words the system uses as pre-defined metadata keys to control transformations:
Keyword
Type
Options
Effect
x
float
Any positive or negative number.
Default value is 0.
Moves the hologram on the x-axis
y
float
Any positive or negative number.
Default value is 0.
Moves the hologram on the y-axis
z
float
Any positive or negative number.
Default value is 0.
Moves the hologram on the z-axis
scale
float
Any positive number.
Default value is 1.
Grows or shrinks the hologram uniformly
xAngle
float
Any positive or negative number.
Default value is 0.
Rotates the model on the x-axis
yAngle
float
Any positive or negative number.
Default value is 0.
Rotates the model on the y-axis
zAngle
float
Any positive or negative number.
Default value is 0.
Rotates the model on the z-axis
Remember to restart the app after adding metadata with React Native apps for the changes to take effect.
If you'd like to annotate the content, go back to the console and add metadata to add text. After adding metadata, refresh the browser.
The following keys are words the system uses as pre-defined metadata keys to add and design text:
Keyword
Type
Options
Description
text
string
Any string. The character ';' represents a line break.
Text to appear with the 3D content
textColor
string
Any color.
Default value is "white".
Color of the text
xTextPosition
float
Any positive or negative number. Default value is "0"
Position of the text in the x-axis relative to the 3D content
yTextPosition
float
Any positive or negative number. Default value is "0"
Position of the text in the y-axis relative to the 3D content
zTextPosition
float
Any positive or negative number. Default value is "0"
Position of the text in the z-axis relative to the 3D content
textScale
float
Any positive number.
Default value is "2".
Scale of the text
Remember to restart the app after adding metadata with React Native apps for the changes to take effect.