Draft groups in layers menu

TODO: don't use Bootstrap's switches!!
This commit is contained in:
2026-05-15 17:32:06 +02:00
parent 87245233b7
commit 11acecd33d
7 changed files with 88 additions and 31 deletions

View File

@@ -31,12 +31,14 @@ function createClippingPlaneMesh (boundingSphere) {
* @param {String} axis
*/
function dragClipper (planeMesh, axis) {
const controls = new THREE.DragControls(
[planeMesh],
const controls = new THREE.TransformControls(
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);