From e39459c92f4678c081c496e8babc33222fd8b8e8 Mon Sep 17 00:00:00 2001 From: joni <johnfshaughnessy@gmail.com> Date: Wed, 14 Mar 2018 16:49:21 -0700 Subject: [PATCH] Map inputs to multiple events. --- package.json | 2 +- src/input-mappings.js | 7 ++----- yarn.lock | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 5cf90f131..28cd5607a 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "dependencies": { "aframe-billboard-component": "^1.0.0", "aframe-extras": "^3.12.4", - "aframe-input-mapping-component": "https://github.com/johnshaughnessy/aframe-input-mapping-component#23e2855", + "aframe-input-mapping-component": "https://github.com/johnshaughnessy/aframe-input-mapping-component#c369fed", "aframe-teleport-controls": "https://github.com/netpro2k/aframe-teleport-controls#feature/teleport-origin", "aframe-xr": "github:brianpeiris/aframe-xr#3162aed", "material-design-lite": "^1.3.0", diff --git a/src/input-mappings.js b/src/input-mappings.js index 622ee302f..b5b564b25 100644 --- a/src/input-mappings.js +++ b/src/input-mappings.js @@ -56,11 +56,8 @@ const config = { surfacetouchend: "thumb_up", thumbsticktouchstart: "thumb_down", thumbsticktouchend: "thumb_up", - triggerdown: "index_down", - triggerup: "index_up", - // @TODO: Patch AFIM to allow more than one action to be mapped to triggerdown - //triggerdown: "action_teleport_down", - //triggerup: "action_teleport_up", + triggerdown: ["action_teleport_down", "index_down"], + triggerup: ["action_teleport_up", "index_up"], "axismove.reverseY": { left: "move" }, right_dpad_east: "snap_rotate_right", right_dpad_west: "snap_rotate_left", diff --git a/yarn.lock b/yarn.lock index 7f6e2a812..063f702f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -51,9 +51,9 @@ aframe-extras@^3.12.4: aframe-physics-system "^1.4.3" three-pathfinding "^0.2.2" -"aframe-input-mapping-component@https://github.com/johnshaughnessy/aframe-input-mapping-component#23e2855": +"aframe-input-mapping-component@https://github.com/johnshaughnessy/aframe-input-mapping-component#c369fed": version "0.1.2" - resolved "https://github.com/johnshaughnessy/aframe-input-mapping-component#23e2855" + resolved "https://github.com/johnshaughnessy/aframe-input-mapping-component#c369fed313a708fd1e78179cfc9d0ea64433e5f9" aframe-lerp-component@^1.1.0: version "1.1.0" -- GitLab