Skip to content

Commit

Permalink
[xeokit#1631] fire events when position/scale/rotation are set
Browse files Browse the repository at this point in the history
  • Loading branch information
h.hajji committed Aug 16, 2024
1 parent 5810c4d commit e4539cf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/viewer/scene/mesh/Mesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ class Mesh extends Component {
this._setLocalMatrixDirty();
this._setAABBDirty();
this.glRedraw();
this.fire("position", this._position);
}

/**
Expand All @@ -465,6 +466,7 @@ class Mesh extends Component {
this._setLocalMatrixDirty();
this._setAABBDirty();
this.glRedraw();
this.fire("rotation", this._rotation);
}

/**
Expand Down Expand Up @@ -516,6 +518,7 @@ class Mesh extends Component {
this._setLocalMatrixDirty();
this._setAABBDirty();
this.glRedraw();
this.fire("scale", this._scale);
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/viewer/scene/model/SceneModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,7 @@ export class SceneModel extends Component {
this._setWorldMatrixDirty();
this._sceneModelDirty();
this.glRedraw();
this.fire("position", this._position);
}

/**
Expand All @@ -1490,6 +1491,7 @@ export class SceneModel extends Component {
this._setWorldMatrixDirty();
this._sceneModelDirty();
this.glRedraw();
this.fire("rotation", this._rotation);
}

/**
Expand Down
3 changes: 3 additions & 0 deletions src/viewer/scene/nodes/Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,7 @@ class Node extends Component {
this._setLocalMatrixDirty();
this._setAABBDirty();
this.glRedraw();
this.fire("position", this._position);
}

/**
Expand All @@ -1102,6 +1103,7 @@ class Node extends Component {
this._setLocalMatrixDirty();
this._setAABBDirty();
this.glRedraw();
this.fire("rotation", this._rotation);
}

/**
Expand Down Expand Up @@ -1153,6 +1155,7 @@ class Node extends Component {
this._setLocalMatrixDirty();
this._setAABBDirty();
this.glRedraw();
this.fire("scale", this._scale);
}

/**
Expand Down

0 comments on commit e4539cf

Please sign in to comment.