Skip to content

Commit

Permalink
Make SceneModel::matrix setter decompose to other transformation prop…
Browse files Browse the repository at this point in the history
…erties
  • Loading branch information
MichalDybizbanskiCreoox committed Oct 16, 2024
1 parent 71aa749 commit 0cd69a0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/viewer/scene/model/SceneModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1562,13 +1562,7 @@ export class SceneModel extends Component {
*/
set matrix(value) {
this._matrix.set(value || DEFAULT_MATRIX);

math.quaternionToRotationMat4(this._quaternion, this._worldRotationMatrix);
math.conjugateQuaternion(this._quaternion, this._conjugateQuaternion);
math.quaternionToRotationMat4(this._quaternion, this._worldRotationMatrixConjugate);
this._matrix.set(this._worldRotationMatrix);
math.translateMat4v(this._position, this._matrix);

math.decomposeMat4(this._matrix, this._position, this._quaternion, this._scale);
this._matrixDirty = false;
this._setWorldMatrixDirty();
this._sceneModelDirty();
Expand Down

0 comments on commit 0cd69a0

Please sign in to comment.