From bd3b79186d87a2634bbf9d43c06cea4aac9101cd Mon Sep 17 00:00:00 2001 From: ijlal99 Date: Tue, 15 Oct 2024 01:18:52 +0500 Subject: [PATCH] Fix model not scaling when loading using XKTLoaderPlugin --- src/viewer/scene/model/SceneModel.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/viewer/scene/model/SceneModel.js b/src/viewer/scene/model/SceneModel.js index 6fc63f9e3a..10a13e3899 100644 --- a/src/viewer/scene/model/SceneModel.js +++ b/src/viewer/scene/model/SceneModel.js @@ -1606,6 +1606,8 @@ export class SceneModel extends Component { math.quaternionToRotationMat4(this._quaternion, this._worldRotationMatrix); math.conjugateQuaternion(this._quaternion, this._conjugateQuaternion); math.quaternionToRotationMat4(this._conjugateQuaternion, this._worldRotationMatrixConjugate); + math.scaleMat4v(this._scale, this._worldRotationMatrix); + math.scaleMat4v(this._scale, this._worldRotationMatrixConjugate); this._matrix.set(this._worldRotationMatrix); math.translateMat4v(this._position, this._matrix); this._matrixDirty = false;