Skip to content
Snippets Groups Projects
Unverified Commit e9ac30bc authored by juan-bobo's avatar juan-bobo Committed by GitHub
Browse files

Merge pull request #78 from mozilla/bug/register-input-activators-before-mapping

Register input activators before input mapping.
parents 2f32624d 68ecc2b5
No related branches found
No related tags found
No related merge requests found
...@@ -82,6 +82,11 @@ import { getAvailableVREntryTypes } from "./utils/vr-caps-detect.js"; ...@@ -82,6 +82,11 @@ import { getAvailableVREntryTypes } from "./utils/vr-caps-detect.js";
import ConcurrentLoadDetector from "./utils/concurrent-load-detector.js"; import ConcurrentLoadDetector from "./utils/concurrent-load-detector.js";
registerTelemetry(); registerTelemetry();
AFRAME.registerInputBehaviour("vive_trackpad_dpad4", vive_trackpad_dpad4);
AFRAME.registerInputBehaviour("oculus_touch_joystick_dpad4", oculus_touch_joystick_dpad4);
AFRAME.registerInputActivator("pressedmove", PressedMove);
AFRAME.registerInputActivator("reverseY", ReverseY);
AFRAME.registerInputMappings(inputConfig, true); AFRAME.registerInputMappings(inputConfig, true);
const store = new Store(); const store = new Store();
...@@ -138,10 +143,6 @@ async function enterScene(mediaStream, enterInVR) { ...@@ -138,10 +143,6 @@ async function enterScene(mediaStream, enterInVR) {
scene.enterVR(); scene.enterVR();
} }
AFRAME.registerInputBehaviour("vive_trackpad_dpad4", vive_trackpad_dpad4);
AFRAME.registerInputBehaviour("oculus_touch_joystick_dpad4", oculus_touch_joystick_dpad4);
AFRAME.registerInputActivator("pressedmove", PressedMove);
AFRAME.registerInputActivator("reverseY", ReverseY);
AFRAME.registerInputActions(inGameActions, "default"); AFRAME.registerInputActions(inGameActions, "default");
document.querySelector("#player-camera").setAttribute("look-controls", "pointerLockEnabled: true;"); document.querySelector("#player-camera").setAttribute("look-controls", "pointerLockEnabled: true;");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment