mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 05:17:02 +02:00
Improve vector operations in floatingUIExample.js.
This commit is contained in:
parent
4965f1adda
commit
eab35d03d4
1 changed files with 1 additions and 7 deletions
|
@ -174,13 +174,7 @@ function onMouseUp(event) {
|
||||||
if (overlay.attachedPanel === bluePanel) {
|
if (overlay.attachedPanel === bluePanel) {
|
||||||
overlay.destroy();
|
overlay.destroy();
|
||||||
} else {
|
} else {
|
||||||
var oldPos = overlay.offsetPosition;
|
overlay.offsetPosition = Vec3.sum(overlay.offsetPosition, { x: 0, y: 0, z: -0.1 });
|
||||||
var newPos = {
|
|
||||||
x: Number(oldPos.x),
|
|
||||||
y: Number(oldPos.y),
|
|
||||||
z: Number(oldPos.z) - 0.1
|
|
||||||
};
|
|
||||||
overlay.offsetPosition = newPos;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue