public destroy()

in src/globemap.ts [1353:1392]


        public destroy() {
            cancelAnimationFrame(this.animationFrameId);
            cancelAnimationFrame(this.cameraAnimationFrameId);
            clearTimeout(this.deferredRenderTimerId);
            this.renderLoopEnabled = false;
            this.scene = null;
            this.heatmap = null;
            this.heatTexture = null;
            this.camera = null;
            if (this.renderer) {
                if (this.renderer.context) {
                    const extension: { loseContext } = this.renderer.context.getExtension("WEBGL_lose_context");
                    if (extension) {
                        extension.loseContext();
                    }
                    this.renderer.context = null;
                }
                this.renderer.domElement = null;
            }
            this.renderer = null;
            this.data = null;
            this.barsGroup = null;
            if (this.orbitControls) {
                this.orbitControls.dispose();
            }

            this.orbitControls = null;
            if (this.rendererCanvas) {
                $(this.rendererCanvas)
                    .off("mousemove mouseup mousedown mousewheel DOMMouseScroll");
            }

            this.rendererCanvas = null;

            if (this.root) {
                this.root.empty();
            }

            this.hideTooltip();
        }