Take a look at this Playground
It’s a part of the “Getting started” tutorial. I don’t understand why in lines 86 and 112 they need to clone the rotationQuaternion. For this example, they first define startRotation to describe the character facing toward the right. Once p === 0, they want to reset the rotationQuaternion (that was changed on line 106) back to be equal to startRotation.
It said in the previous section that the reason for cloning it is so that they aren’t linked, but I did some tests, and if you define startRotation = dude.rotationQuaternion (notice there is no clone), and you then change dude.rotationQuaternion, startRotation does NOT change. So they are not linked in that sense. So you should be able to define startRotation = dude.rotationQuaternion without cloning it, and startRotation should NEVER change, despite there being no cloning operation.
Where is the flaw in my logic?