removed button help from controllers.
This commit is contained in:
parent
36e4b04957
commit
d761a59d6d
@ -1,16 +1,8 @@
|
|||||||
import {
|
import {Vector3, WebXRControllerComponent, WebXRDefaultExperience, WebXRInputSource} from "@babylonjs/core";
|
||||||
TransformNode,
|
|
||||||
Vector2,
|
|
||||||
Vector3,
|
|
||||||
WebXRControllerComponent,
|
|
||||||
WebXRDefaultExperience,
|
|
||||||
WebXRInputSource
|
|
||||||
} from "@babylonjs/core";
|
|
||||||
import {Base} from "./base";
|
import {Base} from "./base";
|
||||||
import {ControllerEventType} from "./controllers";
|
import {ControllerEventType} from "./controllers";
|
||||||
import log from "loglevel";
|
import log from "loglevel";
|
||||||
import {DiagramManager} from "../diagram/diagramManager";
|
import {DiagramManager} from "../diagram/diagramManager";
|
||||||
import {RoundButton} from "../objects/roundButton";
|
|
||||||
import {DefaultScene} from "../defaultScene";
|
import {DefaultScene} from "../defaultScene";
|
||||||
|
|
||||||
const logger = log.getLogger('Left');
|
const logger = log.getLogger('Left');
|
||||||
@ -30,18 +22,8 @@ export class Left extends Base {
|
|||||||
this.moveMovable(value);
|
this.moveMovable(value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (init.components['x-button']) {
|
|
||||||
const transform = new TransformNode('x-button', scene);
|
|
||||||
transform.parent = controller.grip;
|
|
||||||
transform.rotation.x = Math.PI / 2;
|
|
||||||
transform.scaling = new Vector3(.2, .2, .2);
|
|
||||||
const xbutton = new RoundButton(transform, 'X', 'toggle toolbox menu', new Vector2(-.5, -.1));
|
|
||||||
const ybutton = new RoundButton(transform, 'Y', 'toggle settings menu', new Vector2(-.4, .1));
|
|
||||||
}
|
|
||||||
this.initXButton(init.components['x-button']);
|
this.initXButton(init.components['x-button']);
|
||||||
this.initYButton(init.components['y-button']);
|
this.initYButton(init.components['y-button']);
|
||||||
const buttonhome = new TransformNode('buttons', scene)
|
|
||||||
|
|
||||||
this.initTrigger(init.components['xr-standard-trigger']);
|
this.initTrigger(init.components['xr-standard-trigger']);
|
||||||
init.components['xr-standard-thumbstick'].onButtonStateChangedObservable.add((value) => {
|
init.components['xr-standard-thumbstick'].onButtonStateChangedObservable.add((value) => {
|
||||||
if (value.pressed) {
|
if (value.pressed) {
|
||||||
|
|||||||
@ -1,16 +1,8 @@
|
|||||||
import {Base} from "./base";
|
import {Base} from "./base";
|
||||||
import {
|
import {Vector3, WebXRControllerComponent, WebXRDefaultExperience, WebXRInputSource} from "@babylonjs/core";
|
||||||
TransformNode,
|
|
||||||
Vector2,
|
|
||||||
Vector3,
|
|
||||||
WebXRControllerComponent,
|
|
||||||
WebXRDefaultExperience,
|
|
||||||
WebXRInputSource
|
|
||||||
} from "@babylonjs/core";
|
|
||||||
import {ControllerEventType} from "./controllers";
|
import {ControllerEventType} from "./controllers";
|
||||||
|
|
||||||
import {DiagramManager} from "../diagram/diagramManager";
|
import {DiagramManager} from "../diagram/diagramManager";
|
||||||
import {RoundButton} from "../objects/roundButton";
|
|
||||||
import log from "loglevel";
|
import log from "loglevel";
|
||||||
import {DefaultScene} from "../defaultScene";
|
import {DefaultScene} from "../defaultScene";
|
||||||
|
|
||||||
@ -46,15 +38,6 @@ export class Right extends Base {
|
|||||||
|
|
||||||
this.xrInputSource.onMotionControllerInitObservable.add((init) => {
|
this.xrInputSource.onMotionControllerInitObservable.add((init) => {
|
||||||
this.initTrigger(init.components['xr-standard-trigger']);
|
this.initTrigger(init.components['xr-standard-trigger']);
|
||||||
if (init.components['a-button']) {
|
|
||||||
const transform = new TransformNode('a-button', scene);
|
|
||||||
transform.parent = controller.grip;
|
|
||||||
transform.rotation.x = Math.PI / 2;
|
|
||||||
transform.scaling = new Vector3(.2, .2, .2);
|
|
||||||
const abutton = new RoundButton(transform, 'A', 'toggle edit menu', new Vector2(.5, -.1));
|
|
||||||
const bbutton = new RoundButton(transform, 'B', 'toggle diagram selector', new Vector2(.4, .1));
|
|
||||||
|
|
||||||
}
|
|
||||||
this.initBButton(init.components['b-button']);
|
this.initBButton(init.components['b-button']);
|
||||||
this.initAButton(init.components['a-button']);
|
this.initAButton(init.components['a-button']);
|
||||||
this.initThumbstick(init.components['xr-standard-thumbstick']);
|
this.initThumbstick(init.components['xr-standard-thumbstick']);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user