MCPcopy Create free account
hub / github.com/melonjs/melonJS / destroy

Method destroy

packages/debug-plugin/src/index.js:401–413  ·  view source on GitHub ↗

* destroy the debug plugin

()

Source from the content-addressed store, hash-verified

399 * destroy the debug plugin
400 */
401 destroy() {
402 this.hide();
403 // remove the HTML overlay
404 if (this.panelWrap?.parentElement) {
405 this.panelWrap.parentElement.removeChild(this.panelWrap);
406 }
407 event.off(event.CANVAS_ONRESIZE, this._onResize);
408 event.off(event.GAME_BEFORE_UPDATE, this._onBeforeUpdate);
409 event.off(event.GAME_AFTER_UPDATE, this._onAfterUpdate);
410 event.off(event.GAME_BEFORE_DRAW, this._onBeforeDraw);
411 event.off(event.GAME_AFTER_DRAW, this._onAfterDraw);
412 event.off(event.KEYDOWN, this._onKeyDown);
413 }
414}

Callers

nothing calls this directly

Calls 2

hideMethod · 0.95
removeChildMethod · 0.80

Tested by

no test coverage detected