Fix mat world it nan v3.3.0 (#9133)

* fix MatWorldIT will be used Nan for v3.3

* update
This commit is contained in:
troublemaker52025
2021-08-06 13:08:21 +08:00
committed by GitHub
parent 6c53d88327
commit 977c19dd1e
+1 -1
View File
@@ -355,7 +355,7 @@ export class Model {
if (!JSB) {
// fix precision lost of webGL on android device
// scale worldIT mat to around 1.0 by product its sqrt of determinant.
const det = Mat4.determinant(m4_1);
const det = Math.abs(Mat4.determinant(m4_1));
const factor = 1.0 / Math.sqrt(det);
Mat4.multiplyScalar(m4_1, m4_1, factor);
}