Disable colors + restore clipping

This commit is contained in:
2026-05-19 07:40:45 +02:00
parent 9ae4b0bb8f
commit 106841f6ef
3 changed files with 6 additions and 4 deletions

View File

@@ -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);