Computer Science: Translate - XLJasonHuo/Starfield GitHub Wiki
The translate() function can control the x (left and right) and y (up and down) location of the object you're displaying, you can also add the z value, this can control the translation towards/away from the screen. We've used function in our starfield project. The translate function helped our project by adjusting the starting point of the starfield.
Syntax
translate(x, y)
translate(x, y, z)
Parameters
x controls the left and right translation of the displaying object
y controls the up and down translation of the displaying object
z controls the toward and away translation of the displaying object