migrate code into cesium-oculus.js