rvdleun / onoffice

The open-source Virtual Office, powered by WebVR
https://onoffice.app
GNU General Public License v3.0
119 stars 15 forks source link

Feature/aframe upgrade #12

Closed rvdleun closed 5 years ago

rvdleun commented 5 years ago

(while I'm the one who'll be approving and merging this, I am creating a PR for documentation and historical purposes)

This Pull Request is for upgrading AFrame from v0.8.0 to v0.9.2. Two things broke during the upgrade.

The biggest one was that the cursor wasn't working anymore. In the previous version, a cursor object would continually switch from screen to screen by changing parents. I can't tell why, but this method didn't work in 0.9.2. To fix this, I am now actually removing the cursor entity and creating a new one when the user switches screens. I've also done some clean-up here by changing the cursor-position into a system, given that there is no real reason for it to be a component at the moment.

Next to that, the screen wouldn't automatically center when entering VR. Adding a delay fixes that for now, but I'd like to research down the road if there is a better way to capture when the screens are ready to be centered.