Need EulerAngles from normal

Check this, you can pass the normal and the up vector to get a matrix that can be used for that:

var matrix = new pc.Mat4();
var quat = new pc.Quat();
this.setMat4Forward(matrix, raycastResult.normal, pc.Vec3.UP);
quat.setFromMat4(matrix);
var alignAngles = quat.getEulerAngles();