From 39e6c07b54760f6cfce7b773ff5d3e50554e3fe0 Mon Sep 17 00:00:00 2001 From: Kieran Farr Date: Tue, 11 Jun 2019 21:52:20 -0700 Subject: [PATCH] basic bus1 controller changing handlers --- bus-wasd.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bus-wasd.html b/bus-wasd.html index ab9d410..0a2cc57 100644 --- a/bus-wasd.html +++ b/bus-wasd.html @@ -27,7 +27,7 @@ bus1Capacity: 10, stop1Peeps: 10, stop2Peeps: 0, - bus1Controller: 2, + bus1ControllerId: 2, }, handlers: { decreaseBus1Peeps: function (state, action) { @@ -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) { @@ -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"); }