mirror of https://github.com/vladmandic/human
update angle calculations
parent
83fb9cac03
commit
6854256668
|
@ -11,9 +11,8 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
|
||||||
|
|
||||||
### **HEAD -> main** 2021/08/17 mandic00@live.com
|
### **HEAD -> main** 2021/08/17 mandic00@live.com
|
||||||
|
|
||||||
|
- strict type checks
|
||||||
### **origin/main** 2021/08/15 mandic00@live.com
|
- add webgu checks
|
||||||
|
|
||||||
- experimental webgpu support
|
- experimental webgpu support
|
||||||
- add experimental webgu demo
|
- add experimental webgu demo
|
||||||
- add backend initialization checks
|
- add backend initialization checks
|
||||||
|
|
|
@ -86,6 +86,9 @@ const calculateFaceAngle = (face, imageSize): {
|
||||||
thetaY = Math.atan2(r21, r22);
|
thetaY = Math.atan2(r21, r22);
|
||||||
thetaX = 0;
|
thetaX = 0;
|
||||||
}
|
}
|
||||||
|
if (!isNaN(thetaX)) thetaX = 0;
|
||||||
|
if (!isNaN(thetaY)) thetaY = 0;
|
||||||
|
if (!isNaN(thetaZ)) thetaZ = 0;
|
||||||
return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ };
|
return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ };
|
||||||
};
|
};
|
||||||
// simple Euler angle calculation based existing 3D mesh
|
// simple Euler angle calculation based existing 3D mesh
|
||||||
|
|
Loading…
Reference in New Issue