WIP: first reworking based on requirements

NOTE: node loading logic not working yet!
This commit is contained in:
2026-02-20 17:25:06 +01:00
parent 32424e7b0b
commit 2df5a71241
4 changed files with 125 additions and 120 deletions

View File

@@ -62,7 +62,7 @@ Scene.createClippingPlaneMesh = function (boundingSphere) {
const planeSize = boundingSphere.radius * 1.5;
const mesh = new THREE.Mesh(
new THREE.PlaneGeometry(planeSize, planeSize),
new THREE.MeshBasicMaterial({ color: 0xffff00, opacity: 0.1, side: THREE.DoubleSide, transparent: true })
new THREE.MeshBasicMaterial({ color: 0xffff00, opacity: 0.05, side: THREE.DoubleSide, transparent: true })
);
return mesh;
@@ -261,6 +261,12 @@ Scene.loadNodes = function (nodes) {
let node = ATON.createSceneNode(n.label);
node.load(n.model);
node.setRotation(0, 1.5, 0);
// Apply any transparency before attaching to scene
if (n.opacity) {
node.setMaterial(new THREE.MeshPhongMaterial({transparent: true, opacity: n.opacity, color: '#fff'}));
}
node.attachToRoot();
if (n.isMain) {
@@ -269,6 +275,7 @@ Scene.loadNodes = function (nodes) {
AppState.clipping.boundingSphere = node.getBound();
}
AppState.nodes.push({id: n.label, active: true});
});
}