From cabfe687e22579ad58be4ebaeae0efce512bb015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20P?= Date: Wed, 22 Apr 2026 10:34:27 +0200 Subject: [PATCH] Handle invisible nodes (temp) --- config.js | 1 + js/scene.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config.js b/config.js index 4191a0e..d8e9402 100644 --- a/config.js +++ b/config.js @@ -49,6 +49,7 @@ export const config = { label: 'Teatro', model: 'models/ssgp/Teatro_SSGP_Full_ConSottrazioni.glb', opacity: 0.0, + isInvisible: true, children: [ /* { diff --git a/js/scene.js b/js/scene.js index 27ad263..4801a87 100644 --- a/js/scene.js +++ b/js/scene.js @@ -88,6 +88,9 @@ function loadNodes(nodes) { })); } + // Disable a node for picking (shadows, light probe etc.) + if (n.isInvisible) node.hide(); + node.attachToRoot(); if (n.isMain) { @@ -96,7 +99,7 @@ function loadNodes(nodes) { AppState.clipping.boundingSphere = node.getBound(); } - AppState.nodes.push({id: n.label, active: true}); + AppState.nodes.push({id: n.label, active: n.isInvisible ? false: true}); }); if (!AppState.clipping.boundingSphere) {