Removed unused function
This commit is contained in:
parent
c6e52138b3
commit
c21fd15815
@ -27,7 +27,6 @@ export type DiagramEvent = {
|
||||
type: DiagramEventType;
|
||||
menustate?: EditMenuState;
|
||||
entity?: DiagramEntity;
|
||||
|
||||
oldColor?: Color3;
|
||||
newColor?: Color3;
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import {ControllerEvent, ControllerEventType, Controllers} from "../controllers/
|
||||
import {Control3D, GUI3DManager, PlanePanel, Slider3D} from "@babylonjs/gui";
|
||||
import log, {Logger} from "loglevel";
|
||||
import {Field} from "./field";
|
||||
import {getFrontPosition} from "../util/functions/getFrontPosition";
|
||||
|
||||
|
||||
enum SoccerMenuState {
|
||||
PLAY,
|
||||
@ -180,7 +180,7 @@ export class SoccerMenu extends AbstractMenu {
|
||||
//panel.updateLayout();
|
||||
//slider.position.x = 1;
|
||||
this.createHandle(this.manager.rootContainer.children[0].node);
|
||||
this.handle.mesh.position = getFrontPosition(3, this.scene).add(new Vector3(0, .5, 0));
|
||||
//this.handle.mesh.position = getFrontPosition(3, this.scene).add(new Vector3(0, .5, 0));
|
||||
}
|
||||
|
||||
private handleClick(_info, state) {
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
import {MeshBuilder, Scene, Vector3} from "@babylonjs/core";
|
||||
|
||||
const debug = false;
|
||||
export function getFrontPosition(distance: number, scene: Scene): Vector3 {
|
||||
const offset = new Vector3(0, 0, distance);
|
||||
//offset.applyRotationQuaternionInPlace(scene.activeCamera.absoluteRotation);
|
||||
const camPos = scene.activeCamera.globalPosition.clone();
|
||||
const newPos = camPos.add(offset);
|
||||
if (debug) {
|
||||
const mesh = MeshBuilder.CreateIcoSphere("front", {radius: .1}, scene);
|
||||
mesh.position = newPos;
|
||||
}
|
||||
return newPos;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user