@woosh/meep-engine 2.33.73 → 2.33.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -28,9 +28,12 @@ export function rotate_from_view(displacement_x, displacement_y, input, output)
|
|
|
28
28
|
// crop yaw and pitch to safe range of -PI to PI
|
|
29
29
|
const i_pitch = normalize_angle_rad(input.pitch);
|
|
30
30
|
const i_yaw = normalize_angle_rad(input.yaw);
|
|
31
|
+
const i_roll = normalize_angle_rad(input.roll);
|
|
32
|
+
|
|
33
|
+
const d_roll = (i_roll >= Math.PI || i_roll <= -Math.PI) ? -1 : 1;
|
|
31
34
|
|
|
32
35
|
// flip rotation axis when pitch is over 90deg in either direction, that is UP vector is pointing down
|
|
33
|
-
const d_yaw = ((i_pitch > Math.PI || i_pitch < -Math.PI) ? -1 : 1) * displacement_x;
|
|
36
|
+
const d_yaw = d_roll * ((i_pitch > Math.PI || i_pitch < -Math.PI) ? -1 : 1) * displacement_x;
|
|
34
37
|
|
|
35
38
|
output.yaw = i_yaw + d_yaw;
|
|
36
39
|
output.pitch = i_pitch - displacement_y;
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"productName": "Meep",
|
|
6
6
|
"description": "production-ready JavaScript game engine based on Entity Component System Architecture",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.33.
|
|
8
|
+
"version": "2.33.74",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"gl-matrix": "3.4.3",
|
|
11
11
|
"fast-levenshtein": "2.0.6",
|