It's the second time I have this very weird bug: the Camera matrix and worldMatrix both become a list of NaN values.
It doesn't happen when running npm run dev, it happens only when I build and preview, on nextjs projects.
The error comes from Mat4Func.js, function getRotation(). I fixed it by changing line 550:
const temp = [0, 0, 0];
into this:
const temp = [1, 1, 1];
I suspect some division by zero happening in some specific cases.
🤷
Hey, first thanks for this awesome library!
It's the second time I have this very weird bug: the Camera matrix and worldMatrix both become a list of NaN values. It doesn't happen when running
npm run dev
, it happens only when I build and preview, on nextjs projects.The error comes from Mat4Func.js, function
getRotation()
. I fixed it by changing line 550:const temp = [0, 0, 0];
into this:const temp = [1, 1, 1];
I suspect some division by zero happening in some specific cases. 🤷