Draw live AIS vessels from a GPU icon set

This commit is contained in:
Sameh Khamis committed 2026-11-03 21:16:19 -08:00
1 parent 816002e3b9
commit e0eb771217
20 files changed
+340 -318

No files matched your search

+10 -3
View File
@@ -208,13 +208,19 @@ const EARTH_BOUNDS = new Cesium.BoundingSphere(
);
/**
* @param {{ set: object, renderTime: () => Cesium.JulianDate }} options `renderTime`
* gives the instant to draw at (the layer's delayed clock).
* @param {{ set: object, renderTime: () => Cesium.JulianDate,
* requestRender?: () => void }} options `renderTime` gives the instant to draw
* at (the layer's delayed clock). `requestRender` asks for a frame when the
* atlas packs a newly loaded image, for a layer that does not render
* continuously.
*/
export class IconSetPrimitive {
constructor({ set, renderTime }) {
constructor({ set, renderTime, requestRender }) {
this.set = set;
this.renderTime = renderTime;
this._stopAtlasListener = requestRender
? iconAtlas.onChange(requestRender)
: null;
this.show = true;
this._tau = 0;
this._generation = -1;
@@ -571,6 +577,7 @@ export class IconSetPrimitive {
}
destroy() {
this._stopAtlasListener?.();
this._destroyBuffers();
this._programs?.opaque.destroy();
this._programs?.translucent.destroy();