changed Y axis control

This commit is contained in:
gbrochar 2020-11-27 13:36:06 +01:00
parent 420701855e
commit c68110c9fa
4 changed files with 7 additions and 7 deletions

View File

@ -25,7 +25,7 @@ export function updateCamera(context: any) {
if (context.params.keyboard.space) {
context.params.camPos.y -= 1;
}
if (context.params.keyboard.control) {
if (context.params.keyboard.shift) {
context.params.camPos.y += 1;
}
if (context.params.keyboard.w) {

View File

@ -40,7 +40,7 @@ export function initParams(context: any) {
s: false,
d: false,
space: false,
control: false,
shift: false,
},
};
}

View File

@ -38,8 +38,8 @@ export function initUX(context: any, canvas: any) {
if (event.key == 'd') {
context.params.keyboard.d = true;
}
if (event.key == 'Control') {
context.params.keyboard.control = true;
if (event.key == 'Shift') {
context.params.keyboard.shift = true;
}
if (event.key == ' ') {
context.params.keyboard.space = true;
@ -58,8 +58,8 @@ export function initUX(context: any, canvas: any) {
if (event.key == 'd') {
context.params.keyboard.d = false;
}
if (event.key == 'Control') {
context.params.keyboard.control = false;
if (event.key == 'Shift') {
context.params.keyboard.shift = false;
}
if (event.key == ' ') {
context.params.keyboard.space = false;

View File

@ -16,7 +16,7 @@
<div id='ui'>
<div class='ui-block'>
To control the camera orientation with mouse, click in the canvas, to exit, click again.<br>
To control the camera position, use W/S for Z axis, A/D for X axis, and Space/Control for fixed Y axis.
To control the camera position, use W/S for Z axis, A/D for X axis, and Space/Shift for fixed Y axis.
</div>
<div class='ui-block'>
<div style='display: inline;'>Change shader: </div>