@deck.gl/extensions 8.9.22 → 8.9.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.
Files changed (54) hide show
  1. package/LICENSE +1 -1
  2. package/package.json +2 -2
  3. package/typed/brushing/brushing.d.ts +0 -39
  4. package/typed/brushing/brushing.d.ts.map +0 -1
  5. package/typed/brushing/brushing.js +0 -83
  6. package/typed/brushing/shader-module.js +0 -116
  7. package/typed/clip/clip.d.ts +0 -32
  8. package/typed/clip/clip.d.ts.map +0 -1
  9. package/typed/clip/clip.js +0 -114
  10. package/typed/collide/collide-effect.d.ts +0 -28
  11. package/typed/collide/collide-effect.d.ts.map +0 -1
  12. package/typed/collide/collide-pass.d.ts +0 -14
  13. package/typed/collide/collide-pass.d.ts.map +0 -1
  14. package/typed/collide/collide.d.ts +0 -41
  15. package/typed/collide/collide.d.ts.map +0 -1
  16. package/typed/collide/shader-module.d.ts +0 -4
  17. package/typed/collide/shader-module.d.ts.map +0 -1
  18. package/typed/collision-filter/collision-filter.d.ts +0 -41
  19. package/typed/collision-filter/collision-filter.d.ts.map +0 -1
  20. package/typed/common/projection-utils.d.ts +0 -27
  21. package/typed/common/projection-utils.d.ts.map +0 -1
  22. package/typed/data-filter/aggregator.js +0 -98
  23. package/typed/data-filter/data-filter.d.ts +0 -90
  24. package/typed/data-filter/data-filter.d.ts.map +0 -1
  25. package/typed/data-filter/data-filter.js +0 -159
  26. package/typed/data-filter/shader-module.js +0 -152
  27. package/typed/fill-style/fill-style.d.ts +0 -86
  28. package/typed/fill-style/fill-style.d.ts.map +0 -1
  29. package/typed/fill-style/fill-style.js +0 -152
  30. package/typed/fill-style/shaders.glsl.js +0 -95
  31. package/typed/fp64/fp64.d.ts +0 -8
  32. package/typed/fp64/fp64.d.ts.map +0 -1
  33. package/typed/fp64/fp64.js +0 -34
  34. package/typed/fp64/project64.glsl.js +0 -100
  35. package/typed/fp64/project64.js +0 -50
  36. package/typed/index.js +0 -9
  37. package/typed/mask/mask.d.ts +0 -30
  38. package/typed/mask/mask.d.ts.map +0 -1
  39. package/typed/mask/mask.js +0 -48
  40. package/typed/mask/shader-module.js +0 -73
  41. package/typed/mask/utils.d.ts +0 -13
  42. package/typed/mask/utils.d.ts.map +0 -1
  43. package/typed/path-style/path-style.d.ts +0 -66
  44. package/typed/path-style/path-style.d.ts.map +0 -1
  45. package/typed/path-style/path-style.js +0 -107
  46. package/typed/path-style/shaders.glsl.js +0 -93
  47. package/typed/terrain/height-map.d.ts +0 -27
  48. package/typed/terrain/height-map.d.ts.map +0 -1
  49. package/typed/terrain/shader-module-offset.d.ts +0 -4
  50. package/typed/terrain/shader-module-offset.d.ts.map +0 -1
  51. package/typed/terrain/shader-module-source.d.ts +0 -4
  52. package/typed/terrain/shader-module-source.d.ts.map +0 -1
  53. package/typed/terrain/terrain.d.ts +0 -21
  54. package/typed/terrain/terrain.d.ts.map +0 -1
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2020 Urban Computing Foundation
1
+ Copyright Vis.gl contributors.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
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.9.22",
5
+ "version": "8.9.24",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
@@ -41,5 +41,5 @@
41
41
  "@math.gl/web-mercator": "^3.6.2",
42
42
  "gl-matrix": "^3.0.0"
43
43
  },
44
- "gitHead": "cc0ff51f4f8b234c7b5015a0e0dced6217433a5b"
44
+ "gitHead": "9301941c03dc97beb95e92581150c4375df875af"
45
45
  }
@@ -1,39 +0,0 @@
1
- import { LayerExtension } from '@deck.gl/core/typed';
2
- import type { Layer, LayerContext, Accessor } from '@deck.gl/core/typed';
3
- export declare type BrushingExtensionProps<DataT = any> = {
4
- /**
5
- * Called to retrieve an arbitrary position for each object that it will be filtered by.
6
- * Only effective if `brushingTarget` is set to `custom`.
7
- */
8
- getBrushingTarget?: Accessor<DataT, [number, number]>;
9
- /**
10
- * Enable/disable brushing. If brushing is disabled, all objects are rendered.
11
- * @default true
12
- */
13
- brushingEnabled?: boolean;
14
- /**
15
- * The position used to filter each object by.
16
- */
17
- brushingTarget?: 'source' | 'target' | 'source_target' | 'custom';
18
- /** The brushing radius centered at the pointer, in meters. If a data object is within this circle, it is rendered; otherwise it is hidden.
19
- * @default 10000
20
- */
21
- brushingRadius?: number;
22
- };
23
- /** Adds GPU-based data brushing functionalities to layers. It allows the layer to show/hide objects based on the current pointer position. */
24
- export default class BrushingExtension extends LayerExtension {
25
- static defaultProps: {
26
- getBrushingTarget: {
27
- type: string;
28
- value: number[];
29
- };
30
- brushingTarget: string;
31
- brushingEnabled: boolean;
32
- brushingRadius: number;
33
- };
34
- static extensionName: string;
35
- getShaders(): any;
36
- initializeState(this: Layer<BrushingExtensionProps>, context: LayerContext, extension: this): void;
37
- finalizeState(this: Layer<BrushingExtensionProps>, context: LayerContext, extension: this): void;
38
- }
39
- //# sourceMappingURL=brushing.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"brushing.d.ts","sourceRoot":"","sources":["../../src/brushing/brushing.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAG7C,OAAO,KAAK,EAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AAUjE,oBAAY,sBAAsB,CAAC,KAAK,GAAG,GAAG,IAAI;IAChD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACtD;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,cAAc,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,eAAe,GAAG,QAAQ,CAAC;IAClE;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,8IAA8I;AAC9I,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,cAAc;IAC3D,MAAM,CAAC,YAAY;;;;;;;;MAAgB;IACnC,MAAM,CAAC,aAAa,SAAuB;IAE3C,UAAU,IAAI,GAAG;IAMjB,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,sBAAsB,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI;IAiC3F,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,sBAAsB,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI;CAU1F"}
@@ -1,83 +0,0 @@
1
- // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
20
- import { LayerExtension } from '@deck.gl/core';
21
- import shaderModule from './shader-module';
22
- const defaultProps = {
23
- getBrushingTarget: { type: 'accessor', value: [0, 0] },
24
- brushingTarget: 'source',
25
- brushingEnabled: true,
26
- brushingRadius: 10000
27
- };
28
- export default class BrushingExtension extends LayerExtension {
29
- getShaders(extension) {
30
- return {
31
- modules: [shaderModule]
32
- };
33
- }
34
- initializeState(context, extension) {
35
- const attributeManager = this.getAttributeManager();
36
- if (attributeManager) {
37
- attributeManager.add({
38
- brushingTargets: {
39
- size: 2,
40
- accessor: 'getBrushingTarget',
41
- // Hack: extension's defaultProps is not merged with the layer's defaultProps,
42
- // So we can't use the standard accessor when the prop is undefined
43
- update: !this.props.getBrushingTarget && extension.useConstantTargetPositions,
44
- shaderAttributes: {
45
- brushingTargets: {
46
- divisor: 0
47
- },
48
- instanceBrushingTargets: {
49
- divisor: 1
50
- }
51
- }
52
- }
53
- });
54
- }
55
- // Trigger redraw when mouse moves
56
- // TODO - expose this in a better way
57
- extension.onMouseMove = () => {
58
- this.getCurrentLayer().setNeedsRedraw();
59
- };
60
- if (this.context.deck) {
61
- this.context.deck.eventManager.on({
62
- pointermove: extension.onMouseMove,
63
- pointerleave: extension.onMouseMove
64
- });
65
- }
66
- }
67
- finalizeState(extension) {
68
- // Remove event listeners
69
- if (this.context.deck) {
70
- this.context.deck.eventManager.off({
71
- pointermove: extension.onMouseMove,
72
- pointerleave: extension.onMouseMove
73
- });
74
- }
75
- }
76
- useConstantTargetPositions(attribute) {
77
- attribute.constant = true;
78
- attribute.value = new Float32Array(2);
79
- return;
80
- }
81
- }
82
- BrushingExtension.extensionName = 'BrushingExtension';
83
- BrushingExtension.defaultProps = defaultProps;
@@ -1,116 +0,0 @@
1
- // Copyright (c) 2015-2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
20
- import { project } from '@deck.gl/core';
21
- const vs = `
22
- uniform bool brushing_enabled;
23
- uniform int brushing_target;
24
- uniform vec2 brushing_mousePos;
25
- uniform float brushing_radius;
26
-
27
- #ifdef NON_INSTANCED_MODEL
28
- attribute vec2 brushingTargets;
29
- #else
30
- attribute vec2 instanceBrushingTargets;
31
- #endif
32
-
33
- varying float brushing_isVisible;
34
-
35
- bool brushing_isPointInRange(vec2 position) {
36
- if (!brushing_enabled) {
37
- return true;
38
- }
39
- vec2 source_commonspace = project_position(position);
40
- vec2 target_commonspace = project_position(brushing_mousePos);
41
- float distance = length((target_commonspace - source_commonspace) / project_uCommonUnitsPerMeter.xy);
42
-
43
- return distance <= brushing_radius;
44
- }
45
-
46
- bool brushing_arePointsInRange(vec2 sourcePos, vec2 targetPos) {
47
- return brushing_isPointInRange(sourcePos) || brushing_isPointInRange(targetPos);
48
- }
49
-
50
- void brushing_setVisible(bool visible) {
51
- brushing_isVisible = float(visible);
52
- }
53
- `;
54
- const fs = `
55
- uniform bool brushing_enabled;
56
- varying float brushing_isVisible;
57
- `;
58
- const TARGET = {
59
- source: 0,
60
- target: 1,
61
- custom: 2,
62
- source_target: 3
63
- };
64
- const inject = {
65
- 'vs:DECKGL_FILTER_GL_POSITION': `
66
- vec2 brushingTarget;
67
- vec2 brushingSource;
68
- if (brushing_target == 3) {
69
- brushingTarget = geometry.worldPositionAlt.xy;
70
- brushingSource = geometry.worldPosition.xy;
71
- } else if (brushing_target == 0) {
72
- brushingTarget = geometry.worldPosition.xy;
73
- } else if (brushing_target == 1) {
74
- brushingTarget = geometry.worldPositionAlt.xy;
75
- } else {
76
- #ifdef NON_INSTANCED_MODEL
77
- brushingTarget = brushingTargets;
78
- #else
79
- brushingTarget = instanceBrushingTargets;
80
- #endif
81
- }
82
- bool visible;
83
- if (brushing_target == 3) {
84
- visible = brushing_arePointsInRange(brushingSource, brushingTarget);
85
- } else {
86
- visible = brushing_isPointInRange(brushingTarget);
87
- }
88
- brushing_setVisible(visible);
89
- `,
90
- 'fs:DECKGL_FILTER_COLOR': `
91
- if (brushing_enabled && brushing_isVisible < 0.5) {
92
- discard;
93
- }
94
- `
95
- };
96
- export default {
97
- name: 'brushing',
98
- dependencies: [project],
99
- vs,
100
- fs,
101
- inject,
102
- getUniforms: opts => {
103
- if (!opts || !opts.viewport) {
104
- return {};
105
- }
106
- const { brushingEnabled = true, brushingRadius = 10000, brushingTarget = 'source', mousePosition, viewport } = opts;
107
- return {
108
- brushing_enabled: Boolean(brushingEnabled && mousePosition && viewport.containsPixel(mousePosition)),
109
- brushing_radius: brushingRadius,
110
- brushing_target: TARGET[brushingTarget] || 0,
111
- brushing_mousePos: mousePosition
112
- ? viewport.unproject([mousePosition.x - viewport.x, mousePosition.y - viewport.y])
113
- : [0, 0]
114
- };
115
- }
116
- };
@@ -1,32 +0,0 @@
1
- import { LayerExtension, _ShaderModule as ShaderModule } from '@deck.gl/core/typed';
2
- import type { Layer } from '@deck.gl/core/typed';
3
- export declare type ClipExtensionProps = {
4
- /** Rectangular bounds to be used for clipping the rendered region, in `[left, bottom, right, top]`.
5
- * @default [0, 0, 1, 1]
6
- */
7
- clipBounds?: [number, number, number, number];
8
- /**
9
- * Controls whether an object is clipped by its anchor (e.g. icon, point) or by its geometry (e.g. path, polygon).
10
- * If not specified, it is automatically deduced from the layer.
11
- */
12
- clipByInstance?: boolean;
13
- };
14
- /** Adds support for clipping rendered layers by rectangular bounds. */
15
- export default class ClipExtension extends LayerExtension {
16
- static defaultProps: {
17
- clipBounds: number[];
18
- clipByInstance: undefined;
19
- };
20
- static extensionName: string;
21
- getShaders(this: Layer<ClipExtensionProps>): {
22
- modules: ShaderModule<any>[];
23
- inject: {
24
- 'vs:#decl': string;
25
- 'vs:DECKGL_FILTER_GL_POSITION': string;
26
- 'fs:#decl': string;
27
- 'fs:DECKGL_FILTER_COLOR': string;
28
- };
29
- };
30
- draw(this: Layer<Required<ClipExtensionProps>>, { uniforms }: any): void;
31
- }
32
- //# sourceMappingURL=clip.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"clip.d.ts","sourceRoot":"","sources":["../../src/clip/clip.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,cAAc,EAAE,aAAa,IAAI,YAAY,EAAC,MAAM,eAAe,CAAC;AAE5E,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAOzC,oBAAY,kBAAkB,GAAG;IAC/B;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AA0DF,uEAAuE;AACvE,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,cAAc;IACvD,MAAM,CAAC,YAAY;;;MAAgB;IACnC,MAAM,CAAC,aAAa,SAAmB;IAEvC,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,kBAAkB,CAAC;;;;;;;;;IAyB1C,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,EAAE,EAAC,QAAQ,EAAC,EAAE,GAAG,GAAG,IAAI;CAgBvE"}
@@ -1,114 +0,0 @@
1
- // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
20
- import { LayerExtension } from '@deck.gl/core';
21
- const defaultProps = {
22
- clipBounds: [0, 0, 1, 1]
23
- };
24
- const shaderFunction = `
25
- uniform vec4 clip_bounds;
26
-
27
- bool clip_isInBounds(vec2 position) {
28
- return position.x >= clip_bounds[0] && position.y >= clip_bounds[1] && position.x < clip_bounds[2] && position.y < clip_bounds[3];
29
- }
30
- `;
31
- /*
32
- * The vertex-shader version clips geometries by their anchor position
33
- * e.g. ScatterplotLayer - show if the center of a circle is within bounds
34
- */
35
- const shaderModuleVs = {
36
- name: 'clip-vs',
37
- vs: shaderFunction
38
- };
39
- const injectionVs = {
40
- 'vs:#decl': `
41
- varying float clip_isVisible;
42
- `,
43
- 'vs:DECKGL_FILTER_GL_POSITION': `
44
- clip_isVisible = float(clip_isInBounds(geometry.worldPosition.xy));
45
- `,
46
- 'fs:#decl': `
47
- varying float clip_isVisible;
48
- `,
49
- 'fs:DECKGL_FILTER_COLOR': `
50
- if (clip_isVisible < 0.5) discard;
51
- `
52
- };
53
- /*
54
- * The fragment-shader version clips pixels at the bounds
55
- * e.g. PolygonLayer - show the part of the polygon that intersect with the bounds
56
- */
57
- const shaderModuleFs = {
58
- name: 'clip-fs',
59
- fs: shaderFunction
60
- };
61
- const injectionFs = {
62
- 'vs:#decl': `
63
- varying vec2 clip_commonPosition;
64
- `,
65
- 'vs:DECKGL_FILTER_GL_POSITION': `
66
- clip_commonPosition = geometry.position.xy;
67
- `,
68
- 'fs:#decl': `
69
- varying vec2 clip_commonPosition;
70
- `,
71
- 'fs:DECKGL_FILTER_COLOR': `
72
- if (!clip_isInBounds(clip_commonPosition)) discard;
73
- `
74
- };
75
- export default class ClipExtension extends LayerExtension {
76
- getShaders() {
77
- // If `clipByInstance: true`, the entire object is shown/hidden based on its anchor position (done by vertex shader)
78
- // Otherwise, the object is trimmed by the clip bounds (done by fragment shader)
79
- // Default behavior: consider a layer instanced if it has attribute `instancePositions`
80
- let clipByInstance = 'instancePositions' in this.getAttributeManager().attributes;
81
- // Users can override by setting the `clipByInstance` prop
82
- if ('clipByInstance' in this.props) {
83
- clipByInstance = this.props.clipByInstance;
84
- }
85
- this.state.clipByInstance = clipByInstance;
86
- return clipByInstance
87
- ? {
88
- modules: [shaderModuleVs],
89
- inject: injectionVs
90
- }
91
- : {
92
- modules: [shaderModuleFs],
93
- inject: injectionFs
94
- };
95
- }
96
- draw({ uniforms }) {
97
- const { clipBounds = defaultProps.clipBounds } = this.props;
98
- if (this.state.clipByInstance) {
99
- uniforms.clip_bounds = clipBounds;
100
- }
101
- else {
102
- const corner0 = this.projectPosition([clipBounds[0], clipBounds[1], 0]);
103
- const corner1 = this.projectPosition([clipBounds[2], clipBounds[3], 0]);
104
- uniforms.clip_bounds = [
105
- Math.min(corner0[0], corner1[0]),
106
- Math.min(corner0[1], corner1[1]),
107
- Math.max(corner0[0], corner1[0]),
108
- Math.max(corner0[1], corner1[1])
109
- ];
110
- }
111
- }
112
- }
113
- ClipExtension.extensionName = 'ClipExtension';
114
- ClipExtension.defaultProps = defaultProps;
@@ -1,28 +0,0 @@
1
- import { Framebuffer, Texture2D } from '@luma.gl/core';
2
- import type { Effect, Layer, PreRenderOptions } from '@deck.gl/core/typed';
3
- export default class CollideEffect implements Effect {
4
- id: string;
5
- props: null;
6
- useInPicking: boolean;
7
- order: number;
8
- private channels;
9
- private collidePass?;
10
- private collideFBOs;
11
- private dummyCollideMap?;
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 collideGroup
17
- * Returns a map from collideGroup to render info
18
- */
19
- private _groupByCollideGroup;
20
- getModuleParameters(layer: Layer): {
21
- collideFBO: Framebuffer;
22
- dummyCollideMap: Texture2D;
23
- };
24
- cleanup(): void;
25
- createFBO(gl: WebGLRenderingContext, collideGroup: string): void;
26
- destroyFBO(collideGroup: string): void;
27
- }
28
- //# sourceMappingURL=collide-effect.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collide-effect.d.ts","sourceRoot":"","sources":["../../src/collide/collide-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;AAoB7E,MAAM,CAAC,OAAO,OAAO,aAAc,YAAW,MAAM;IAClD,EAAE,SAAoB;IACtB,KAAK,OAAQ;IACb,YAAY,UAAQ;IACpB,KAAK,SAAK;IAEV,OAAO,CAAC,QAAQ,CAAkC;IAClD,OAAO,CAAC,WAAW,CAAC,CAAc;IAClC,OAAO,CAAC,WAAW,CAAmC;IACtD,OAAO,CAAC,eAAe,CAAC,CAAY;IACpC,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,oBAAoB;IAsC5B,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG;QACjC,UAAU,EAAE,WAAW,CAAC;QACxB,eAAe,EAAE,SAAS,CAAC;KAC5B;IAMD,OAAO,IAAI,IAAI;IAaf,SAAS,CAAC,EAAE,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM;IAyBzD,UAAU,CAAC,YAAY,EAAE,MAAM;CAQhC"}
@@ -1,14 +0,0 @@
1
- import { Framebuffer } from '@luma.gl/core';
2
- import { _LayersPass as LayersPass, LayersPassRenderOptions } from '@deck.gl/core/typed';
3
- declare type CollidePassRenderOptions = LayersPassRenderOptions & {};
4
- export default class CollidePass extends LayersPass {
5
- renderCollideMap(target: Framebuffer, options: CollidePassRenderOptions): any;
6
- getModuleParameters(): {
7
- drawToCollideMap: boolean;
8
- pickingActive: number;
9
- pickingAttribute: boolean;
10
- lightSources: {};
11
- };
12
- }
13
- export {};
14
- //# sourceMappingURL=collide-pass.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collide-pass.d.ts","sourceRoot":"","sources":["../../src/collide/collide-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,wBAAwB,GAAG,uBAAuB,GAAG,EAAE,CAAC;AAE7D,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,UAAU;IACjD,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,wBAAwB;IAmBvE,mBAAmB;;;;;;CASpB"}
@@ -1,41 +0,0 @@
1
- import { Accessor, Layer, LayerContext, LayerExtension } from '@deck.gl/core/typed';
2
- export declare type CollideExtensionProps<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
- getCollidePriority?: Accessor<DataT, number>;
7
- /**
8
- * Enable/disable collisions. If collisions are disabled, all objects are rendered.
9
- * @default true
10
- */
11
- collideEnabled: boolean;
12
- /**
13
- * Collision group this layer belongs to. If it is not set, the 'default' collision group is used
14
- */
15
- collideGroup?: string;
16
- /**
17
- * Props to override when rendering collision map
18
- */
19
- collideTestProps?: {};
20
- };
21
- /** Allows layers to hide overlapping objects. */
22
- export default class CollideExtension extends LayerExtension {
23
- static defaultProps: {
24
- getCollidePriority: {
25
- type: string;
26
- value: number;
27
- };
28
- collideEnabled: boolean;
29
- collideGroup: {
30
- type: string;
31
- value: string;
32
- };
33
- collideTestProps: {};
34
- };
35
- static extensionName: string;
36
- getShaders(this: Layer<CollideExtensionProps>): any;
37
- draw(this: Layer<CollideExtensionProps>, { uniforms, context, moduleParameters }: any): void;
38
- initializeState(this: Layer<CollideExtensionProps>, context: LayerContext, extension: this): void;
39
- getNeedsPickingBuffer(this: Layer<CollideExtensionProps>): boolean;
40
- }
41
- //# sourceMappingURL=collide.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collide.d.ts","sourceRoot":"","sources":["../../src/collide/collide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,cAAc,EAAC,MAAM,eAAe,CAAC;AAW5E,oBAAY,qBAAqB,CAAC,KAAK,GAAG,GAAG,IAAI;IAC/C;;OAEG;IACH,kBAAkB,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAE7C;;;OAGG;IACH,cAAc,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,EAAE,CAAC;CACvB,CAAC;AAEF,iDAAiD;AACjD,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;IAKnD,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,qBAAqB,CAAC,EAAE,EAAC,QAAQ,EAAE,OAAO,EAAE,gBAAgB,EAAC,EAAE,GAAG;IAanF,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,qBAAqB,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI;IAkB1F,qBAAqB,CAAC,IAAI,EAAE,KAAK,CAAC,qBAAqB,CAAC,GAAG,OAAO;CAGnE"}
@@ -1,4 +0,0 @@
1
- import type { _ShaderModule as ShaderModule } from '@deck.gl/core/typed';
2
- declare const _default: ShaderModule<any>;
3
- export default _default;
4
- //# sourceMappingURL=shader-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shader-module.d.ts","sourceRoot":"","sources":["../../src/collide/shader-module.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,aAAa,IAAI,YAAY,EAAC,MAAM,eAAe,CAAC;;AAwGjE,wBAMkB"}
@@ -1,41 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,27 +0,0 @@
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
@@ -1 +0,0 @@
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;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,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"}