'Pannellum get pitch / yaw relative to current yaw

When I have center pitch and yaw from api functions viewer.getPitch() / viewer.getYaw(), how could I calculate pitch and yaw that is, for example, 100px left of this position?

Basically I add one hotspot, then I would like to add another hotspot relative to it (not using mouse click to add hotspot, but I need to calculate it dynamically)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source