diff --git a/js/controllers/menu_controller.js b/js/controllers/menu_controller.js index 5a30e92..ebb2ea2 100644 --- a/js/controllers/menu_controller.js +++ b/js/controllers/menu_controller.js @@ -193,6 +193,7 @@ export default class extends Controller { ${node.id} `; // Add color "swatch" only for first level groups + /* if (node.depth === 2) { trigger.innerHTML += html`
`; } + */ const collapseDiv = document.createElement('div'); collapseDiv.className = 'collapse'; diff --git a/js/scene.js b/js/scene.js index ccf5d5c..ae7c4e2 100644 --- a/js/scene.js +++ b/js/scene.js @@ -79,10 +79,12 @@ 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) { diff --git a/js/utils/clipping.js b/js/utils/clipping.js index f9d6c9b..8ad7e1a 100644 --- a/js/utils/clipping.js +++ b/js/utils/clipping.js @@ -31,14 +31,12 @@ function createClippingPlaneMesh (boundingSphere) { * @param {String} axis */ function dragClipper (planeMesh, axis) { - const controls = new THREE.TransformControls( + const controls = new THREE.DragControls( + [planeMesh], ATON.Nav._camera, ATON._renderer.domElement, ); - controls.attach(planeMesh); - controls.setMode('translate'); - const startPosition = new THREE.Vector3(); // Only move along the selected axis (exlude the others) const excludedAxes = ['x', 'y', 'z'].filter(a => a != axis);