@deck.gl/extensions 9.0.0-alpha.3 → 9.0.0-alpha.4
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 +2064 -2061
- package/dist/es5/collision-filter/collision-filter-effect.js +6 -9
- package/dist/es5/collision-filter/collision-filter-effect.js.map +1 -1
- package/dist/es5/collision-filter/collision-filter-pass.js +2 -1
- package/dist/es5/collision-filter/collision-filter-pass.js.map +1 -1
- package/dist/es5/collision-filter/shader-module.js +1 -1
- package/dist/es5/collision-filter/shader-module.js.map +1 -1
- package/dist/es5/mask/mask-pass.js +2 -1
- package/dist/es5/mask/mask-pass.js.map +1 -1
- package/dist/esm/collision-filter/collision-filter-effect.js +6 -8
- package/dist/esm/collision-filter/collision-filter-effect.js.map +1 -1
- package/dist/esm/collision-filter/collision-filter-pass.js +2 -1
- package/dist/esm/collision-filter/collision-filter-pass.js.map +1 -1
- package/dist/esm/collision-filter/shader-module.js +1 -1
- package/dist/esm/collision-filter/shader-module.js.map +1 -1
- package/dist/esm/mask/mask-pass.js +2 -1
- package/dist/esm/mask/mask-pass.js.map +1 -1
- package/dist.min.js +108 -108
- package/package.json +2 -2
- package/src/collision-filter/collision-filter-effect.ts +4 -7
- package/src/collision-filter/collision-filter-pass.ts +2 -2
- package/src/collision-filter/shader-module.ts +4 -3
- package/src/mask/mask-pass.ts +2 -2
- package/typed/collision-filter/collision-filter-effect.d.ts.map +1 -1
- package/typed/collision-filter/shader-module.d.ts +7 -1
- package/typed/collision-filter/shader-module.d.ts.map +1 -1
- package/LICENSE +0 -19
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": "9.0.0-alpha.
|
|
5
|
+
"version": "9.0.0-alpha.4",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"@math.gl/core": "^4.0.0",
|
|
44
44
|
"@math.gl/web-mercator": "^4.0.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
|
|
47
47
|
}
|
|
@@ -247,7 +247,7 @@ export default class CollisionFilterEffect implements Effect {
|
|
|
247
247
|
const depthBuffer = new WEBGLRenderbuffer(
|
|
248
248
|
// @ts-expect-error TODO v9 needs to be WebGLDevice
|
|
249
249
|
device,
|
|
250
|
-
{format: '
|
|
250
|
+
{format: 'depth16unorm', width, height}
|
|
251
251
|
);
|
|
252
252
|
this.collisionFBOs[collisionGroup] = device.createFramebuffer({
|
|
253
253
|
id: `collision-${collisionGroup}`,
|
|
@@ -261,12 +261,9 @@ export default class CollisionFilterEffect implements Effect {
|
|
|
261
261
|
|
|
262
262
|
destroyFBO(collisionGroup: string) {
|
|
263
263
|
const fbo = this.collisionFBOs[collisionGroup];
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
attachment.delete();
|
|
268
|
-
}
|
|
269
|
-
fbo.delete();
|
|
264
|
+
fbo.colorAttachments[0]?.destroy();
|
|
265
|
+
fbo.depthStencilAttachment?.destroy();
|
|
266
|
+
fbo.destroy();
|
|
270
267
|
delete this.collisionFBOs[collisionGroup];
|
|
271
268
|
}
|
|
272
269
|
}
|
|
@@ -7,18 +7,18 @@ type CollisionFilterPassRenderOptions = LayersPassRenderOptions & {};
|
|
|
7
7
|
export default class CollisionFilterPass extends LayersPass {
|
|
8
8
|
renderCollisionMap(target: Framebuffer, options: CollisionFilterPassRenderOptions) {
|
|
9
9
|
const padding = 1;
|
|
10
|
+
const clearColor = [0, 0, 0, 0];
|
|
10
11
|
|
|
11
12
|
return withGLParameters(
|
|
12
13
|
this.device,
|
|
13
14
|
{
|
|
14
15
|
scissorTest: true,
|
|
15
16
|
scissor: [padding, padding, target.width - 2 * padding, target.height - 2 * padding],
|
|
16
|
-
clearColor: [0, 0, 0, 0],
|
|
17
17
|
blend: false,
|
|
18
18
|
depthTest: true,
|
|
19
19
|
depthRange: [0, 1]
|
|
20
20
|
},
|
|
21
|
-
() => this.render({...options, target, pass: 'collision'})
|
|
21
|
+
() => this.render({...options, clearColor, target, pass: 'collision'})
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -89,7 +89,7 @@ type CollisionModuleSettings = {
|
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
/* eslint-disable camelcase */
|
|
92
|
-
type CollisionUniforms = {collision_sort?: boolean; collision_texture?:
|
|
92
|
+
type CollisionUniforms = {collision_sort?: boolean; collision_texture?: Texture};
|
|
93
93
|
|
|
94
94
|
const getCollisionUniforms = (
|
|
95
95
|
opts: CollisionModuleSettings | {},
|
|
@@ -101,7 +101,8 @@ const getCollisionUniforms = (
|
|
|
101
101
|
const {collisionFBO, drawToCollisionMap, dummyCollisionMap} = opts;
|
|
102
102
|
return {
|
|
103
103
|
collision_sort: Boolean(drawToCollisionMap),
|
|
104
|
-
collision_texture:
|
|
104
|
+
collision_texture:
|
|
105
|
+
!drawToCollisionMap && collisionFBO ? collisionFBO.colorAttachments[0] : dummyCollisionMap
|
|
105
106
|
};
|
|
106
107
|
};
|
|
107
108
|
|
|
@@ -112,4 +113,4 @@ export default {
|
|
|
112
113
|
vs,
|
|
113
114
|
inject,
|
|
114
115
|
getUniforms: getCollisionUniforms
|
|
115
|
-
} as ShaderModule
|
|
116
|
+
} as ShaderModule<CollisionModuleSettings>;
|
package/src/mask/mask-pass.ts
CHANGED
|
@@ -40,18 +40,18 @@ export default class MaskPass extends LayersPass {
|
|
|
40
40
|
render(options: MaskPassRenderOptions) {
|
|
41
41
|
const colorMask = [false, false, false, false];
|
|
42
42
|
colorMask[options.channel] = true;
|
|
43
|
+
const clearColor = [255, 255, 255, 255];
|
|
43
44
|
|
|
44
45
|
return withGLParameters(
|
|
45
46
|
this.device,
|
|
46
47
|
{
|
|
47
|
-
clearColor: [255, 255, 255, 255],
|
|
48
48
|
blend: true,
|
|
49
49
|
blendFunc: [GL.ZERO, GL.ONE],
|
|
50
50
|
blendEquation: GL.FUNC_SUBTRACT,
|
|
51
51
|
colorMask,
|
|
52
52
|
depthTest: false
|
|
53
53
|
},
|
|
54
|
-
() => super.render({...options, target: this.fbo, pass: 'mask'})
|
|
54
|
+
() => super.render({...options, clearColor, target: this.fbo, pass: 'mask'})
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -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,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;
|
|
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;CAOlC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { Framebuffer, Texture } from '@luma.gl/core';
|
|
1
2
|
import type { _ShaderModule as ShaderModule } from '@deck.gl/core/typed';
|
|
2
|
-
declare
|
|
3
|
+
declare type CollisionModuleSettings = {
|
|
4
|
+
collisionFBO?: Framebuffer;
|
|
5
|
+
drawToCollisionMap?: boolean;
|
|
6
|
+
dummyCollisionMap?: Texture;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: ShaderModule<CollisionModuleSettings>;
|
|
3
9
|
export default _default;
|
|
4
10
|
//# sourceMappingURL=shader-module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader-module.d.ts","sourceRoot":"","sources":["../../src/collision-filter/shader-module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader-module.d.ts","sourceRoot":"","sources":["../../src/collision-filter/shader-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAC,aAAa,IAAI,YAAY,EAAC,MAAM,eAAe,CAAC;AAkFjE,aAAK,uBAAuB,GAAG;IAC7B,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;;AAqBF,wBAM2C"}
|
package/LICENSE
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
Copyright Vis.gl contributors.
|
|
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.
|