refactored config menu.

This commit is contained in:
Michael Mainguy 2023-08-01 15:02:50 -05:00
parent f1d974dd1d
commit d92f689d97

View File

@ -1,5 +1,5 @@
import {AdvancedDynamicTexture, RadioGroup, SelectionPanel} from "@babylonjs/gui"; import {AdvancedDynamicTexture, RadioGroup, SelectionPanel} from "@babylonjs/gui";
import {AbstractMesh, Angle, MeshBuilder, Scene, WebXRExperienceHelper} from "@babylonjs/core"; import {AbstractMesh, MeshBuilder, Scene, WebXRExperienceHelper} from "@babylonjs/core";
import {CameraHelper} from "../util/cameraHelper"; import {CameraHelper} from "../util/cameraHelper";
import log from "loglevel"; import log from "loglevel";
import {AppConfig} from "../util/appConfig"; import {AppConfig} from "../util/appConfig";
@ -46,9 +46,7 @@ export class ConfigMenu {
this.buildGridSizeControl(selectionPanel); this.buildGridSizeControl(selectionPanel);
this.buildRotationSnapControl(selectionPanel); this.buildRotationSnapControl(selectionPanel);
this.buildCreateScaleControl(selectionPanel); this.buildCreateScaleControl(selectionPanel);
CameraHelper.setMenuPosition(this.configPlane, this.scene);
this.configPlane.position = CameraHelper.getFrontPosition(2, this.scene);
this.configPlane.rotation.y = Angle.FromDegrees(180).radians();
} }
private createVal(value) { private createVal(value) {