@deck.gl/extensions 8.8.25 → 8.8.26
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/collision-filter/collision-filter-effect.d.ts +28 -0
- package/typed/collision-filter/collision-filter-effect.d.ts.map +1 -0
- package/typed/collision-filter/collision-filter-pass.d.ts +14 -0
- package/typed/collision-filter/collision-filter-pass.d.ts.map +1 -0
- package/typed/collision-filter/collision-filter.d.ts +41 -0
- package/typed/collision-filter/collision-filter.d.ts.map +1 -0
- package/typed/collision-filter/shader-module.d.ts +4 -0
- package/typed/collision-filter/shader-module.d.ts.map +1 -0
- package/typed/terrain/height-map-builder.d.ts +1 -1
- package/typed/terrain/terrain-cover.d.ts +1 -1
- package/typed/terrain/terrain.d.ts +2 -2
- package/typed/terrain/terrain.d.ts.map +1 -1
- package/typed/utils/projection-utils.d.ts +27 -0
- package/typed/utils/projection-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.26",
|
|
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": "ffb07503b3878e443dc37cc8d07fdb9e57df096f"
|
|
42
42
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Framebuffer, Texture2D } from '@luma.gl/core';
|
|
2
|
+
import type { Effect, Layer, PreRenderOptions } from '@deck.gl/core/typed';
|
|
3
|
+
export default class CollisionFilterEffect implements Effect {
|
|
4
|
+
id: string;
|
|
5
|
+
props: null;
|
|
6
|
+
useInPicking: boolean;
|
|
7
|
+
order: number;
|
|
8
|
+
private channels;
|
|
9
|
+
private collisionFilterPass?;
|
|
10
|
+
private collisionFBOs;
|
|
11
|
+
private dummyCollisionMap?;
|
|
12
|
+
private lastViewport?;
|
|
13
|
+
preRender(gl: WebGLRenderingContext, { effects: allEffects, layers, layerFilter, viewports, onViewportActive, views, isPicking, preRenderStats }: PreRenderOptions): void;
|
|
14
|
+
private _render;
|
|
15
|
+
/**
|
|
16
|
+
* Group layers by collisionGroup
|
|
17
|
+
* Returns a map from collisionGroup to render info
|
|
18
|
+
*/
|
|
19
|
+
private _groupByCollisionGroup;
|
|
20
|
+
getModuleParameters(layer: Layer): {
|
|
21
|
+
collisionFBO: Framebuffer;
|
|
22
|
+
dummyCollisionMap: Texture2D;
|
|
23
|
+
};
|
|
24
|
+
cleanup(): void;
|
|
25
|
+
createFBO(gl: WebGLRenderingContext, collisionGroup: string): void;
|
|
26
|
+
destroyFBO(collisionGroup: string): void;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=collision-filter-effect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collision-filter-effect.d.ts","sourceRoot":"","sources":["../../src/collision-filter/collision-filter-effect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAgB,SAAS,EAAmB,MAAM,eAAe,CAAC;AAGrF,OAAO,KAAK,EAAC,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAW,MAAM,eAAe,CAAC;AAmB7E,MAAM,CAAC,OAAO,OAAO,qBAAsB,YAAW,MAAM;IAC1D,EAAE,SAA6B;IAC/B,KAAK,OAAQ;IACb,YAAY,UAAQ;IACpB,KAAK,SAAK;IAEV,OAAO,CAAC,QAAQ,CAAkC;IAClD,OAAO,CAAC,mBAAmB,CAAC,CAAsB;IAClD,OAAO,CAAC,aAAa,CAAmC;IACxD,OAAO,CAAC,iBAAiB,CAAC,CAAY;IACtC,OAAO,CAAC,YAAY,CAAC,CAAW;IAEhC,SAAS,CACP,EAAE,EAAE,qBAAqB,EACzB,EACE,OAAO,EAAE,UAAU,EACnB,MAAM,EACN,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,cAAmB,EACpB,EAAE,gBAAgB,GAClB,IAAI;IAuDP,OAAO,CAAC,OAAO;IA0Df;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAsC9B,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG;QACjC,YAAY,EAAE,WAAW,CAAC;QAC1B,iBAAiB,EAAE,SAAS,CAAC;KAC9B;IAMD,OAAO,IAAI,IAAI;IAaf,SAAS,CAAC,EAAE,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM;IAyB3D,UAAU,CAAC,cAAc,EAAE,MAAM;CAQlC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Framebuffer } from '@luma.gl/core';
|
|
2
|
+
import { _LayersPass as LayersPass, LayersPassRenderOptions } from '@deck.gl/core/typed';
|
|
3
|
+
declare type CollisionFilterPassRenderOptions = LayersPassRenderOptions & {};
|
|
4
|
+
export default class CollisionFilterPass extends LayersPass {
|
|
5
|
+
renderCollisionMap(target: Framebuffer, options: CollisionFilterPassRenderOptions): any;
|
|
6
|
+
getModuleParameters(): {
|
|
7
|
+
drawToCollisionMap: boolean;
|
|
8
|
+
pickingActive: number;
|
|
9
|
+
pickingAttribute: boolean;
|
|
10
|
+
lightSources: {};
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=collision-filter-pass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collision-filter-pass.d.ts","sourceRoot":"","sources":["../../src/collision-filter/collision-filter-pass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAiB,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,WAAW,IAAI,UAAU,EAAE,uBAAuB,EAAC,MAAM,eAAe,CAAC;AAEjF,aAAK,gCAAgC,GAAG,uBAAuB,GAAG,EAAE,CAAC;AAErE,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,UAAU;IACzD,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,gCAAgC;IAmBjF,mBAAmB;;;;;;CASpB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Accessor, Layer, LayerContext, LayerExtension } from '@deck.gl/core/typed';
|
|
2
|
+
export declare type CollisionFilterExtensionProps<DataT = any> = {
|
|
3
|
+
/**
|
|
4
|
+
* Accessor for collision priority. Must return a number in the range -1000 -> 1000. Features with higher values are shown preferentially.
|
|
5
|
+
*/
|
|
6
|
+
getCollisionPriority?: Accessor<DataT, number>;
|
|
7
|
+
/**
|
|
8
|
+
* Enable/disable collisions. If collisions are disabled, all objects are rendered.
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
collisionEnabled: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Collision group this layer belongs to. If it is not set, the 'default' collision group is used
|
|
14
|
+
*/
|
|
15
|
+
collisionGroup?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Props to override when rendering collision map
|
|
18
|
+
*/
|
|
19
|
+
collisionTestProps?: {};
|
|
20
|
+
};
|
|
21
|
+
/** Allows layers to hide overlapping objects. */
|
|
22
|
+
export default class CollisionFilterExtension extends LayerExtension {
|
|
23
|
+
static defaultProps: {
|
|
24
|
+
getCollisionPriority: {
|
|
25
|
+
type: string;
|
|
26
|
+
value: number;
|
|
27
|
+
};
|
|
28
|
+
collisionEnabled: boolean;
|
|
29
|
+
collisionGroup: {
|
|
30
|
+
type: string;
|
|
31
|
+
value: string;
|
|
32
|
+
};
|
|
33
|
+
collisionTestProps: {};
|
|
34
|
+
};
|
|
35
|
+
static extensionName: string;
|
|
36
|
+
getShaders(this: Layer<CollisionFilterExtensionProps>): any;
|
|
37
|
+
draw(this: Layer<CollisionFilterExtensionProps>, { uniforms, context, moduleParameters }: any): void;
|
|
38
|
+
initializeState(this: Layer<CollisionFilterExtensionProps>, context: LayerContext, extension: this): void;
|
|
39
|
+
getNeedsPickingBuffer(this: Layer<CollisionFilterExtensionProps>): boolean;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=collision-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collision-filter.d.ts","sourceRoot":"","sources":["../../src/collision-filter/collision-filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,cAAc,EAAC,MAAM,eAAe,CAAC;AAW5E,oBAAY,6BAA6B,CAAC,KAAK,GAAG,GAAG,IAAI;IACvD;;OAEG;IACH,oBAAoB,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAE/C;;;OAGG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,kBAAkB,CAAC,EAAE,EAAE,CAAC;CACzB,CAAC;AAEF,iDAAiD;AACjD,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,cAAc;IAClE,MAAM,CAAC,YAAY;;;;;;;;;;;MAAgB;IACnC,MAAM,CAAC,aAAa,SAA8B;IAElD,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,6BAA6B,CAAC,GAAG,GAAG;IAK3D,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,6BAA6B,CAAC,EAAE,EAAC,QAAQ,EAAE,OAAO,EAAE,gBAAgB,EAAC,EAAE,GAAG;IAa3F,eAAe,CACb,IAAI,EAAE,KAAK,CAAC,6BAA6B,CAAC,EAC1C,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,IAAI;IAmBjB,qBAAqB,CAAC,IAAI,EAAE,KAAK,CAAC,6BAA6B,CAAC,GAAG,OAAO;CAG3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shader-module.d.ts","sourceRoot":"","sources":["../../src/collision-filter/shader-module.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,aAAa,IAAI,YAAY,EAAC,MAAM,eAAe,CAAC;;AAwGjE,wBAMkB"}
|
|
@@ -5,7 +5,7 @@ import type { Viewport, Layer } from '@deck.gl/core/typed';
|
|
|
5
5
|
* Manages the lifecycle of the height map (a framebuffer that encodes elevation).
|
|
6
6
|
* One instance of height map is is shared across all layers. It is updated when the viewport changes
|
|
7
7
|
* or when some terrain source layer's data changes.
|
|
8
|
-
* During the draw call of any
|
|
8
|
+
* During the draw call of any terrainDrawMode:offset layers,
|
|
9
9
|
* the vertex shader reads from this framebuffer to retrieve its z offset.
|
|
10
10
|
*/
|
|
11
11
|
export declare class HeightMapBuilder {
|
|
@@ -4,7 +4,7 @@ import { Bounds } from '../common/projection-utils';
|
|
|
4
4
|
/**
|
|
5
5
|
* Manages the lifecycle of the terrain cover (draped textures over a terrain mesh).
|
|
6
6
|
* One terrain cover is created for each unique terrain layer (primitive layer with operation:terrain).
|
|
7
|
-
* It is updated when the terrain source layer's mesh changes or when any of the
|
|
7
|
+
* It is updated when the terrain source layer's mesh changes or when any of the terrainDrawMode:drape
|
|
8
8
|
* layers requires redraw.
|
|
9
9
|
* During the draw call of a terrain layer, the drape texture is overlaid on top of the layer's own color.
|
|
10
10
|
*/
|
|
@@ -5,12 +5,12 @@ export declare type TerrainExtensionProps = {
|
|
|
5
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
6
|
* If not specified, it is automatically deduced from the layer.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
terrainDrawMode?: 'offset' | 'drape';
|
|
9
9
|
};
|
|
10
10
|
/** Allows layers to show/hide objects by a geofence. */
|
|
11
11
|
export default class TerrainExtension extends LayerExtension {
|
|
12
12
|
static defaultProps: {
|
|
13
|
-
|
|
13
|
+
terrainDrawMode: undefined;
|
|
14
14
|
};
|
|
15
15
|
static extensionName: string;
|
|
16
16
|
getShaders(this: Layer<TerrainExtensionProps>): any;
|
|
@@ -1 +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,
|
|
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,eAAe,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CACtC,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,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/utils/projection-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,KAAK,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEnD,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,CAoBf;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,CAyDlB;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"}
|