Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
basic bus1 controller changing handlers
  • Loading branch information
kfarr committed Jun 12, 2019
1 parent c67b7ab commit 39e6c07
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bus-wasd.html
Expand Up @@ -27,7 +27,7 @@
bus1Capacity: 10,
stop1Peeps: 10,
stop2Peeps: 0,
bus1Controller: 2,
bus1ControllerId: 2,
},
handlers: {
decreaseBus1Peeps: function (state, action) {
Expand All @@ -44,6 +44,12 @@
},
increaseStop2Peeps: function (state, action) {
state.stop2Peeps += 1;
},
increaseBus1ControllerId: function (state, action) {
state.Bus1ControllerId += 1;
},
decreaseBus1ControllerId: function (state, action) {
state.Bus1ControllerId -= 1;
}
},
computeState: function (newState, payload) {
Expand Down Expand Up @@ -466,7 +472,7 @@
// tracked-controls="idPrefix: OpenVR; controller: 2; orientationOffset:-90 180 0"
var controllerEl = document.querySelector("#bus1-controller");
controllerEl.setAttribute("tracked-controls", "idPrefix: OpenVR; orientationOffset:-90 180 0");
controllerEl.setAttribute("bind__tracked-controls", "controller: bus1Controller");
controllerEl.setAttribute("bind__tracked-controls", "controller: bus1ControllerId");
document.querySelector("#tracker-model").setAttribute("visible", "true");
}

Expand Down

0 comments on commit 39e6c07

Please sign in to comment.