From 0572fe7294a6ceb797e6cf47e4a6bfddb0c824e8 Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Sun, 22 Jan 2023 08:04:19 +0100 Subject: [PATCH] removeOutlineFromEntity --- index.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.html b/index.html index e0ed576..e24c68f 100644 --- a/index.html +++ b/index.html @@ -2049,6 +2049,7 @@ function newPrimitiveWithOutline( name="box", position="0 0 0", scale=".1 .1 .1" el_outline.setAttribute("scale", "1.01 1.01 1.01") el_outline.setAttribute("color", "gray") el_outline.setAttribute("wireframe", "true") + el_outline.className = "outline_object" return el } @@ -2132,6 +2133,11 @@ function startExperience(){ } // could change model opacity based on hand position, fading out when within a (very small here) safe space + +function removeOutlineFromEntity( el ){ + [...el.querySelectorAll(".outline_object")].map( i => i.remove() ) +} +