How do x, y and z arguments define an axis in the rotation3DEffect
?
Since the documentation doesn't explain anything, I've found this on Hacking With Swift by Paul Hudson.
It says
If you’ve never done 3D rotation before you should think about the X/Y/Z axes as being skewers through your views. The X axis goes horizontally, so if you rotate on the X axis it’s like putting a horizontal skewer through your view – any rotation makes the top or bottom nearer or further, but won’t adjust the leading and trailing edges.
Okay but now my doubt is, in :
Text("EPISODE LLVM")
.font(.largeTitle)
.foregroundColor(.yellow)
.rotation3DEffect(.degrees(45), axis: (x: 1, y: 0, z: 0))
How does the value of x, y and z matter if we are going to anyways turn it an angle of 45 degrees with respect to those axes
Won't it make more logical sense to have something like this ?
.rotation3DEffect(.degrees(45), axis: (x: true, y: false, z: false))