Merge branch 'refs/heads/master' into 889-ray-texture

This commit is contained in:
Zemledelec 2025-11-19 21:10:50 +04:00
commit 927bf485d2
4 changed files with 17 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@openglobus/og",
"version": "0.27.20",
"version": "0.27.21",
"description": "[openglobus](https://www.openglobus.org/) is a javascript/typescript library designed to display interactive 3d maps and planets with map tiles, imagery and vector data, markers, and 3D objects. It uses the WebGL technology, open source, and completely free.",
"main": "lib/og.es.js",
"types": "lib/index.d.ts",

View File

@ -1442,6 +1442,8 @@ class Renderer {
}
public destroy() {
this.labelWorker.destroy();
for (let i in this.controls) {
this.controls[i].remove();
}

View File

@ -1988,6 +1988,18 @@ export class Planet extends RenderNode {
this.quadTreeStrategy.clearRenderedNodes();
}
/**
* Destroy planet.
* @public
*/
public override destroy() {
this._terrainWorker.destroy();
this._plainSegmentWorker.destroy();
this.renderer?.destroy()
this.onremove();
super.destroy();
}
// function checkTerrainCollision(entity) {
// let _tempTerrPoint = new Vec3();
// let nodes = globus.planet._renderedNodes;

View File

@ -62,10 +62,8 @@ export class BaseWorker<T> {
w.onmessage = null;
w.terminate();
}
//@ts-ignore
this._pendingQueue = null;
//@ts-ignore
this._workerQueue = null;
this._pendingQueue = [];
this._workerQueue = [];
}
public get pendingQueue(): T[] {