From 709b27772fd670642ea7c4b8e8454e78c81d0b8a Mon Sep 17 00:00:00 2001 From: Kevin Ngo Date: Fri, 7 Dec 2018 18:11:00 -0800 Subject: [PATCH] add stats-param --- src/components/stats-param.js | 7 +++++++ src/index.html | 1 + 2 files changed, 8 insertions(+) create mode 100644 src/components/stats-param.js diff --git a/src/components/stats-param.js b/src/components/stats-param.js new file mode 100644 index 0000000..389bacc --- /dev/null +++ b/src/components/stats-param.js @@ -0,0 +1,7 @@ +AFRAME.registerComponent('stats-param', { + init: function () { + if (AFRAME.utils.getUrlParameter('stats') === 'true') { + this.el.setAttribute('stats', ''); + } + } +}); diff --git a/src/index.html b/src/index.html index 4e49db6..d6087e6 100644 --- a/src/index.html +++ b/src/index.html @@ -52,6 +52,7 @@ play-sound__crescendo="sound: #crescendo; event: victory; volume: 0.75" search stage-colors="color: blue" + stats-param vr-mode-ui="enterVRButton: #vrButton" tutorial-2d>