@deck.gl/extensions 8.8.22 → 8.8.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/typed/common/projection-utils.d.ts +27 -0
- package/typed/common/projection-utils.d.ts.map +1 -0
- package/typed/mask/mask-effect.d.ts +1 -1
- package/typed/mask/mask-effect.d.ts.map +1 -1
- package/typed/mask/mask-pass.d.ts +1 -1
- package/typed/mask/mask-pass.d.ts.map +1 -1
- package/typed/terrain/height-map.d.ts +27 -0
- package/typed/terrain/height-map.d.ts.map +1 -0
- package/typed/terrain/shader-module-offset.d.ts +4 -0
- package/typed/terrain/shader-module-offset.d.ts.map +1 -0
- package/typed/terrain/shader-module-source.d.ts +4 -0
- package/typed/terrain/shader-module-source.d.ts.map +1 -0
- package/typed/terrain/shader-module.d.ts +31 -0
- package/typed/terrain/shader-module.d.ts.map +1 -0
- package/typed/terrain/terrain-cover.d.ts +40 -0
- package/typed/terrain/terrain-cover.d.ts.map +1 -0
- package/typed/terrain/terrain-effect.d.ts +29 -0
- package/typed/terrain/terrain-effect.d.ts.map +1 -0
- package/typed/terrain/terrain-pass.d.ts +11 -0
- package/typed/terrain/terrain-pass.d.ts.map +1 -0
- package/typed/terrain/terrain-picking-pass.d.ts +19 -0
- package/typed/terrain/terrain-picking-pass.d.ts.map +1 -0
- package/typed/terrain/terrain.d.ts +21 -0
- package/typed/terrain/terrain.d.ts.map +1 -0
- package/typed/terrain/utils.d.ts +5 -0
- package/typed/terrain/utils.d.ts.map +1 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@deck.gl/extensions",
|
|
3
3
|
"description": "Plug-and-play functionalities for deck.gl layers",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "8.8.
|
|
5
|
+
"version": "8.8.24",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"@luma.gl/core": "^8.0.0",
|
|
39
39
|
"gl-matrix": "^3.0.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "39b37f7a97ad7a248f4d3a8eb1e25e9e91049147"
|
|
42
42
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Layer, Viewport } from '@deck.gl/core/typed';
|
|
2
|
+
/** Bounds in CARTESIAN coordinates */
|
|
3
|
+
export declare type Bounds = [minX: number, minY: number, maxX: number, maxY: number];
|
|
4
|
+
export declare function joinLayerBounds(
|
|
5
|
+
/** The layers to combine */
|
|
6
|
+
layers: Layer[],
|
|
7
|
+
/** A Viewport instance that is used to determine the type of the view */
|
|
8
|
+
viewport: Viewport): Bounds | null;
|
|
9
|
+
/** Construct a viewport that just covers the target bounds. Used for rendering to common space indexed texture. */
|
|
10
|
+
export declare function makeViewport(opts: {
|
|
11
|
+
/** The cartesian bounds of layers that will render into this texture */
|
|
12
|
+
bounds: Bounds;
|
|
13
|
+
/** Target width. If not specified, will be deduced from zoom */
|
|
14
|
+
width?: number;
|
|
15
|
+
/** Target height. If not specified, will be deduced from zoom */
|
|
16
|
+
height?: number;
|
|
17
|
+
/** Target zoom. If not specified, will be deduced from width and height */
|
|
18
|
+
zoom?: number;
|
|
19
|
+
/** Border around the viewport in pixels */
|
|
20
|
+
border?: number;
|
|
21
|
+
/** A viewport used to determine the output type */
|
|
22
|
+
viewport: Viewport;
|
|
23
|
+
}): Viewport | null;
|
|
24
|
+
/** Returns viewport bounds in CARTESIAN coordinates */
|
|
25
|
+
export declare function getViewportBounds(viewport: Viewport, zRange?: [number, number]): Bounds;
|
|
26
|
+
export declare function getRenderBounds(layerBounds: Bounds, viewport: Viewport, zRange?: [number, number]): Bounds;
|
|
27
|
+
//# sourceMappingURL=projection-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projection-utils.d.ts","sourceRoot":"","sources":["../../src/common/projection-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,KAAK,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AAKnD,sCAAsC;AACtC,oBAAY,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAM9E,wBAAgB,eAAe;AAC7B,4BAA4B;AAC5B,MAAM,EAAE,KAAK,EAAE;AACf,yEAAyE;AACzE,QAAQ,EAAE,QAAQ,GACjB,MAAM,GAAG,IAAI,CAyBf;AAID,mHAAmH;AACnH,wBAAgB,YAAY,CAAC,IAAI,EAAE;IACjC,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,QAAQ,EAAE,QAAQ,CAAC;CACpB,GAAG,QAAQ,GAAG,IAAI,CAuDlB;AAED,uDAAuD;AACvD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CA0BvF;AAMD,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,EAClB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,MAAM,CA+BR"}
|
|
@@ -18,7 +18,7 @@ export default class MaskEffect implements Effect {
|
|
|
18
18
|
private maskPass?;
|
|
19
19
|
private maskMap?;
|
|
20
20
|
private lastViewport?;
|
|
21
|
-
preRender(gl: WebGLRenderingContext, { layers, layerFilter, viewports, onViewportActive, views }: PreRenderOptions): void;
|
|
21
|
+
preRender(gl: WebGLRenderingContext, { layers, layerFilter, viewports, onViewportActive, views, pass }: PreRenderOptions): void;
|
|
22
22
|
private _renderChannel;
|
|
23
23
|
/**
|
|
24
24
|
* Find a channel to render each mask into
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask-effect.d.ts","sourceRoot":"","sources":["../../src/mask/mask-effect.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"mask-effect.d.ts","sourceRoot":"","sources":["../../src/mask/mask-effect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAM,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAiC,UAAU,EAAC,MAAM,SAAS,CAAC;AAEnE,aAAK,IAAI,GAAG;IACV,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,UAAU,CAAC;IACnB,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAcF,MAAM,CAAC,OAAO,OAAO,UAAW,YAAW,MAAM;IAC/C,EAAE,SAAiB;IACnB,KAAK,OAAQ;IACb,YAAY,UAAQ;IAEpB,OAAO,CAAC,YAAY,CAAC,CAAY;IACjC,OAAO,CAAC,QAAQ,CAA0B;IAC1C,OAAO,CAAC,KAAK,CAAqC;IAClD,OAAO,CAAC,QAAQ,CAAC,CAAW;IAC5B,OAAO,CAAC,OAAO,CAAC,CAAY;IAC5B,OAAO,CAAC,YAAY,CAAC,CAAW;IAEhC,SAAS,CACP,EAAE,EAAE,qBAAqB,EACzB,EAAC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,IAAI,EAAC,EAAE,gBAAgB,GAChF,IAAI;IAqEP,OAAO,CAAC,cAAc;IA6EtB;;;;;;OAMG;IACH,OAAO,CAAC,iBAAiB;IA4CzB,mBAAmB,IAAI;QACrB,OAAO,EAAE,SAAS,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC;KAC3C;IAOD,OAAO,IAAI,IAAI;CAgBhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask-pass.d.ts","sourceRoot":"","sources":["../../src/mask/mask-pass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,SAAS,EAAiB,MAAM,eAAe,CAAC;AACrE,OAAO,
|
|
1
|
+
{"version":3,"file":"mask-pass.d.ts","sourceRoot":"","sources":["../../src/mask/mask-pass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,SAAS,EAAiB,MAAM,eAAe,CAAC;AACrE,OAAO,EAAC,WAAW,IAAI,UAAU,EAAE,uBAAuB,EAAC,MAAM,eAAe,CAAC;AAEjF,aAAK,qBAAqB,GAAG,uBAAuB,GAAG;IACrD,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,UAAU;IAC9C,OAAO,EAAE,SAAS,CAAC;IACnB,GAAG,EAAE,WAAW,CAAC;gBAEL,EAAE,KAAA,EAAE,KAAK,EAAE;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAC;IA0BrD,MAAM,CAAC,OAAO,EAAE,qBAAqB;IAoBrC,eAAe,CAAC,KAAK,KAAA;IAIrB,MAAM;CAIP"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Framebuffer } from '@luma.gl/core';
|
|
2
|
+
import { Bounds } from '../common/projection-utils';
|
|
3
|
+
import type { Viewport, Layer } from '@deck.gl/core/typed';
|
|
4
|
+
export declare class HeightMap {
|
|
5
|
+
/** Viewport used to draw into the texture */
|
|
6
|
+
renderViewport: Viewport | null;
|
|
7
|
+
/** Bounds of the height map texture, in cartesian space */
|
|
8
|
+
bounds: Bounds | null;
|
|
9
|
+
private fbo?;
|
|
10
|
+
private gl;
|
|
11
|
+
/** Last rendered layers */
|
|
12
|
+
private layers;
|
|
13
|
+
/** Last layer.getBounds() */
|
|
14
|
+
private layersBounds;
|
|
15
|
+
/** The union of layersBounds in cartesian space */
|
|
16
|
+
private layersBoundsCommon;
|
|
17
|
+
private lastViewport;
|
|
18
|
+
static isSupported(gl: WebGLRenderingContext): boolean;
|
|
19
|
+
constructor(gl: WebGLRenderingContext);
|
|
20
|
+
getRenderFramebuffer(): Framebuffer | null;
|
|
21
|
+
shouldUpdate({ layers, viewport }: {
|
|
22
|
+
layers: Layer[];
|
|
23
|
+
viewport: Viewport;
|
|
24
|
+
}): boolean;
|
|
25
|
+
delete(): void;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=height-map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"height-map.d.ts","sourceRoot":"","sources":["../../src/terrain/height-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAiD,MAAM,EAAC,MAAM,4BAA4B,CAAC;AAGlG,OAAO,KAAK,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AAEnD,qBAAa,SAAS;IACpB,6CAA6C;IAC7C,cAAc,EAAE,QAAQ,GAAG,IAAI,CAAQ;IACvC,2DAA2D;IAC3D,MAAM,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE7B,OAAO,CAAC,GAAG,CAAC,CAAc;IAC1B,OAAO,CAAC,EAAE,CAAwB;IAClC,2BAA2B;IAC3B,OAAO,CAAC,MAAM,CAAe;IAC7B,6BAA6B;IAC7B,OAAO,CAAC,YAAY,CAAuC;IAC3D,mDAAmD;IACnD,OAAO,CAAC,kBAAkB,CAAuB;IACjD,OAAO,CAAC,YAAY,CAAyB;IAE7C,MAAM,CAAC,WAAW,CAAC,EAAE,EAAE,qBAAqB,GAAG,OAAO;gBAI1C,EAAE,EAAE,qBAAqB;IAIrC,oBAAoB,IAAI,WAAW,GAAG,IAAI;IAU1C,YAAY,CAAC,EAAC,MAAM,EAAE,QAAQ,EAAC,EAAE;QAAC,MAAM,EAAE,KAAK,EAAE,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAA;KAAC,GAAG,OAAO;IAoDhF,MAAM;CAMP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shader-module-offset.d.ts","sourceRoot":"","sources":["../../src/terrain/shader-module-offset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,IAAI,YAAY,EAAC,MAAM,eAAe,CAAC;;AAEjE,wBAyBkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shader-module-source.d.ts","sourceRoot":"","sources":["../../src/terrain/shader-module-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,IAAI,YAAY,EAAC,MAAM,eAAe,CAAC;;AAEjE,wBAiCkB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { _ShaderModule as ShaderModule } from '@deck.gl/core/typed';
|
|
2
|
+
import type { Texture2D } from '@luma.gl/core';
|
|
3
|
+
import type { Bounds } from '../common/projection-utils';
|
|
4
|
+
import type { TerrainCover } from './terrain-cover';
|
|
5
|
+
/** Module parameters expected by the terrain shader module */
|
|
6
|
+
export declare type TerrainModuleSettings = {
|
|
7
|
+
pickingActive?: boolean;
|
|
8
|
+
heightMap: Texture2D | null;
|
|
9
|
+
heightMapBounds?: Bounds | null;
|
|
10
|
+
dummyHeightMap: Texture2D;
|
|
11
|
+
terrainCover?: TerrainCover | null;
|
|
12
|
+
drawToTerrainHeightMap?: boolean;
|
|
13
|
+
useTerrainHeightMap?: boolean;
|
|
14
|
+
terrainSkipRender?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/** A model can have one of the following modes */
|
|
17
|
+
export declare const TERRAIN_MODE: {
|
|
18
|
+
NONE: number;
|
|
19
|
+
/** A terrain layer rendering encoded ground elevation into the height map */
|
|
20
|
+
WRITE_HEIGHT_MAP: number;
|
|
21
|
+
/** An offset layer reading encoded ground elevation from the height map */
|
|
22
|
+
USE_HEIGHT_MAP: number;
|
|
23
|
+
/** A terrain layer rendering to screen, using the cover fbo overlaid with its own texture */
|
|
24
|
+
USE_COVER: number;
|
|
25
|
+
/** A terrain layer rendering to screen, using the cover fbo as texture */
|
|
26
|
+
USE_COVER_ONLY: number;
|
|
27
|
+
/** Draped layer is rendered into a texture, and never to screen */
|
|
28
|
+
SKIP: number;
|
|
29
|
+
};
|
|
30
|
+
export declare const terrainModule: ShaderModule<TerrainModuleSettings>;
|
|
31
|
+
//# sourceMappingURL=shader-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shader-module.d.ts","sourceRoot":"","sources":["../../src/terrain/shader-module.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,aAAa,IAAI,YAAY,EAAC,MAAM,eAAe,CAAC;AAEjE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,8DAA8D;AAC9D,oBAAY,qBAAqB,GAAG;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IACnC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,YAAY;;IAEvB,6EAA6E;;IAE7E,2EAA2E;;IAE3E,6FAA6F;;IAE7F,0EAA0E;;IAE1E,mEAAmE;;CAEpE,CAAC;AAMF,eAAO,MAAM,aAAa,qCA0Hc,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Framebuffer } from '@luma.gl/core';
|
|
2
|
+
import type { Layer, Viewport } from '@deck.gl/core/typed';
|
|
3
|
+
import { Bounds } from '../common/projection-utils';
|
|
4
|
+
/** Class to manage draped texture for each terrain layer */
|
|
5
|
+
export declare class TerrainCover {
|
|
6
|
+
isDirty: boolean;
|
|
7
|
+
/** The terrain layer that this instance belongs to */
|
|
8
|
+
targetLayer: Layer;
|
|
9
|
+
/** Viewport used to draw into the texture */
|
|
10
|
+
renderViewport: Viewport | null;
|
|
11
|
+
/** Bounds of the terrain cover texture, in cartesian space */
|
|
12
|
+
bounds: Bounds | null;
|
|
13
|
+
private fbo?;
|
|
14
|
+
private pickingFbo?;
|
|
15
|
+
private layers;
|
|
16
|
+
private tile;
|
|
17
|
+
/** Cached version of targetLayer.getBounds() */
|
|
18
|
+
private targetBounds;
|
|
19
|
+
/** targetBounds in cartesian space */
|
|
20
|
+
private targetBoundsCommon;
|
|
21
|
+
constructor(targetLayer: Layer);
|
|
22
|
+
get id(): string;
|
|
23
|
+
/** returns true if the target layer is still in use (i.e. not finalized) */
|
|
24
|
+
get isActive(): boolean;
|
|
25
|
+
shouldUpdate({ targetLayer, viewport, layers, layerNeedsRedraw }: {
|
|
26
|
+
targetLayer?: Layer;
|
|
27
|
+
viewport?: Viewport;
|
|
28
|
+
layers?: Layer[];
|
|
29
|
+
layerNeedsRedraw?: Record<string, boolean>;
|
|
30
|
+
}): boolean;
|
|
31
|
+
/** Compare layers with the last version. Only rerender if necessary. */
|
|
32
|
+
private _updateLayers;
|
|
33
|
+
/** Compare viewport and terrain bounds with the last version. Only rerender if necesary. */
|
|
34
|
+
private _updateViewport;
|
|
35
|
+
getRenderFramebuffer(): Framebuffer | null;
|
|
36
|
+
getPickingFramebuffer(): Framebuffer | null;
|
|
37
|
+
filterLayers(layers: Layer[]): Layer<{}>[];
|
|
38
|
+
delete(): void;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=terrain-cover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terrain-cover.d.ts","sourceRoot":"","sources":["../../src/terrain/terrain-cover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,OAAO,KAAK,EAAC,KAAK,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AAGnD,OAAO,EAAiD,MAAM,EAAC,MAAM,4BAA4B,CAAC;AASlG,4DAA4D;AAC5D,qBAAa,YAAY;IACvB,OAAO,EAAE,OAAO,CAAQ;IACxB,sDAAsD;IACtD,WAAW,EAAE,KAAK,CAAC;IACnB,6CAA6C;IAC7C,cAAc,EAAE,QAAQ,GAAG,IAAI,CAAQ;IACvC,8DAA8D;IAC9D,MAAM,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE7B,OAAO,CAAC,GAAG,CAAC,CAAc;IAC1B,OAAO,CAAC,UAAU,CAAC,CAAc;IACjC,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,IAAI,CAAsB;IAClC,gDAAgD;IAChD,OAAO,CAAC,YAAY,CAAqC;IACzD,sCAAsC;IACtC,OAAO,CAAC,kBAAkB,CAAuB;gBAErC,WAAW,EAAE,KAAK;IAK9B,IAAI,EAAE,WAEL;IAED,4EAA4E;IAC5E,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,YAAY,CAAC,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,gBAAgB,EACjB,EAAE;QACD,WAAW,CAAC,EAAE,KAAK,CAAC;QACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;QACpB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;QACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC5C,GAAG,OAAO;IAqBX,wEAAwE;IACxE,OAAO,CAAC,aAAa;IAuBrB,4FAA4F;IAC5F,OAAO,CAAC,eAAe;IAwCvB,oBAAoB,IAAI,WAAW,GAAG,IAAI;IAU1C,qBAAqB,IAAI,WAAW,GAAG,IAAI;IAU3C,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE;IAI5B,MAAM;CAWP"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TerrainModuleSettings } from './shader-module';
|
|
2
|
+
import type { Effect, PreRenderOptions, Layer } from '@deck.gl/core/typed';
|
|
3
|
+
/** Class to manage terrain effect */
|
|
4
|
+
export declare class TerrainEffect implements Effect {
|
|
5
|
+
id: string;
|
|
6
|
+
props: null;
|
|
7
|
+
useInPicking: boolean;
|
|
8
|
+
/** true if picking in the current pass */
|
|
9
|
+
private isPicking;
|
|
10
|
+
/** true if should use in the current pass */
|
|
11
|
+
private isDrapingEnabled;
|
|
12
|
+
/** An empty texture as placeholder */
|
|
13
|
+
private dummyHeightMap;
|
|
14
|
+
/** A texture encoding the ground elevation, updated once per redraw. Used by layers with offset mode */
|
|
15
|
+
private heightMap?;
|
|
16
|
+
private terrainPass;
|
|
17
|
+
private terrainPickingPass;
|
|
18
|
+
/** One texture for each primitive terrain layer, into which the draped layers render */
|
|
19
|
+
private terrainCovers;
|
|
20
|
+
initialize(gl: WebGLRenderingContext): void;
|
|
21
|
+
preRender(gl: WebGLRenderingContext, opts: PreRenderOptions): void;
|
|
22
|
+
getModuleParameters(layer: Layer): TerrainModuleSettings;
|
|
23
|
+
cleanup(): void;
|
|
24
|
+
private _updateHeightMap;
|
|
25
|
+
private _updateTerrainCovers;
|
|
26
|
+
private _updateTerrainCover;
|
|
27
|
+
private _pruneTerrainCovers;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=terrain-effect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terrain-effect.d.ts","sourceRoot":"","sources":["../../src/terrain/terrain-effect.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,qBAAqB,EAAC,MAAM,iBAAiB,CAAC;AAMrE,OAAO,KAAK,EAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAW,MAAM,eAAe,CAAC;AAE7E,qCAAqC;AACrC,qBAAa,aAAc,YAAW,MAAM;IAC1C,EAAE,SAAoB;IACtB,KAAK,OAAQ;IACb,YAAY,UAAQ;IAEpB,0CAA0C;IAC1C,OAAO,CAAC,SAAS,CAAkB;IACnC,6CAA6C;IAC7C,OAAO,CAAC,gBAAgB,CAAkB;IAC1C,sCAAsC;IACtC,OAAO,CAAC,cAAc,CAAY;IAClC,wGAAwG;IACxG,OAAO,CAAC,SAAS,CAAC,CAAY;IAC9B,OAAO,CAAC,WAAW,CAAe;IAClC,OAAO,CAAC,kBAAkB,CAAsB;IAChD,wFAAwF;IACxF,OAAO,CAAC,aAAa,CAAwC;IAE7D,UAAU,CAAC,EAAE,EAAE,qBAAqB;IAkBpC,SAAS,CAAC,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,gBAAgB,GAAG,IAAI;IA+ClE,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,qBAAqB;IAaxD,OAAO,IAAI,IAAI;IAiBf,OAAO,CAAC,gBAAgB;IAuBxB,OAAO,CAAC,oBAAoB;IA2B5B,OAAO,CAAC,mBAAmB;IAmC3B,OAAO,CAAC,mBAAmB;CAY5B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Layer, Viewport, _LayersPass as LayersPass, LayersPassRenderOptions } from '@deck.gl/core/typed';
|
|
2
|
+
import { HeightMap } from './height-map';
|
|
3
|
+
import type { TerrainCover } from './terrain-cover';
|
|
4
|
+
export declare type TerrainPassRenderOptions = LayersPassRenderOptions;
|
|
5
|
+
/** Renders textures used by the TerrainEffect render pass */
|
|
6
|
+
export declare class TerrainPass extends LayersPass {
|
|
7
|
+
getRenderableLayers(viewport: Viewport, opts: TerrainPassRenderOptions): Layer[];
|
|
8
|
+
renderHeightMap(heightMap: HeightMap, opts: Partial<TerrainPassRenderOptions>): void;
|
|
9
|
+
renderTerrainCover(terrainCover: TerrainCover, opts: Partial<TerrainPassRenderOptions>): void;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=terrain-pass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terrain-pass.d.ts","sourceRoot":"","sources":["../../src/terrain/terrain-pass.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,IAAI,UAAU,EAAE,uBAAuB,EAAC,MAAM,eAAe,CAAC;AAClG,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAIlD,oBAAY,wBAAwB,GAAG,uBAAuB,CAAC;AAE/D,6DAA6D;AAC7D,qBAAa,WAAY,SAAQ,UAAU;IACzC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,wBAAwB,GAAG,KAAK,EAAE;IAchF,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,wBAAwB,CAAC;IAgC7E,kBAAkB,CAAC,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,CAAC,wBAAwB,CAAC;CA4BvF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Layer, Viewport, LayersPassRenderOptions, _PickLayersPass as PickLayersPass } from '@deck.gl/core/typed';
|
|
2
|
+
import type { TerrainCover } from './terrain-cover';
|
|
3
|
+
export declare type TerrainPickingPassRenderOptions = LayersPassRenderOptions & {
|
|
4
|
+
pickZ: boolean;
|
|
5
|
+
};
|
|
6
|
+
/** Renders textures used by the TerrainEffect picking pass */
|
|
7
|
+
export declare class TerrainPickingPass extends PickLayersPass {
|
|
8
|
+
/** Save layer index for use when drawing to terrain cover.
|
|
9
|
+
* When a terrain cover's picking buffer is rendered,
|
|
10
|
+
* we need to make sure each layer receives a consistent index (encoded in the alpha channel)
|
|
11
|
+
* so that a picked color can be decoded back to the correct layer.
|
|
12
|
+
* Updated in getRenderableLayers which is called in TerrainEffect.preRender
|
|
13
|
+
*/
|
|
14
|
+
drawIndices: Record<string, number>;
|
|
15
|
+
getRenderableLayers(viewport: Viewport, opts: TerrainPickingPassRenderOptions): Layer[];
|
|
16
|
+
renderTerrainCover(terrainCover: TerrainCover, opts: Partial<TerrainPickingPassRenderOptions>): void;
|
|
17
|
+
protected getLayerParameters(layer: Layer, layerIndex: number, viewport: Viewport): any;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=terrain-picking-pass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terrain-picking-pass.d.ts","sourceRoot":"","sources":["../../src/terrain/terrain-picking-pass.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,QAAQ,EACR,uBAAuB,EACvB,eAAe,IAAI,cAAc,EAClC,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAElD,oBAAY,+BAA+B,GAAG,uBAAuB,GAAG;IACtE,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,8DAA8D;AAC9D,qBAAa,kBAAmB,SAAQ,cAAc;IACpD;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;IAEzC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,+BAA+B,GAAG,KAAK,EAAE;IAiBvF,kBAAkB,CAAC,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,CAAC,+BAA+B,CAAC;IAsC7F,SAAS,CAAC,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,GAAG;CAQxF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LayerExtension, UpdateParameters } from '@deck.gl/core/typed';
|
|
2
|
+
import type { Layer } from '@deck.gl/core/typed';
|
|
3
|
+
export declare type TerrainExtensionProps = {
|
|
4
|
+
/**
|
|
5
|
+
* controls whether an object is drawn over the terrain surface by its anchor (usually defined by an accessor called `getPosition`, e.g. icon, scatterplot) or by its geometry (e.g. path, polygon).
|
|
6
|
+
* If not specified, it is automatically deduced from the layer.
|
|
7
|
+
*/
|
|
8
|
+
terrainFittingMode?: 'offset' | 'drape';
|
|
9
|
+
};
|
|
10
|
+
/** Allows layers to show/hide objects by a geofence. */
|
|
11
|
+
export default class TerrainExtension extends LayerExtension {
|
|
12
|
+
static defaultProps: {
|
|
13
|
+
terrainFittingMode: undefined;
|
|
14
|
+
};
|
|
15
|
+
static extensionName: string;
|
|
16
|
+
getShaders(this: Layer<TerrainExtensionProps>): any;
|
|
17
|
+
initializeState(this: Layer<TerrainExtensionProps>): void;
|
|
18
|
+
updateState(this: Layer<TerrainExtensionProps>, params: UpdateParameters<Layer<TerrainExtensionProps>>): void;
|
|
19
|
+
onNeedsRedraw(this: Layer<{}>): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=terrain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terrain.d.ts","sourceRoot":"","sources":["../../src/terrain/terrain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAI/D,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAMzC,oBAAY,qBAAqB,GAAG;IAClC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CACzC,CAAC;AASF,wDAAwD;AACxD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,cAAc;IAC1D,MAAM,CAAC,YAAY;;MAAgB;IACnC,MAAM,CAAC,aAAa,SAAsB;IAE1C,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,qBAAqB,CAAC,GAAG,GAAG;IAMnD,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,qBAAqB,CAAC;IAIlD,WAAW,CACT,IAAI,EAAE,KAAK,CAAC,qBAAqB,CAAC,EAClC,MAAM,EAAE,gBAAgB,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAyBxD,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI;CAMrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/terrain/utils.ts"],"names":[],"mappings":"AAGA,wBAAgB,kBAAkB,CAChC,EAAE,EAAE,qBAAqB,EACzB,IAAI,EAAE;IACJ,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,OAoBF"}
|