Angular 2 & A-Frame Gamepad Controls Demo
Test your Angular app with A-Frame by using your Xbox controller and Google Cardboard/Samsung Gear VR in your local host. The demo connects automatically to connected Xbox Controller, but you can also test other gamepad controls if wanted. This project was generated with Angular-CLI, Angular 5 and A-frame 0.8.2. When not in VR mode, A-Frame is embedded to Angular app content.
To get started
git clone
this projectnpm install
(install dependencies)ng serve
(run project at localhost:4200)- open http://localhost:4200/ to see the demo
Connect A-Frame + Angular app to Xbox controller on your computer
- Connect your Xbox controller to your computer via Bluetooth (https://support.xbox.com/en-US/xbox-on-windows/accessories/connect-xbox-one-controller-to-pc)
- You should see the connected controller ID automatically in the app
Connect A-Frame + Angular App to Samsung Gear VR (or Google Cardboard) + Xbox Controller
- Run your localhost on your Android device by following this tutorial(https://developers.google.com/web/tools/chrome-devtools/remote-debugging/?utm_source=dcc&utm_medium=redirect&utm_campaign=2016q3)
- Open Chrome and given localhost address (previous step) on your Android device
- Connect Xbox controller to your Android phone via Bluetooth (https://support.xbox.com/en-US/xbox-one/accessories/use-samsung-gear-vr-with-xbox-controller)
- Enter VR mode on your phone by clicking enter-vr button and put the phone inside cardboard/Samsung Gear VR
- NOTE: there might be some delay compared to laptop version