If you run the app from apps/phone and use yarn dev you can develop the app in the browser.
Currently the phone will never appear on the screen. This is because the usePhoneVisibility() hook positions the phone off screen so that when you are in game the phone only shows when its opened. When in the dev/browser mode we want the phone to always show. Added a check for isEnvBrowser to know if we are in game vs the browser, and if in browser we do not position the phone off screen.
Ex: Phone displays correctly in browser
Pull Request Checklist:
[x] Have you followed the guidelines in our Contributing document and Code of Conduct?
[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
[x] Have you built and tested NPWD in-game after the relevant change?
Pull Request Description
If you run the app from
apps/phone
and useyarn dev
you can develop the app in the browser.Currently the phone will never appear on the screen. This is because the
usePhoneVisibility()
hook positions the phone off screen so that when you are in game the phone only shows when its opened. When in the dev/browser mode we want the phone to always show. Added a check forisEnvBrowser
to know if we are in game vs the browser, and if in browser we do not position the phone off screen.Ex: Phone displays correctly in browser
Pull Request Checklist: