This is full-scratch immitation of UnityEngine.Quaternion
Bring Quaternion.js
to your project, and use Quaternion
class.
3D vector is represented as an array.
This is using Left-handed coordinate system.
Euler rotation is ZXY order.
All same as UnityEngine.Quaternion