I've searched for things like heading and compass from that fork with no results.That fork hasn't been updated in 2 years though.
Are the heading values wrong, or is the graphic orientation not matching the heading value? Getting heading is very simple to obtain regardless of the camera orientation. Once you convert the camera.direction to the local ENU transform you can find heading with
Math.atan2(camDirLocal.x,camDirLocal.y);
For vertical orientations you could substitute camera.direction with camera.up (this makes sense if roll is always zero.)
BTW the HPR text on my Moon Sun video is wrong, I was testing some other functions at the time. However the arrow directions are correct.
One cool thing about the Moon Sun arrows is that at a glance you know what type of Moon:
-face in opposite directions = Full Moon
-face in the same direction = New Moon
-face 90deg from eachother = Half Moon
Full Moon always rises soon after the Sun sets. There is never a night time with a New Moon. At a glance you can obtain a lot of information. I plan to add labels to the end of the Moon Sun arrows with exact altitude/azimuth info.