I built something similar a while ago. Uses WebVR. Seems overkill to use an API that accesses VR hardware for a simple use case like this. (or any JS library for that matter)