@deck.gl/extensions 8.10.0-alpha.6 → 9.0.0-alpha.3
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/dist/dist.dev.js +10396 -530
- package/dist/es5/brushing/brushing-extension.js +8 -5
- package/dist/es5/brushing/brushing-extension.js.map +1 -1
- package/dist/es5/clip/clip-extension.js.map +1 -1
- package/dist/es5/collision-filter/collision-filter-effect.js +41 -29
- package/dist/es5/collision-filter/collision-filter-effect.js.map +1 -1
- package/dist/es5/collision-filter/collision-filter-pass.js +4 -5
- package/dist/es5/collision-filter/collision-filter-pass.js.map +1 -1
- package/dist/es5/collision-filter/shader-module.js.map +1 -1
- package/dist/es5/data-filter/aggregator.js +18 -11
- package/dist/es5/data-filter/aggregator.js.map +1 -1
- package/dist/es5/data-filter/data-filter-extension.js +27 -27
- package/dist/es5/data-filter/data-filter-extension.js.map +1 -1
- package/dist/es5/fill-style/fill-style-extension.js +4 -6
- package/dist/es5/fill-style/fill-style-extension.js.map +1 -1
- package/dist/es5/fill-style/shaders.glsl.js.map +1 -1
- package/dist/es5/mask/mask-effect.js +5 -7
- package/dist/es5/mask/mask-effect.js.map +1 -1
- package/dist/es5/mask/mask-pass.js +18 -13
- package/dist/es5/mask/mask-pass.js.map +1 -1
- package/dist/es5/mask/shader-module.js.map +1 -1
- package/dist/es5/path-style/path-style-extension.js +14 -11
- package/dist/es5/path-style/path-style-extension.js.map +1 -1
- package/dist/es5/terrain/height-map-builder.js +7 -11
- package/dist/es5/terrain/height-map-builder.js.map +1 -1
- package/dist/es5/terrain/shader-module.js.map +1 -1
- package/dist/es5/terrain/terrain-cover.js +6 -6
- package/dist/es5/terrain/terrain-cover.js.map +1 -1
- package/dist/es5/terrain/terrain-effect.js +11 -13
- package/dist/es5/terrain/terrain-effect.js.map +1 -1
- package/dist/es5/terrain/terrain-pass.js +7 -5
- package/dist/es5/terrain/terrain-pass.js.map +1 -1
- package/dist/es5/terrain/terrain-picking-pass.js +2 -2
- package/dist/es5/terrain/terrain-picking-pass.js.map +1 -1
- package/dist/es5/terrain/utils.js +12 -9
- package/dist/es5/terrain/utils.js.map +1 -1
- package/dist/es5/utils/debug.js +2 -2
- package/dist/es5/utils/debug.js.map +1 -1
- package/dist/esm/brushing/brushing-extension.js +8 -5
- package/dist/esm/brushing/brushing-extension.js.map +1 -1
- package/dist/esm/clip/clip-extension.js.map +1 -1
- package/dist/esm/collision-filter/collision-filter-effect.js +29 -28
- package/dist/esm/collision-filter/collision-filter-effect.js.map +1 -1
- package/dist/esm/collision-filter/collision-filter-pass.js +2 -3
- package/dist/esm/collision-filter/collision-filter-pass.js.map +1 -1
- package/dist/esm/collision-filter/shader-module.js.map +1 -1
- package/dist/esm/data-filter/aggregator.js +19 -15
- package/dist/esm/data-filter/aggregator.js.map +1 -1
- package/dist/esm/data-filter/data-filter-extension.js +23 -30
- package/dist/esm/data-filter/data-filter-extension.js.map +1 -1
- package/dist/esm/fill-style/fill-style-extension.js +3 -6
- package/dist/esm/fill-style/fill-style-extension.js.map +1 -1
- package/dist/esm/fill-style/shaders.glsl.js.map +1 -1
- package/dist/esm/mask/mask-effect.js +3 -4
- package/dist/esm/mask/mask-effect.js.map +1 -1
- package/dist/esm/mask/mask-pass.js +14 -15
- package/dist/esm/mask/mask-pass.js.map +1 -1
- package/dist/esm/mask/shader-module.js.map +1 -1
- package/dist/esm/path-style/path-style-extension.js +13 -10
- package/dist/esm/path-style/path-style-extension.js.map +1 -1
- package/dist/esm/terrain/height-map-builder.js +7 -10
- package/dist/esm/terrain/height-map-builder.js.map +1 -1
- package/dist/esm/terrain/shader-module.js.map +1 -1
- package/dist/esm/terrain/terrain-cover.js +6 -6
- package/dist/esm/terrain/terrain-cover.js.map +1 -1
- package/dist/esm/terrain/terrain-effect.js +10 -11
- package/dist/esm/terrain/terrain-effect.js.map +1 -1
- package/dist/esm/terrain/terrain-pass.js +4 -3
- package/dist/esm/terrain/terrain-pass.js.map +1 -1
- package/dist/esm/terrain/terrain-picking-pass.js +2 -2
- package/dist/esm/terrain/terrain-picking-pass.js.map +1 -1
- package/dist/esm/terrain/utils.js +15 -17
- package/dist/esm/terrain/utils.js.map +1 -1
- package/dist/esm/utils/debug.js +1 -1
- package/dist/esm/utils/debug.js.map +1 -1
- package/dist.min.js +282 -84
- package/package.json +10 -8
- package/src/brushing/brushing-extension.ts +8 -6
- package/src/clip/clip-extension.ts +1 -2
- package/src/collision-filter/collision-filter-effect.ts +40 -29
- package/src/collision-filter/collision-filter-pass.ts +4 -5
- package/src/collision-filter/shader-module.ts +4 -3
- package/src/data-filter/aggregator.ts +18 -18
- package/src/data-filter/data-filter-extension.ts +37 -29
- package/src/fill-style/fill-style-extension.ts +6 -7
- package/src/fill-style/shaders.glsl.ts +2 -2
- package/src/mask/mask-effect.ts +11 -10
- package/src/mask/mask-pass.ts +19 -20
- package/src/mask/shader-module.ts +2 -2
- package/src/path-style/path-style-extension.ts +18 -13
- package/src/terrain/height-map-builder.ts +8 -8
- package/src/terrain/shader-module.ts +8 -6
- package/src/terrain/terrain-cover.ts +8 -6
- package/src/terrain/terrain-effect.ts +14 -13
- package/src/terrain/terrain-pass.ts +6 -7
- package/src/terrain/terrain-picking-pass.ts +3 -3
- package/src/terrain/utils.ts +13 -13
- package/src/utils/debug.ts +2 -1
- package/typed/brushing/brushing-extension.d.ts.map +1 -1
- package/typed/clip/clip-extension.d.ts.map +1 -1
- package/typed/collision-filter/collision-filter-effect.d.ts +4 -4
- package/typed/collision-filter/collision-filter-effect.d.ts.map +1 -1
- package/typed/collision-filter/collision-filter-pass.d.ts.map +1 -1
- package/typed/collision-filter/shader-module.d.ts.map +1 -1
- package/typed/data-filter/aggregator.d.ts +10 -8
- package/typed/data-filter/aggregator.d.ts.map +1 -1
- package/typed/data-filter/data-filter-extension.d.ts +1 -1
- package/typed/data-filter/data-filter-extension.d.ts.map +1 -1
- package/typed/fill-style/fill-style-extension.d.ts +3 -3
- package/typed/fill-style/fill-style-extension.d.ts.map +1 -1
- package/typed/fill-style/shaders.glsl.d.ts +2 -2
- package/typed/fill-style/shaders.glsl.d.ts.map +1 -1
- package/typed/mask/mask-effect.d.ts +3 -3
- package/typed/mask/mask-effect.d.ts.map +1 -1
- package/typed/mask/mask-pass.d.ts +3 -3
- package/typed/mask/mask-pass.d.ts.map +1 -1
- package/typed/mask/shader-module.d.ts +2 -2
- package/typed/mask/shader-module.d.ts.map +1 -1
- package/typed/path-style/path-style-extension.d.ts.map +1 -1
- package/typed/terrain/height-map-builder.d.ts +4 -4
- package/typed/terrain/height-map-builder.d.ts.map +1 -1
- package/typed/terrain/shader-module.d.ts +3 -3
- package/typed/terrain/shader-module.d.ts.map +1 -1
- package/typed/terrain/terrain-cover.d.ts.map +1 -1
- package/typed/terrain/terrain-effect.d.ts +4 -3
- package/typed/terrain/terrain-effect.d.ts.map +1 -1
- package/typed/terrain/terrain-pass.d.ts.map +1 -1
- package/typed/terrain/utils.d.ts +3 -2
- package/typed/terrain/utils.d.ts.map +1 -1
- package/typed/utils/debug.d.ts +1 -0
- package/typed/utils/debug.d.ts.map +1 -1
package/src/mask/mask-pass.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {Device, Framebuffer, Texture} from '@luma.gl/core';
|
|
2
|
+
import {withGLParameters} from '@luma.gl/webgl';
|
|
3
|
+
import {GL} from '@luma.gl/constants';
|
|
2
4
|
import {_LayersPass as LayersPass, LayersPassRenderOptions} from '@deck.gl/core';
|
|
3
5
|
|
|
4
6
|
type MaskPassRenderOptions = LayersPassRenderOptions & {
|
|
@@ -7,48 +9,45 @@ type MaskPassRenderOptions = LayersPassRenderOptions & {
|
|
|
7
9
|
};
|
|
8
10
|
|
|
9
11
|
export default class MaskPass extends LayersPass {
|
|
10
|
-
maskMap:
|
|
12
|
+
maskMap: Texture;
|
|
11
13
|
fbo: Framebuffer;
|
|
12
14
|
|
|
13
|
-
constructor(
|
|
14
|
-
super(
|
|
15
|
+
constructor(device: Device, props: {id: string; mapSize?: number}) {
|
|
16
|
+
super(device, props);
|
|
15
17
|
|
|
16
18
|
const {mapSize = 2048} = props;
|
|
17
19
|
|
|
18
|
-
this.maskMap =
|
|
20
|
+
this.maskMap = device.createTexture({
|
|
21
|
+
format: 'rgba8unorm',
|
|
19
22
|
width: mapSize,
|
|
20
23
|
height: mapSize,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
sampler: {
|
|
25
|
+
minFilter: 'linear',
|
|
26
|
+
magFilter: 'linear',
|
|
27
|
+
addressModeU: 'clamp-to-edge',
|
|
28
|
+
addressModeV: 'clamp-to-edge'
|
|
26
29
|
}
|
|
27
30
|
});
|
|
28
31
|
|
|
29
|
-
this.fbo =
|
|
32
|
+
this.fbo = device.createFramebuffer({
|
|
30
33
|
id: 'maskmap',
|
|
31
34
|
width: mapSize,
|
|
32
35
|
height: mapSize,
|
|
33
|
-
|
|
34
|
-
[gl.COLOR_ATTACHMENT0]: this.maskMap
|
|
35
|
-
}
|
|
36
|
+
colorAttachments: [this.maskMap]
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
render(options: MaskPassRenderOptions) {
|
|
40
|
-
const gl = this.gl;
|
|
41
|
-
|
|
42
41
|
const colorMask = [false, false, false, false];
|
|
43
42
|
colorMask[options.channel] = true;
|
|
44
43
|
|
|
45
|
-
return
|
|
46
|
-
|
|
44
|
+
return withGLParameters(
|
|
45
|
+
this.device,
|
|
47
46
|
{
|
|
48
47
|
clearColor: [255, 255, 255, 255],
|
|
49
48
|
blend: true,
|
|
50
|
-
blendFunc: [
|
|
51
|
-
blendEquation:
|
|
49
|
+
blendFunc: [GL.ZERO, GL.ONE],
|
|
50
|
+
blendEquation: GL.FUNC_SUBTRACT,
|
|
52
51
|
colorMask,
|
|
53
52
|
depthTest: false
|
|
54
53
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {project} from '@deck.gl/core';
|
|
2
2
|
import type {_ShaderModule as ShaderModule} from '@deck.gl/core';
|
|
3
|
-
import type {
|
|
3
|
+
import type {Texture} from '@luma.gl/core';
|
|
4
4
|
|
|
5
5
|
const vs = `
|
|
6
6
|
uniform vec4 mask_bounds;
|
|
@@ -69,7 +69,7 @@ varying vec2 mask_texCoords;
|
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
type MaskModuleSettings = {
|
|
72
|
-
maskMap?:
|
|
72
|
+
maskMap?: Texture;
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
/* eslint-disable camelcase */
|
|
@@ -19,10 +19,11 @@
|
|
|
19
19
|
// THE SOFTWARE.
|
|
20
20
|
|
|
21
21
|
import {LayerExtension, _mergeShaders as mergeShaders} from '@deck.gl/core';
|
|
22
|
+
import {vec3} from '@math.gl/core';
|
|
22
23
|
import {dashShaders, offsetShaders} from './shaders.glsl';
|
|
23
|
-
import {dist} from 'gl-matrix/vec3';
|
|
24
24
|
|
|
25
25
|
import type {Layer, LayerContext, Accessor, UpdateParameters} from '@deck.gl/core';
|
|
26
|
+
import type {Model} from '@luma.gl/engine';
|
|
26
27
|
|
|
27
28
|
const defaultProps = {
|
|
28
29
|
getDashArray: {type: 'accessor', value: [0, 0]},
|
|
@@ -116,16 +117,20 @@ export default class PathStyleExtension extends LayerExtension<PathStyleExtensio
|
|
|
116
117
|
|
|
117
118
|
if (extension.opts.dash) {
|
|
118
119
|
attributeManager.addInstanced({
|
|
119
|
-
instanceDashArrays: {size: 2, accessor: 'getDashArray'}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
120
|
+
instanceDashArrays: {size: 2, accessor: 'getDashArray'},
|
|
121
|
+
instanceDashOffsets: extension.opts.highPrecisionDash
|
|
122
|
+
? {
|
|
123
|
+
size: 1,
|
|
124
|
+
accessor: 'getPath',
|
|
125
|
+
transform: extension.getDashOffsets.bind(this)
|
|
126
|
+
}
|
|
127
|
+
: {
|
|
128
|
+
size: 1,
|
|
129
|
+
update: attribute => {
|
|
130
|
+
attribute.constant = true;
|
|
131
|
+
attribute.value = [0];
|
|
132
|
+
}
|
|
133
|
+
}
|
|
129
134
|
});
|
|
130
135
|
}
|
|
131
136
|
if (extension.opts.offset) {
|
|
@@ -151,7 +156,7 @@ export default class PathStyleExtension extends LayerExtension<PathStyleExtensio
|
|
|
151
156
|
uniforms.dashGapPickable = Boolean(this.props.dashGapPickable);
|
|
152
157
|
}
|
|
153
158
|
|
|
154
|
-
this.state.model
|
|
159
|
+
(this.state.model as Model)?.setUniforms(uniforms);
|
|
155
160
|
}
|
|
156
161
|
|
|
157
162
|
getDashOffsets(this: Layer<PathStyleExtensionProps>, path: number[] | number[][]): number[] {
|
|
@@ -167,7 +172,7 @@ export default class PathStyleExtension extends LayerExtension<PathStyleExtensio
|
|
|
167
172
|
p = this.projectPosition(p);
|
|
168
173
|
|
|
169
174
|
if (i > 0) {
|
|
170
|
-
result[i] = result[i - 1] + dist(prevP, p);
|
|
175
|
+
result[i] = result[i - 1] + vec3.dist(prevP, p);
|
|
171
176
|
}
|
|
172
177
|
|
|
173
178
|
prevP = p;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {Framebuffer} from '@luma.gl/core';
|
|
1
|
+
import {Device, Framebuffer} from '@luma.gl/core';
|
|
2
2
|
import {joinLayerBounds, getRenderBounds, makeViewport, Bounds} from '../utils/projection-utils';
|
|
3
3
|
import {createRenderTarget} from './utils';
|
|
4
4
|
|
|
@@ -20,7 +20,7 @@ export class HeightMapBuilder {
|
|
|
20
20
|
bounds: Bounds | null = null;
|
|
21
21
|
|
|
22
22
|
protected fbo?: Framebuffer;
|
|
23
|
-
protected
|
|
23
|
+
protected device: Device;
|
|
24
24
|
/** Last rendered layers */
|
|
25
25
|
private layers: Layer[] = [];
|
|
26
26
|
/** Last layer.getBounds() */
|
|
@@ -29,12 +29,12 @@ export class HeightMapBuilder {
|
|
|
29
29
|
private layersBoundsCommon: Bounds | null = null;
|
|
30
30
|
private lastViewport: Viewport | null = null;
|
|
31
31
|
|
|
32
|
-
static isSupported(
|
|
33
|
-
return
|
|
32
|
+
static isSupported(device: Device): boolean {
|
|
33
|
+
return device.isTextureFormatRenderable('rgba32float');
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
constructor(
|
|
37
|
-
this.
|
|
36
|
+
constructor(device: Device) {
|
|
37
|
+
this.device = device;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/** Returns the height map framebuffer for read/write access.
|
|
@@ -45,7 +45,7 @@ export class HeightMapBuilder {
|
|
|
45
45
|
return null;
|
|
46
46
|
}
|
|
47
47
|
if (!this.fbo) {
|
|
48
|
-
this.fbo = createRenderTarget(this.
|
|
48
|
+
this.fbo = createRenderTarget(this.device, {id: 'height-map', float: true});
|
|
49
49
|
}
|
|
50
50
|
return this.fbo;
|
|
51
51
|
}
|
|
@@ -118,7 +118,7 @@ export class HeightMapBuilder {
|
|
|
118
118
|
|
|
119
119
|
delete() {
|
|
120
120
|
if (this.fbo) {
|
|
121
|
-
this.fbo.
|
|
121
|
+
this.fbo.colorAttachments[0].delete();
|
|
122
122
|
this.fbo.delete();
|
|
123
123
|
}
|
|
124
124
|
}
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
import {project} from '@deck.gl/core';
|
|
4
4
|
import type {_ShaderModule as ShaderModule} from '@deck.gl/core';
|
|
5
5
|
|
|
6
|
-
import type {
|
|
6
|
+
import type {Texture} from '@luma.gl/core';
|
|
7
7
|
import type {Bounds} from '../utils/projection-utils';
|
|
8
8
|
import type {TerrainCover} from './terrain-cover';
|
|
9
9
|
|
|
10
10
|
/** Module parameters expected by the terrain shader module */
|
|
11
11
|
export type TerrainModuleSettings = {
|
|
12
12
|
pickingActive?: boolean;
|
|
13
|
-
heightMap:
|
|
13
|
+
heightMap: Texture | null;
|
|
14
14
|
heightMapBounds?: Bounds | null;
|
|
15
|
-
dummyHeightMap:
|
|
15
|
+
dummyHeightMap: Texture;
|
|
16
16
|
terrainCover?: TerrainCover | null;
|
|
17
17
|
drawToTerrainHeightMap?: boolean;
|
|
18
18
|
useTerrainHeightMap?: boolean;
|
|
@@ -38,6 +38,7 @@ const TERRAIN_MODE_CONSTANTS = Object.keys(TERRAIN_MODE)
|
|
|
38
38
|
.map(key => `const float TERRAIN_MODE_${key} = ${TERRAIN_MODE[key]}.0;`)
|
|
39
39
|
.join('\n');
|
|
40
40
|
|
|
41
|
+
// @ts-expect-error
|
|
41
42
|
export const terrainModule = {
|
|
42
43
|
name: 'terrain',
|
|
43
44
|
dependencies: [project],
|
|
@@ -102,7 +103,7 @@ if ((terrain_mode == TERRAIN_MODE_USE_COVER) || (terrain_mode == TERRAIN_MODE_US
|
|
|
102
103
|
`
|
|
103
104
|
},
|
|
104
105
|
// eslint-disable-next-line complexity
|
|
105
|
-
getUniforms: (opts = {}, uniforms) => {
|
|
106
|
+
getUniforms: (opts: Partial<TerrainModuleSettings> = {}, uniforms) => {
|
|
106
107
|
if ('dummyHeightMap' in opts) {
|
|
107
108
|
const {
|
|
108
109
|
drawToTerrainHeightMap,
|
|
@@ -117,7 +118,7 @@ if ((terrain_mode == TERRAIN_MODE_USE_COVER) || (terrain_mode == TERRAIN_MODE_US
|
|
|
117
118
|
|
|
118
119
|
let mode: number = terrainSkipRender ? TERRAIN_MODE.SKIP : TERRAIN_MODE.NONE;
|
|
119
120
|
// height map if case USE_HEIGHT_MAP, terrain cover if USE_COVER, otherwise empty
|
|
120
|
-
let sampler
|
|
121
|
+
let sampler = dummyHeightMap as Texture;
|
|
121
122
|
// height map bounds if case USE_HEIGHT_MAP, terrain cover bounds if USE_COVER, otherwise null
|
|
122
123
|
let bounds: number[] | null = null;
|
|
123
124
|
if (drawToTerrainHeightMap) {
|
|
@@ -130,6 +131,7 @@ if ((terrain_mode == TERRAIN_MODE_USE_COVER) || (terrain_mode == TERRAIN_MODE_US
|
|
|
130
131
|
} else if (terrainCover) {
|
|
131
132
|
// This is a terrain layer
|
|
132
133
|
const isPicking = opts.pickingActive;
|
|
134
|
+
// @ts-expect-error
|
|
133
135
|
sampler = isPicking
|
|
134
136
|
? terrainCover.getPickingFramebuffer()
|
|
135
137
|
: terrainCover.getRenderFramebuffer();
|
|
@@ -141,7 +143,7 @@ if ((terrain_mode == TERRAIN_MODE_USE_COVER) || (terrain_mode == TERRAIN_MODE_US
|
|
|
141
143
|
mode = mode === TERRAIN_MODE.SKIP ? TERRAIN_MODE.USE_COVER_ONLY : TERRAIN_MODE.USE_COVER;
|
|
142
144
|
bounds = terrainCover.bounds;
|
|
143
145
|
} else {
|
|
144
|
-
sampler = dummyHeightMap
|
|
146
|
+
sampler = dummyHeightMap!;
|
|
145
147
|
}
|
|
146
148
|
}
|
|
147
149
|
|
|
@@ -163,7 +163,7 @@ export class TerrainCover {
|
|
|
163
163
|
return null;
|
|
164
164
|
}
|
|
165
165
|
if (!this.fbo) {
|
|
166
|
-
this.fbo = createRenderTarget(this.targetLayer.context.
|
|
166
|
+
this.fbo = createRenderTarget(this.targetLayer.context.device, {id: this.id});
|
|
167
167
|
}
|
|
168
168
|
return this.fbo;
|
|
169
169
|
}
|
|
@@ -173,7 +173,9 @@ export class TerrainCover {
|
|
|
173
173
|
return null;
|
|
174
174
|
}
|
|
175
175
|
if (!this.pickingFbo) {
|
|
176
|
-
this.pickingFbo = createRenderTarget(this.targetLayer.context.
|
|
176
|
+
this.pickingFbo = createRenderTarget(this.targetLayer.context.device, {
|
|
177
|
+
id: `${this.id}-picking`
|
|
178
|
+
});
|
|
177
179
|
}
|
|
178
180
|
return this.pickingFbo;
|
|
179
181
|
}
|
|
@@ -185,12 +187,12 @@ export class TerrainCover {
|
|
|
185
187
|
delete() {
|
|
186
188
|
const {fbo, pickingFbo} = this;
|
|
187
189
|
if (fbo) {
|
|
188
|
-
fbo.
|
|
189
|
-
fbo.
|
|
190
|
+
fbo.colorAttachments[0].destroy();
|
|
191
|
+
fbo.destroy();
|
|
190
192
|
}
|
|
191
193
|
if (pickingFbo) {
|
|
192
|
-
pickingFbo.
|
|
193
|
-
pickingFbo.
|
|
194
|
+
pickingFbo.colorAttachments[0].destroy();
|
|
195
|
+
pickingFbo.destroy();
|
|
194
196
|
}
|
|
195
197
|
}
|
|
196
198
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {log} from '@deck.gl/core';
|
|
1
|
+
import {Device, Texture} from '@luma.gl/core';
|
|
2
|
+
import {log, getShaderAssembler} from '@deck.gl/core';
|
|
3
3
|
|
|
4
4
|
import {terrainModule, TerrainModuleSettings} from './shader-module';
|
|
5
5
|
import {TerrainCover} from './terrain-cover';
|
|
@@ -20,7 +20,7 @@ export class TerrainEffect implements Effect {
|
|
|
20
20
|
/** true if should use in the current pass */
|
|
21
21
|
private isDrapingEnabled: boolean = false;
|
|
22
22
|
/** An empty texture as placeholder */
|
|
23
|
-
private dummyHeightMap
|
|
23
|
+
private dummyHeightMap?: Texture;
|
|
24
24
|
/** A texture encoding the ground elevation, updated once per redraw. Used by layers with offset mode */
|
|
25
25
|
private heightMap?: HeightMapBuilder;
|
|
26
26
|
private terrainPass!: TerrainPass;
|
|
@@ -28,28 +28,28 @@ export class TerrainEffect implements Effect {
|
|
|
28
28
|
/** One texture for each primitive terrain layer, into which the draped layers render */
|
|
29
29
|
private terrainCovers: Map<string, TerrainCover> = new Map();
|
|
30
30
|
|
|
31
|
-
initialize(
|
|
32
|
-
this.dummyHeightMap =
|
|
31
|
+
initialize(device: Device) {
|
|
32
|
+
this.dummyHeightMap = device.createTexture({
|
|
33
33
|
width: 1,
|
|
34
34
|
height: 1,
|
|
35
35
|
data: new Uint8Array([0, 0, 0, 0])
|
|
36
36
|
});
|
|
37
|
-
this.terrainPass = new TerrainPass(
|
|
38
|
-
this.terrainPickingPass = new TerrainPickingPass(
|
|
37
|
+
this.terrainPass = new TerrainPass(device, {id: 'terrain'});
|
|
38
|
+
this.terrainPickingPass = new TerrainPickingPass(device, {id: 'terrain-picking'});
|
|
39
39
|
|
|
40
|
-
if (HeightMapBuilder.isSupported(
|
|
41
|
-
this.heightMap = new HeightMapBuilder(
|
|
40
|
+
if (HeightMapBuilder.isSupported(device)) {
|
|
41
|
+
this.heightMap = new HeightMapBuilder(device);
|
|
42
42
|
} else {
|
|
43
43
|
log.warn('Terrain offset mode is not supported by this browser')();
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
getShaderAssembler().addDefaultModule(terrainModule);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
preRender(
|
|
49
|
+
preRender(device: Device, opts: PreRenderOptions): void {
|
|
50
50
|
if (!this.dummyHeightMap) {
|
|
51
51
|
// First time this effect is in use, initialize resources and register the shader module
|
|
52
|
-
this.initialize(
|
|
52
|
+
this.initialize(device);
|
|
53
53
|
for (const layer of opts.layers) {
|
|
54
54
|
// Force the terrain layer (and its descendents) to rebuild their models with the new shader
|
|
55
55
|
if (layer.props.operation.includes('terrain')) {
|
|
@@ -96,9 +96,10 @@ export class TerrainEffect implements Effect {
|
|
|
96
96
|
const {terrainDrawMode} = layer.state;
|
|
97
97
|
|
|
98
98
|
return {
|
|
99
|
+
// @ts-expect-error
|
|
99
100
|
heightMap: this.heightMap?.getRenderFramebuffer(),
|
|
100
101
|
heightMapBounds: this.heightMap?.bounds,
|
|
101
|
-
dummyHeightMap: this.dummyHeightMap
|
|
102
|
+
dummyHeightMap: this.dummyHeightMap!,
|
|
102
103
|
terrainCover: this.isDrapingEnabled ? this.terrainCovers.get(layer.id) : null,
|
|
103
104
|
useTerrainHeightMap: terrainDrawMode === 'offset',
|
|
104
105
|
terrainSkipRender: terrainDrawMode === 'drape' || !layer.props.operation.includes('draw')
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {withGLParameters} from '@luma.gl/webgl';
|
|
2
|
+
import {GL} from '@luma.gl/constants';
|
|
2
3
|
import {Layer, Viewport, _LayersPass as LayersPass, LayersPassRenderOptions} from '@deck.gl/core';
|
|
3
4
|
import type {HeightMapBuilder} from './height-map-builder';
|
|
4
5
|
import type {TerrainCover} from './terrain-cover';
|
|
5
6
|
|
|
6
|
-
import GL from '@luma.gl/constants';
|
|
7
|
-
|
|
8
7
|
export type TerrainPassRenderOptions = LayersPassRenderOptions;
|
|
9
8
|
|
|
10
9
|
/** Renders textures used by the TerrainEffect render pass */
|
|
@@ -34,8 +33,8 @@ export class TerrainPass extends LayersPass {
|
|
|
34
33
|
|
|
35
34
|
target.resize(viewport);
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
this.
|
|
36
|
+
withGLParameters(
|
|
37
|
+
this.device,
|
|
39
38
|
{
|
|
40
39
|
clearColor: [0, 0, 0, 0],
|
|
41
40
|
blend: true,
|
|
@@ -67,8 +66,8 @@ export class TerrainPass extends LayersPass {
|
|
|
67
66
|
const layers = terrainCover.filterLayers(opts.layers!);
|
|
68
67
|
target.resize(viewport);
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
this.
|
|
69
|
+
withGLParameters(
|
|
70
|
+
this.device,
|
|
72
71
|
{
|
|
73
72
|
clearColor: [0, 0, 0, 0],
|
|
74
73
|
depthTest: false
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
LayersPassRenderOptions,
|
|
5
5
|
_PickLayersPass as PickLayersPass
|
|
6
6
|
} from '@deck.gl/core';
|
|
7
|
-
import {
|
|
7
|
+
import {withGLParameters} from '@luma.gl/webgl';
|
|
8
8
|
import type {TerrainCover} from './terrain-cover';
|
|
9
9
|
|
|
10
10
|
export type TerrainPickingPassRenderOptions = LayersPassRenderOptions & {
|
|
@@ -54,8 +54,8 @@ export class TerrainPickingPass extends PickLayersPass {
|
|
|
54
54
|
}
|
|
55
55
|
target.resize(viewport);
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
this.
|
|
57
|
+
withGLParameters(
|
|
58
|
+
this.device,
|
|
59
59
|
{
|
|
60
60
|
depthTest: false
|
|
61
61
|
},
|
package/src/terrain/utils.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import GL from '@luma.gl/constants';
|
|
1
|
+
import type {Device} from '@luma.gl/core';
|
|
2
|
+
import {GL} from '@luma.gl/constants';
|
|
3
3
|
|
|
4
4
|
export function createRenderTarget(
|
|
5
|
-
|
|
5
|
+
device: Device,
|
|
6
6
|
opts: {
|
|
7
7
|
id: string;
|
|
8
8
|
float?: boolean;
|
|
9
9
|
}
|
|
10
10
|
) {
|
|
11
|
-
return
|
|
11
|
+
return device.createFramebuffer({
|
|
12
12
|
id: opts.id,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
colorAttachments: [
|
|
14
|
+
device.createTexture({
|
|
15
15
|
...(opts.float && {
|
|
16
|
-
format:
|
|
16
|
+
format: device.info.type === 'webgl2' ? 'rgba32float' : 'rgba8unorm',
|
|
17
17
|
type: GL.FLOAT
|
|
18
18
|
}),
|
|
19
19
|
mipmaps: false,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
sampler: {
|
|
21
|
+
minFilter: 'linear',
|
|
22
|
+
magFilter: 'linear',
|
|
23
|
+
addressModeU: 'clamp-to-edge',
|
|
24
|
+
addressModeV: 'clamp-to-edge'
|
|
25
25
|
}
|
|
26
26
|
})
|
|
27
|
-
|
|
27
|
+
]
|
|
28
28
|
});
|
|
29
29
|
}
|
package/src/utils/debug.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* global document */
|
|
2
2
|
|
|
3
|
-
import {Framebuffer
|
|
3
|
+
import {Framebuffer} from '@luma.gl/core';
|
|
4
|
+
import {readPixelsToArray} from '@luma.gl/webgl';
|
|
4
5
|
|
|
5
6
|
/** Debug utility to draw FBO contents onto screen */
|
|
6
7
|
// eslint-disable-next-line
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brushing-extension.d.ts","sourceRoot":"","sources":["../../src/brushing/brushing-extension.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;
|
|
1
|
+
{"version":3,"file":"brushing-extension.d.ts","sourceRoot":"","sources":["../../src/brushing/brushing-extension.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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ts","sourceRoot":"","sources":["../../src/clip/clip-extension.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;;;;;;;;;IAwB1C,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,EAAE,EAAC,QAAQ,EAAC,EAAE,GAAG,GAAG,IAAI;CAgBvE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Framebuffer,
|
|
1
|
+
import { Device, Framebuffer, Texture } from '@luma.gl/core';
|
|
2
2
|
import type { Effect, Layer, PreRenderOptions } from '@deck.gl/core/typed';
|
|
3
3
|
export default class CollisionFilterEffect implements Effect {
|
|
4
4
|
id: string;
|
|
@@ -10,7 +10,7 @@ export default class CollisionFilterEffect implements Effect {
|
|
|
10
10
|
private collisionFBOs;
|
|
11
11
|
private dummyCollisionMap?;
|
|
12
12
|
private lastViewport?;
|
|
13
|
-
preRender(
|
|
13
|
+
preRender(device: Device, { effects: allEffects, layers, layerFilter, viewports, onViewportActive, views, isPicking, preRenderStats }: PreRenderOptions): void;
|
|
14
14
|
private _render;
|
|
15
15
|
/**
|
|
16
16
|
* Group layers by collisionGroup
|
|
@@ -19,10 +19,10 @@ export default class CollisionFilterEffect implements Effect {
|
|
|
19
19
|
private _groupByCollisionGroup;
|
|
20
20
|
getModuleParameters(layer: Layer): {
|
|
21
21
|
collisionFBO: Framebuffer;
|
|
22
|
-
dummyCollisionMap:
|
|
22
|
+
dummyCollisionMap: Texture;
|
|
23
23
|
};
|
|
24
24
|
cleanup(): void;
|
|
25
|
-
createFBO(
|
|
25
|
+
createFBO(device: Device, collisionGroup: string): void;
|
|
26
26
|
destroyFBO(collisionGroup: string): void;
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=collision-filter-effect.d.ts.map
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"collision-filter-effect.d.ts","sourceRoot":"","sources":["../../src/collision-filter/collision-filter-effect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AAI3D,OAAO,KAAK,EAAC,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAW,MAAM,eAAe,CAAC;AAoB7E,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,CAAU;IACpC,OAAO,CAAC,YAAY,CAAC,CAAW;IAEhC,SAAS,CACP,MAAM,EAAE,MAAM,EACd,EACE,OAAO,EAAE,UAAU,EACnB,MAAM,EACN,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,cAAmB,EACpB,EAAE,gBAAgB,GAClB,IAAI;IAyDP,OAAO,CAAC,OAAO;IA+Df;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAqC9B,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG;QACjC,YAAY,EAAE,WAAW,CAAC;QAC1B,iBAAiB,EAAE,OAAO,CAAC;KAC5B;IAMD,OAAO,IAAI,IAAI;IAaf,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;IA8BhD,UAAU,CAAC,cAAc,EAAE,MAAM;CAUlC"}
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"collision-filter-pass.d.ts","sourceRoot":"","sources":["../../src/collision-filter/collision-filter-pass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,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;IAiBjF,mBAAmB;;;;;;CASpB"}
|
|
@@ -1 +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;;
|
|
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;;AA0GjE,wBAMkB"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
1
|
+
import { Device, Framebuffer } from '@luma.gl/core';
|
|
2
|
+
import { Model } from '@luma.gl/engine';
|
|
3
|
+
import { GL } from '@luma.gl/constants';
|
|
4
|
+
export declare function supportsFloatTarget(device: Device): boolean;
|
|
5
|
+
export declare function getFramebuffer(device: Device, useFloatTarget: boolean): Framebuffer;
|
|
6
|
+
export declare function getModel(device: Device, shaderOptions: any, useFloatTarget: boolean): Model;
|
|
5
7
|
export declare const parameters: {
|
|
6
|
-
blend:
|
|
7
|
-
blendFunc:
|
|
8
|
-
blendEquation:
|
|
9
|
-
depthTest:
|
|
8
|
+
readonly blend: true;
|
|
9
|
+
readonly blendFunc: readonly [GL.LINES, GL.LINES, GL.LINES, GL.LINES];
|
|
10
|
+
readonly blendEquation: readonly [GL.FUNC_ADD, GL.FUNC_ADD];
|
|
11
|
+
readonly depthTest: false;
|
|
10
12
|
};
|
|
11
13
|
//# sourceMappingURL=aggregator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregator.d.ts","sourceRoot":"","sources":["../../src/data-filter/aggregator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"aggregator.d.ts","sourceRoot":"","sources":["../../src/data-filter/aggregator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AAClD,OAAO,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAC,EAAE,EAAC,MAAM,oBAAoB,CAAC;AAiDtC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAY3D;AAGD,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,GAAG,WAAW,CAmBnF;AAGD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,cAAc,EAAE,OAAO,GAAG,KAAK,CAe3F;AAED,eAAO,MAAM,UAAU;;;;;CAKb,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LayerExtension } from '@deck.gl/core/typed';
|
|
2
1
|
import type { Layer, LayerContext, Accessor, UpdateParameters } from '@deck.gl/core/typed';
|
|
2
|
+
import { LayerExtension } from '@deck.gl/core/typed';
|
|
3
3
|
export declare type DataFilterExtensionProps<DataT = any> = {
|
|
4
4
|
/**
|
|
5
5
|
* Accessor to retrieve the value for each object that it will be filtered by.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-filter-extension.d.ts","sourceRoot":"","sources":["../../src/data-filter/data-filter-extension.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"data-filter-extension.d.ts","sourceRoot":"","sources":["../../src/data-filter/data-filter-extension.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AACnF,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAe7C,oBAAY,wBAAwB,CAAC,KAAK,GAAG,GAAG,IAAI;IAClD;;;OAGG;IACH,cAAc,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IACpD;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACpD;;;;OAIG;IACH,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC;IAC/D;;;OAGG;IACH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|
|
|
1
1
|
import { LayerExtension } from '@deck.gl/core/typed';
|
|
2
|
-
import type { Layer, LayerContext, Accessor, AccessorFunction,
|
|
2
|
+
import type { Layer, LayerContext, Accessor, AccessorFunction, TextureSource, UpdateParameters } from '@deck.gl/core/typed';
|
|
3
3
|
export declare type FillStyleExtensionProps<DataT = any> = {
|
|
4
4
|
/** Cheap toggle to enable/disable pattern fill. Requires the `pattern` option to be on.
|
|
5
5
|
* @default true
|
|
6
6
|
*/
|
|
7
7
|
fillPatternEnabled?: boolean;
|
|
8
8
|
/** Sprite image url or texture that packs all your patterns into one layout. */
|
|
9
|
-
fillPatternAtlas?: string |
|
|
9
|
+
fillPatternAtlas?: string | TextureSource;
|
|
10
10
|
/** Pattern names mapped to pattern definitions, or a url that points to a JSON file. */
|
|
11
11
|
fillPatternMapping?: string | Record<string, {
|
|
12
12
|
/** Left position of the pattern on the atlas */
|
|
@@ -50,7 +50,7 @@ export default class FillStyleExtension extends LayerExtension<FillStyleExtensio
|
|
|
50
50
|
value: null;
|
|
51
51
|
async: boolean;
|
|
52
52
|
parameters: {
|
|
53
|
-
|
|
53
|
+
minFilter: string;
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
fillPatternMapping: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fill-style-extension.d.ts","sourceRoot":"","sources":["../../src/fill-style/fill-style-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"fill-style-extension.d.ts","sourceRoot":"","sources":["../../src/fill-style/fill-style-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAI7C,OAAO,KAAK,EACV,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EACjB,MAAM,eAAe,CAAC;AAoBvB,oBAAY,uBAAuB,CAAC,KAAK,GAAG,GAA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C,IAAI,EAAE,KAAK,CAAC,uBAAuB,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI;IA0D5F,WAAW,CACT,IAAI,EAAE,KAAK,CAAC,uBAAuB,CAAC,EACpC,EAAC,KAAK,EAAE,QAAQ,EAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,EACnE,SAAS,EAAE,IAAI;IAWjB,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,uBAAuB,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI;IAWvE,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,uBAAuB,CAAC;IAKlD,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,uBAAuB,CAAC,EAAE,IAAI,EAAE,MAAM;CAKnE"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Viewport, _ShaderModule as ShaderModule } from '@deck.gl/core/typed';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Texture } from '@luma.gl/core';
|
|
3
3
|
declare type FillStyleModuleSettings = {
|
|
4
4
|
viewport: Viewport;
|
|
5
5
|
fillPatternEnabled?: boolean;
|
|
6
6
|
fillPatternMask?: boolean;
|
|
7
7
|
} | {
|
|
8
|
-
fillPatternTexture:
|
|
8
|
+
fillPatternTexture: Texture;
|
|
9
9
|
};
|
|
10
10
|
export declare const patternShaders: ShaderModule<FillStyleModuleSettings>;
|
|
11
11
|
export {};
|