Add method to get box creation plane based on view mode

This commit is contained in:
2026-04-02 22:12:24 +02:00
parent 080e9b310e
commit e6f3c25c73

View File

@@ -459,6 +459,18 @@ export class ViewportHost {
this.applyOrthographicCameraPose();
}
private getBoxCreatePlane() {
switch (this.viewMode) {
case "perspective":
case "top":
return this.boxCreatePlane.set(new Vector3(0, 1, 0), 0);
case "front":
return this.boxCreatePlane.set(new Vector3(0, 0, 1), 0);
case "side":
return this.boxCreatePlane.set(new Vector3(1, 0, 0), 0);
}
}
private applyWorld() {
if (this.currentWorld === null) {
return;