Fix bugs related to z scaling

This commit is contained in:
Fuhrmann 2025-03-28 13:01:52 +01:00
parent e7ff4c5493
commit e3a4018582
6 changed files with 156 additions and 110 deletions

View file

@ -140,10 +140,14 @@ export function Form() {
const [emptyProfile, setEmptyProfile] = useState<boolean>(false);
const { sceneView } = useContext(SceneViewContext) as SceneViewContextType;
function handleChangeSlicingBox() {
function handleChangeSlicingBox(e: ChangeEvent<HTMLInputElement>) {
if (!sceneView) return;
sceneView.toggleClippingBox();
if (e.target.checked) {
sceneView.toggleClippingBox(true);
} else {
sceneView.toggleClippingBox(false);
}
}
function handleChangeCG() {
@ -217,10 +221,8 @@ export function Form() {
if (e.target.checked) {
sceneView.explode(true);
// setExploded(true);
} else {
sceneView.explode(false);
// setExploded(false);
}
}

View file

@ -14,7 +14,7 @@ export function RangeSlider() {
const z = parseFloat(t.value);
if (!isNaN(z)) {
setScale(z);
sceneView.scene.scale.set(1, 1, z);
sceneView.setZScale(z);
}
};
return (