Skip to content

Commit 6049ceb

Browse files
authored
Remove WebVR support and polyfill (#5451)
* Remove WebVR specific code * Remove unused orientationOffset from the controls components --------- Co-authored-by: Noeri Huisman <mrxz@users.noreply.github.com>
1 parent 4449ed5 commit 6049ceb

35 files changed

+60
-2231
lines changed

docs/components/magicleap-controls.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ mappings, events, and Magic Leap controller model/
3131
|----------------------|----------------------------------------------------|----------------------|
3232
| hand | The hand that will be tracked (e.g., right, left). | |
3333
| model | Whether the Magic Leap controller model is loaded. | true |
34-
| orientationOffset | Offset to apply to model orientation. | x: 0, y: 0, z: 0 |
3534

3635
## Events
3736

docs/components/oculus-touch-controls.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ mappings, events, and a Touch controller model.
2626
|----------------------|----------------------------------------------------|----------------------|
2727
| hand | The hand that will be tracked (i.e., right, left). | left |
2828
| model | Whether the Touch controller model is loaded. | true |
29-
| orientationOffset | Offset to apply to model orientation. | x: 0, y: 0, z: 0 |
3029

3130
## Events
3231

docs/components/tracked-controls.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ so using idPrefix for Vive / OpenVR controllers is recommended.
4040

4141
| Property | Description | Default Value |
4242
|-------------------|------------------------------------------------------------------------------------------|------------------|
43-
| armModel | Whether the arm model is used for positional data if absent. | true |
4443
| autoHide | Whether to toggle visibility automatically when controller is connected or disconnected. | true |
4544
| controller | Index of the controller in array returned by the Gamepad API. | 0 |
4645
| id | Selects the controller from the Gamepad API using exact match. | |
4746
| idPrefix | Selects the controller from the Gamepad API using prefix match. | |
4847
| headElement | Head element for arm model if needed (if not active camera). | |
4948
| hand | Which hand to use, if arm model is needed. (left negates X) | right |
50-
| orientationOffset | Offset to apply to model orientation. | x: 0, y: 0, z: 0 |
5149
| space | Specifies whether to use targetRayspace or gripSpace to determine controller pose. | targetRaySpace |
5250

5351
## Events

docs/components/vive-controls.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ buttons (trigger, grip, menu, system) and trackpad.
2929
| buttonHighlightColor | Button colors when pressed and active. | #22D1EE (light blue) |
3030
| hand | The hand that will be tracked (i.e., right, left). | left |
3131
| model | Whether the Vive controller model is loaded. | true |
32-
| orientationOffset | Offset to apply to model orientation. | x: 0, y: 0, z: 0 |
3332

3433
## Events
3534

docs/components/vive-focus-controls.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@ and/or pressed buttons (trackpad, trigger).
3030

3131
| Property | Description | Default |
3232
|----------------------|----------------------------------------------------|----------------------|
33-
| armModel | Whether the arm model is used for positional data. | true |
3433
| buttonTouchedColor | Button colors when touched (Trackpad only). | #777777 |
3534
| buttonHighlightColor | Button colors when pressed and active. | #FFFFFF |
3635
| hand | The hand that will be tracked (e.g., right, left). | |
3736
| model | Whether the Vive Focus controller model is loaded. | true |
38-
| orientationOffset | Offset to apply to model orientation. | x: 0, y: 0, z: 0 |
3937

4038
## Events
4139

docs/components/windows-motion-controls.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ to the pressed buttons (trigger, grip, menu, thumbstick, trackpad) and moved axe
2929
| hand | The hand that will be tracked (i.e., right, left). | right |
3030
| pair | Which pair of controllers, if > 2 are connected. | 0 |
3131
| model | Whether the controller model is loaded. | true |
32-
| hideDisconnected | Disable rendering of controller model when no matching gamepad (based on ID & hand) is connected. | true |
3332

3433

3534
## Events

docs/core/globals.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ global. This same interface is also exposed if requiring with CommonJS
4848
| Property | Description |
4949
| ---------- | ------------- |
5050
| AFRAME | The object described above. |
51-
| hasNativeWebVRImplementation | Whether the client has native WebVR support. |
5251

5352
## Requiring `AFRAME` in a Node.js Environment
5453

docs/introduction/interactions-and-controllers.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,7 @@ AFRAME.registerComponent('custom-controls', {
454454
var el = this.el;
455455
var controlConfiguration = {
456456
hand: hand,
457-
model: false,
458-
orientationOffset: {x: 0, y: 0, z: hand === 'left' ? 90 : -90}
457+
model: false
459458
};
460459

461460
// Build on top of controller components.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141
"load-bmfont": "^1.2.3",
4242
"super-animejs": "^3.1.0",
4343
"three": "npm:super-three@0.169.0",
44-
"three-bmfont-text": "dmarcos/three-bmfont-text#eed4878795be9b3e38cf6aec6b903f56acd1f695",
45-
"webvr-polyfill": "^0.10.12"
44+
"three-bmfont-text": "dmarcos/three-bmfont-text#eed4878795be9b3e38cf6aec6b903f56acd1f695"
4645
},
4746
"devDependencies": {
4847
"@babel/core": "^7.24.0",

scripts/preghpages.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ const path = require('path');
55
const shell = require('shelljs');
66
const replace = require('replace-in-file');
77

8-
// Inject `<meta>` tag for Chrome for Android's WebVR Origin Trial:
9-
// https://webvr.rocks/chrome_for_android#what_is_the_webvr_origin_trial
10-
const originTrialMetaTag = `
11-
<!-- Origin Trial Token, feature = WebVR (For Chrome M59+), origin = https://aframe.io, expires = 2017-07-28 -->
12-
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M59+)" data-expires="2017-07-28" content="ArFv1ZeTwzkhjNE00uAE+XtiQB41fwqG/TqlFMLrepd9sforQSvQE/tgfIbUMYNuNre4QR1k4/z8xp2mV3dbhwwAAABeeyJvcmlnaW4iOiJodHRwczovL2FmcmFtZS5pbzo0NDMiLCJmZWF0dXJlIjoiV2ViVlIxLjEiLCJleHBpcnkiOjE1MDEyMTcwMDIsImlzU3ViZG9tYWluIjp0cnVlfQ==">
13-
`.trim();
148
const rootDir = path.join(__dirname, '..');
159

1610
shell.cd(rootDir);
@@ -34,4 +28,3 @@ function htmlReplace (before, after) {
3428
}
3529

3630
htmlReplace('dist/aframe-master.js', 'dist/aframe-master.min.js');
37-
htmlReplace('<head>', `<head>\n ${originTrialMetaTag}`);

0 commit comments

Comments
 (0)