setEulerFromRotationMatrix does not exist in three.js? -
i trying use following rotate mesh on own y axis:
// rotate object around arbitrary axis in object space var rotobjectmatrix; function rotatearoundobjectaxis(object, axis, radians) { rotobjectmatrix = new three.matrix4(); rotobjectmatrix.makerotationaxis(axis.normalize(), radians); object.matrix.multiplyself(rotobjectmatrix); // post-multiply
// new code three.js r50+ object.rotation.seteulerfromrotationmatrix(object.matrix); // old code three.js r49 , earlier: // object.rotation.getrotationfrommatrix(object.matrix, object.scale); }
the problem getting "object has no method 'seteulerfromrotationmatrix'". has method been deprecated? how around this?
it easy now.
object.rotatey( radians );
there also
object.rotateonaxis( axis, radians );
three.js r.59
Comments
Post a Comment