Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scaling an object in three.js

Tags:

I am getting Matrix3.getInverse(): can't invert matrix, determinant is 0 three.js 3976 error when I am trying to scale a cube object.

var object = new.THREE.Mesh(geometry, material)
 xScale = 0.1;
 object.scale.x = object.scale.y = object.scale.z = xScale;

Could someone help me out of this.

like image 487
user2788945 Avatar asked Oct 03 '13 03:10

user2788945


1 Answers

Matrix3.getInverse(): can't invert matrix, determinant is 0 usually happens when either the scale.x, scale.y or scale.z are 0. Make sure you're not scaling the object to 0.

like image 50
mrdoob Avatar answered Oct 10 '22 13:10

mrdoob