mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Draw live AIS vessels from a GPU icon set
This commit is contained in:
1 parent
816002e3b9
commit
e0eb771217
20 files changed
+340
-318
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user