Node group colors and toggling (draft)

This commit is contained in:
2026-05-14 16:32:06 +02:00
parent 589b551558
commit 87245233b7
7 changed files with 82 additions and 19 deletions

View File

@@ -79,6 +79,11 @@ function loadNodes(nodes) {
node.load(n.model);
node.setRotation(...config.scene.initRotation);
node.setMaterial(new THREE.MeshPhongMaterial({
transparent: false,
color: n.color ?? '#fff',
}));
// Apply any transparency before attaching to scene
if (n.opacity !== undefined && n.opacity !== null) {
node.setMaterial(new THREE.MeshPhongMaterial({