Skip to content

Commit 06b2323

Browse files
Fix all controls to use id instead of idPrefix when setting the tracked-controls component, only logitech-mx-ink-controls and meta-touch-controls were correct (fix #5772) (#5774)
1 parent 420b1e8 commit 06b2323

10 files changed

+10
-10
lines changed

src/components/generic-tracked-controller-controls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export var Component = registerComponent('generic-tracked-controller-controls',
127127
}
128128
el.setAttribute('tracked-controls', {
129129
hand: data.hand,
130-
idPrefix: GAMEPAD_ID_PREFIX,
130+
id: GAMEPAD_ID_PREFIX,
131131
iterateControllerProfiles: true
132132
});
133133
if (!this.data.defaultModel) { return; }

src/components/hp-mixed-reality-controls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export var Component = registerComponent('hp-mixed-reality-controls', {
117117

118118
el.setAttribute('tracked-controls', {
119119
// TODO: verify expected behavior between reserved prefixes.
120-
idPrefix: GAMEPAD_ID,
120+
id: GAMEPAD_ID,
121121
hand: data.hand,
122122
controller: this.controllerIndex
123123
});

src/components/magicleap-controls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export var Component = registerComponent('magicleap-controls', {
112112

113113
el.setAttribute('tracked-controls', {
114114
// TODO: verify expected behavior between reserved prefixes.
115-
idPrefix: GAMEPAD_ID_COMPOSITE,
115+
id: GAMEPAD_ID_COMPOSITE,
116116
hand: data.hand,
117117
controller: this.controllerIndex
118118
});

src/components/oculus-go-controls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export var Component = registerComponent('oculus-go-controls', {
103103
var data = this.data;
104104
el.setAttribute('tracked-controls', {
105105
hand: data.hand,
106-
idPrefix: GAMEPAD_ID_PREFIX
106+
id: GAMEPAD_ID_PREFIX
107107
});
108108
if (!this.data.model) { return; }
109109
this.el.setAttribute('gltf-model', OCULUS_GO_CONTROLLER_MODEL_URL);

src/components/pico-controls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export var Component = registerComponent('pico-controls', {
110110
var data = this.data;
111111
el.setAttribute('tracked-controls', {
112112
// TODO: verify expected behavior between reserved prefixes.
113-
idPrefix: GAMEPAD_ID,
113+
id: GAMEPAD_ID,
114114
hand: data.hand,
115115
controller: this.controllerIndex
116116
});

src/components/tracked-controls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export var Component = registerComponent('tracked-controls', {
6969
},
7070

7171
/**
72-
* Handle update controller match criteria (such as `id`, `idPrefix`, `hand`, `controller`)
72+
* Handle update controller match criteria (such as `id`, `hand`, `controller`)
7373
*/
7474
updateController: function () {
7575
this.controller = controllerUtils.findMatchingControllerWebXR(

src/components/valve-index-controls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export var Component = registerComponent('valve-index-controls', {
118118

119119
// If we have an OpenVR Gamepad, use the fixed mapping.
120120
el.setAttribute('tracked-controls', {
121-
idPrefix: GAMEPAD_ID_PREFIX,
121+
id: GAMEPAD_ID_PREFIX,
122122
// Hand IDs: 1 = right, 0 = left, 2 = anything else.
123123
controller: data.hand === 'right' ? 1 : data.hand === 'left' ? 0 : 2,
124124
hand: data.hand

src/components/vive-controls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export var Component = registerComponent('vive-controls', {
121121

122122
// If we have an OpenVR Gamepad, use the fixed mapping.
123123
el.setAttribute('tracked-controls', {
124-
idPrefix: GAMEPAD_ID_PREFIX,
124+
id: GAMEPAD_ID_PREFIX,
125125
hand: data.hand,
126126
controller: this.controllerIndex
127127
});

src/components/vive-focus-controls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export var Component = registerComponent('vive-focus-controls', {
9999
injectTrackedControls: function () {
100100
var el = this.el;
101101
el.setAttribute('tracked-controls', {
102-
idPrefix: GAMEPAD_ID_PREFIX
102+
id: GAMEPAD_ID_PREFIX
103103
});
104104
if (!this.data.model) { return; }
105105
this.el.setAttribute('gltf-model', VIVE_FOCUS_CONTROLLER_MODEL_URL);

src/components/windows-motion-controls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export var Component = registerComponent('windows-motion-controls', {
173173
injectTrackedControls: function () {
174174
var data = this.data;
175175
this.el.setAttribute('tracked-controls', {
176-
idPrefix: GAMEPAD_ID_PREFIX,
176+
id: GAMEPAD_ID_PREFIX,
177177
controller: data.pair,
178178
hand: data.hand
179179
});

0 commit comments

Comments
 (0)