We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 700d259 commit 6fff5ceCopy full SHA for 6fff5ce
1 file changed
webgl-renderables/Mesh.js
@@ -508,16 +508,15 @@ Mesh.prototype.onMount = function onMount (node, id) {
508
* @return {undefined} undefined
509
*/
510
Mesh.prototype.onDismount = function onDismount () {
511
- this._node = null;
512
- this._id = null;
513
-
514
this._initialized = false;
+ this._inDraw = false;
515
516
- if (this._inDraw) {
517
- this._changeQueue.push(Commands.GL_REMOVE_MESH);
518
- }
+ this._node.sendDrawCommand(Commands.WITH);
+ this._node.sendDrawCommand(this._node.getLocation());
+ this._node.sendDrawCommand(Commands.GL_REMOVE_MESH);
519
520
- this._requestUpdate();
+ this._node = null;
+ this._id = null;
521
};
522
523
/**
0 commit comments