Skip to content

Commit 6fff5ce

Browse files
fix: Send draw command upon dismount
1 parent 700d259 commit 6fff5ce

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

webgl-renderables/Mesh.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -508,16 +508,15 @@ Mesh.prototype.onMount = function onMount (node, id) {
508508
* @return {undefined} undefined
509509
*/
510510
Mesh.prototype.onDismount = function onDismount () {
511-
this._node = null;
512-
this._id = null;
513-
514511
this._initialized = false;
512+
this._inDraw = false;
515513

516-
if (this._inDraw) {
517-
this._changeQueue.push(Commands.GL_REMOVE_MESH);
518-
}
514+
this._node.sendDrawCommand(Commands.WITH);
515+
this._node.sendDrawCommand(this._node.getLocation());
516+
this._node.sendDrawCommand(Commands.GL_REMOVE_MESH);
519517

520-
this._requestUpdate();
518+
this._node = null;
519+
this._id = null;
521520
};
522521

523522
/**

0 commit comments

Comments
 (0)