From dfecb768cb23d89a0014e7c567e5dcfa8bc34355 Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Sat, 1 Oct 2022 14:16:22 +0200 Subject: [PATCH] disable-components-via-url --- index.html | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/index.html b/index.html index 50181f0..8259cff 100644 --- a/index.html +++ b/index.html @@ -77,6 +77,17 @@ setTimeout( _ => // could add a dedicated MakeyMakey mode with a fixed camera, e.g bird eye view, and an action based on some physical input that others, thanks to NAF, could see or even use. // ?inputmode=makeymakey +AFRAME.registerComponent('disable-components-via-url', { + init: function () { + var src = AFRAME.utils.getUrlParameter('disable-components-via-url') + if (src && src != "") { + src.split(",").map( c => { + Array.from( document.querySelectorAll("["+c+"]") ).map( e => { e.removeAttribute(c) }) + }) + } + } +}) + // e.g background https://fabien.benetou.fr/pub/home/metaverse.png might have to allow options like scale to allow for modifying both size and ratio AFRAME.registerComponent('background-via-url', { // non interactive mode init: function () { @@ -1439,8 +1450,8 @@ var generators = "line-link-entities link screenstack dynamic-view selectionboxo
@@ -1488,33 +1499,8 @@ fot - - - - - - - - - - - - - - - - -->