@developmentseed/deck.gl-raster 0.1.0-beta.5 → 0.1.0
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/gpu-modules/color/cielab.d.ts +12 -0
- package/dist/gpu-modules/color/cielab.d.ts.map +1 -0
- package/dist/gpu-modules/color/cielab.js +57 -0
- package/dist/gpu-modules/color/cielab.js.map +1 -0
- package/dist/gpu-modules/color/cmyk.d.ts +12 -0
- package/dist/gpu-modules/color/cmyk.d.ts.map +1 -0
- package/dist/gpu-modules/color/cmyk.js +26 -0
- package/dist/gpu-modules/color/cmyk.js.map +1 -0
- package/dist/gpu-modules/color/index.d.ts +4 -0
- package/dist/gpu-modules/color/index.d.ts.map +1 -0
- package/dist/gpu-modules/color/index.js +4 -0
- package/dist/gpu-modules/color/index.js.map +1 -0
- package/dist/gpu-modules/color/ycbcr.d.ts +12 -0
- package/dist/gpu-modules/color/ycbcr.d.ts.map +1 -0
- package/dist/gpu-modules/color/ycbcr.js +28 -0
- package/dist/gpu-modules/color/ycbcr.js.map +1 -0
- package/dist/gpu-modules/colormap.d.ts +19 -0
- package/dist/gpu-modules/colormap.d.ts.map +1 -0
- package/dist/gpu-modules/colormap.js +19 -0
- package/dist/gpu-modules/colormap.js.map +1 -0
- package/dist/gpu-modules/create-texture.d.ts +19 -0
- package/dist/gpu-modules/create-texture.d.ts.map +1 -0
- package/dist/gpu-modules/create-texture.js +19 -0
- package/dist/gpu-modules/create-texture.js.map +1 -0
- package/dist/gpu-modules/filter-nodata.d.ts +21 -0
- package/dist/gpu-modules/filter-nodata.d.ts.map +1 -0
- package/dist/gpu-modules/filter-nodata.js +31 -0
- package/dist/gpu-modules/filter-nodata.js.map +1 -0
- package/dist/gpu-modules/index.d.ts +6 -0
- package/dist/gpu-modules/index.d.ts.map +1 -0
- package/dist/gpu-modules/index.js +5 -0
- package/dist/gpu-modules/index.js.map +1 -0
- package/dist/gpu-modules/types.d.ts +7 -0
- package/dist/gpu-modules/types.d.ts.map +1 -0
- package/dist/gpu-modules/types.js +2 -0
- package/dist/gpu-modules/types.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mesh-layer/mesh-layer-fragment.glsl.d.ts +12 -0
- package/dist/mesh-layer/mesh-layer-fragment.glsl.d.ts.map +1 -0
- package/dist/mesh-layer/mesh-layer-fragment.glsl.js +42 -0
- package/dist/mesh-layer/mesh-layer-fragment.glsl.js.map +1 -0
- package/dist/mesh-layer/mesh-layer.d.ts +19 -0
- package/dist/mesh-layer/mesh-layer.d.ts.map +1 -0
- package/dist/mesh-layer/mesh-layer.js +38 -0
- package/dist/mesh-layer/mesh-layer.js.map +1 -0
- package/dist/raster-layer.d.ts +12 -19
- package/dist/raster-layer.d.ts.map +1 -1
- package/dist/raster-layer.js +93 -84
- package/dist/raster-layer.js.map +1 -1
- package/dist/raster-tileset/raster-tile-traversal.d.ts +4 -3
- package/dist/raster-tileset/raster-tile-traversal.d.ts.map +1 -1
- package/dist/raster-tileset/raster-tile-traversal.js +7 -4
- package/dist/raster-tileset/raster-tile-traversal.js.map +1 -1
- package/dist/raster-tileset/raster-tileset-2d.d.ts +2 -2
- package/dist/raster-tileset/raster-tileset-2d.d.ts.map +1 -1
- package/package.json +16 -14
- package/dist/index.cjs +0 -4
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -2
- package/dist/layer.d.ts +0 -72
- package/dist/layer.d.ts.map +0 -1
- package/dist/layer.js +0 -88
- package/dist/layer.js.map +0 -1
- package/dist/mesh.d.ts +0 -1
- package/dist/mesh.d.ts.map +0 -1
- package/dist/mesh.js +0 -2
- package/dist/mesh.js.map +0 -1
- package/dist/raster-debug-layer.d.ts +0 -51
- package/dist/raster-debug-layer.d.ts.map +0 -1
- package/dist/raster-debug-layer.js +0 -102
- package/dist/raster-debug-layer.js.map +0 -1
- package/dist/raster-tile-layer.d.ts +0 -1
- package/dist/raster-tile-layer.d.ts.map +0 -1
- package/dist/raster-tile-layer.js +0 -2
- package/dist/raster-tile-layer.js.map +0 -1
- package/dist/raster-tileset-bak/index.d.ts +0 -1
- package/dist/raster-tileset-bak/index.d.ts.map +0 -1
- package/dist/raster-tileset-bak/index.js +0 -2
- package/dist/raster-tileset-bak/index.js.map +0 -1
- package/dist/raster-tileset-bak/raster-tile-traversal.d.ts +0 -104
- package/dist/raster-tileset-bak/raster-tile-traversal.d.ts.map +0 -1
- package/dist/raster-tileset-bak/raster-tile-traversal.js +0 -390
- package/dist/raster-tileset-bak/raster-tile-traversal.js.map +0 -1
- package/dist/raster-tileset-bak/raster-tileset-2d.d.ts +0 -43
- package/dist/raster-tileset-bak/raster-tileset-2d.d.ts.map +0 -1
- package/dist/raster-tileset-bak/raster-tileset-2d.js +0 -288
- package/dist/raster-tileset-bak/raster-tileset-2d.js.map +0 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -2
- package/dist/src/index.js.map +0 -1
- package/dist/src/layer.d.ts +0 -1
- package/dist/src/layer.d.ts.map +0 -1
- package/dist/src/layer.js +0 -3
- package/dist/src/layer.js.map +0 -1
- package/dist/src/mesh.d.ts +0 -1
- package/dist/src/mesh.d.ts.map +0 -1
- package/dist/src/mesh.js +0 -2
- package/dist/src/mesh.js.map +0 -1
- package/dist/tests/placeholder.test.d.ts +0 -2
- package/dist/tests/placeholder.test.d.ts.map +0 -1
- package/dist/tests/placeholder.test.js +0 -7
- package/dist/tests/placeholder.test.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A shader module that injects a unorm texture and uses a sampler2D to assign
|
|
3
|
+
* to a color.
|
|
4
|
+
*/
|
|
5
|
+
export declare const cieLabToRGB: {
|
|
6
|
+
readonly name: "cielab-to-rgb";
|
|
7
|
+
readonly inject: {
|
|
8
|
+
readonly "fs:#decl": "\n const vec3 D65 = vec3(\n 0.95047, // Xn\n 1.00000, // Yn\n 1.08883 // Zn\n );\n\n vec3 cielabToRgb(vec3 labTex) {\n // labTex in [0,1] from RGB8 texture\n float L = labTex.r * 255.0;\n float a = (labTex.g - 0.5) * 255.0;\n float b = (labTex.b - 0.5) * 255.0;\n\n float y = (L + 16.0) / 116.0;\n float x = (a / 500.0) + y;\n float z = y - (b / 200.0);\n\n vec3 xyz;\n vec3 v = vec3(x, y, z);\n vec3 v3 = v * v * v;\n\n xyz = D65 * mix(\n (v - 16.0 / 116.0) / 7.787,\n v3,\n step(0.008856, v3)\n );\n\n vec3 rgb = mat3(\n 3.2406, -1.5372, -0.4986,\n -0.9689, 1.8758, 0.0415,\n 0.0557, -0.2040, 1.0570\n ) * xyz;\n\n // sRGB gamma\n rgb = mix(\n 12.92 * rgb,\n 1.055 * pow(rgb, vec3(1.0 / 2.4)) - 0.055,\n step(0.0031308, rgb)\n );\n\n return clamp(rgb, 0.0, 1.0);\n }\n";
|
|
9
|
+
readonly "fs:DECKGL_FILTER_COLOR": "\n color.rgb = cielabToRgb(color);\n ";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=cielab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cielab.d.ts","sourceRoot":"","sources":["../../../src/gpu-modules/color/cielab.ts"],"names":[],"mappings":"AA8CA;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;CAQa,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const shader = /* glsl */ `
|
|
2
|
+
const vec3 D65 = vec3(
|
|
3
|
+
0.95047, // Xn
|
|
4
|
+
1.00000, // Yn
|
|
5
|
+
1.08883 // Zn
|
|
6
|
+
);
|
|
7
|
+
|
|
8
|
+
vec3 cielabToRgb(vec3 labTex) {
|
|
9
|
+
// labTex in [0,1] from RGB8 texture
|
|
10
|
+
float L = labTex.r * 255.0;
|
|
11
|
+
float a = (labTex.g - 0.5) * 255.0;
|
|
12
|
+
float b = (labTex.b - 0.5) * 255.0;
|
|
13
|
+
|
|
14
|
+
float y = (L + 16.0) / 116.0;
|
|
15
|
+
float x = (a / 500.0) + y;
|
|
16
|
+
float z = y - (b / 200.0);
|
|
17
|
+
|
|
18
|
+
vec3 xyz;
|
|
19
|
+
vec3 v = vec3(x, y, z);
|
|
20
|
+
vec3 v3 = v * v * v;
|
|
21
|
+
|
|
22
|
+
xyz = D65 * mix(
|
|
23
|
+
(v - 16.0 / 116.0) / 7.787,
|
|
24
|
+
v3,
|
|
25
|
+
step(0.008856, v3)
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
vec3 rgb = mat3(
|
|
29
|
+
3.2406, -1.5372, -0.4986,
|
|
30
|
+
-0.9689, 1.8758, 0.0415,
|
|
31
|
+
0.0557, -0.2040, 1.0570
|
|
32
|
+
) * xyz;
|
|
33
|
+
|
|
34
|
+
// sRGB gamma
|
|
35
|
+
rgb = mix(
|
|
36
|
+
12.92 * rgb,
|
|
37
|
+
1.055 * pow(rgb, vec3(1.0 / 2.4)) - 0.055,
|
|
38
|
+
step(0.0031308, rgb)
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
return clamp(rgb, 0.0, 1.0);
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
/**
|
|
45
|
+
* A shader module that injects a unorm texture and uses a sampler2D to assign
|
|
46
|
+
* to a color.
|
|
47
|
+
*/
|
|
48
|
+
export const cieLabToRGB = {
|
|
49
|
+
name: "cielab-to-rgb",
|
|
50
|
+
inject: {
|
|
51
|
+
"fs:#decl": shader,
|
|
52
|
+
"fs:DECKGL_FILTER_COLOR": /* glsl */ `
|
|
53
|
+
color.rgb = cielabToRgb(color);
|
|
54
|
+
`,
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=cielab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cielab.js","sourceRoot":"","sources":["../../../src/gpu-modules/color/cielab.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CzB,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE;QACN,UAAU,EAAE,MAAM;QAClB,wBAAwB,EAAE,UAAU,CAAC;;KAEpC;KACF;CACkC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A shader module that injects a unorm texture and uses a sampler2D to assign
|
|
3
|
+
* to a color.
|
|
4
|
+
*/
|
|
5
|
+
export declare const CMYKToRGB: {
|
|
6
|
+
readonly name: "cmyk-to-rgb";
|
|
7
|
+
readonly inject: {
|
|
8
|
+
readonly "fs:#decl": "\n vec3 cmykToRgb(vec4 cmyk) {\n // cmyk in [0.0, 1.0]\n float invK = 1.0 - cmyk.a;\n\n return vec3(\n (1.0 - cmyk.r) * invK,\n (1.0 - cmyk.g) * invK,\n (1.0 - cmyk.b) * invK\n );\n }\n";
|
|
9
|
+
readonly "fs:DECKGL_FILTER_COLOR": "\n color.rgb = cmykToRgb(color);\n ";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=cmyk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmyk.d.ts","sourceRoot":"","sources":["../../../src/gpu-modules/color/cmyk.ts"],"names":[],"mappings":"AAeA;;;GAGG;AACH,eAAO,MAAM,SAAS;;;;;;CAQe,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const shader = /* glsl */ `
|
|
2
|
+
vec3 cmykToRgb(vec4 cmyk) {
|
|
3
|
+
// cmyk in [0.0, 1.0]
|
|
4
|
+
float invK = 1.0 - cmyk.a;
|
|
5
|
+
|
|
6
|
+
return vec3(
|
|
7
|
+
(1.0 - cmyk.r) * invK,
|
|
8
|
+
(1.0 - cmyk.g) * invK,
|
|
9
|
+
(1.0 - cmyk.b) * invK
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
/**
|
|
14
|
+
* A shader module that injects a unorm texture and uses a sampler2D to assign
|
|
15
|
+
* to a color.
|
|
16
|
+
*/
|
|
17
|
+
export const CMYKToRGB = {
|
|
18
|
+
name: "cmyk-to-rgb",
|
|
19
|
+
inject: {
|
|
20
|
+
"fs:#decl": shader,
|
|
21
|
+
"fs:DECKGL_FILTER_COLOR": /* glsl */ `
|
|
22
|
+
color.rgb = cmykToRgb(color);
|
|
23
|
+
`,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=cmyk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmyk.js","sourceRoot":"","sources":["../../../src/gpu-modules/color/cmyk.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,UAAU,CAAC;;;;;;;;;;;CAWzB,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE;QACN,UAAU,EAAE,MAAM;QAClB,wBAAwB,EAAE,UAAU,CAAC;;KAEpC;KACF;CACkC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gpu-modules/color/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/gpu-modules/color/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A shader module that injects a unorm texture and uses a sampler2D to assign
|
|
3
|
+
* to a color.
|
|
4
|
+
*/
|
|
5
|
+
export declare const YCbCrToRGB: {
|
|
6
|
+
readonly name: "ycbcr-to-rgb";
|
|
7
|
+
readonly inject: {
|
|
8
|
+
readonly "fs:#decl": "\n vec3 ycbcrToRgb(vec3 ycbcr) {\n // ycbcr in [0.0, 1.0]\n float y = ycbcr.r;\n float cb = ycbcr.g - 0.5;\n float cr = ycbcr.b - 0.5;\n\n return vec3(\n y + 1.40200 * cr,\n y - 0.34414 * cb - 0.71414 * cr,\n y + 1.77200 * cb\n );\n }\n";
|
|
9
|
+
readonly "fs:DECKGL_FILTER_COLOR": "\n color.rgb = ycbcrToRgb(color.rgb);\n ";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=ycbcr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ycbcr.d.ts","sourceRoot":"","sources":["../../../src/gpu-modules/color/ycbcr.ts"],"names":[],"mappings":"AAiBA;;;GAGG;AACH,eAAO,MAAM,UAAU;;;;;;CAQc,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const shader = /* glsl */ `
|
|
2
|
+
vec3 ycbcrToRgb(vec3 ycbcr) {
|
|
3
|
+
// ycbcr in [0.0, 1.0]
|
|
4
|
+
float y = ycbcr.r;
|
|
5
|
+
float cb = ycbcr.g - 0.5;
|
|
6
|
+
float cr = ycbcr.b - 0.5;
|
|
7
|
+
|
|
8
|
+
return vec3(
|
|
9
|
+
y + 1.40200 * cr,
|
|
10
|
+
y - 0.34414 * cb - 0.71414 * cr,
|
|
11
|
+
y + 1.77200 * cb
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
/**
|
|
16
|
+
* A shader module that injects a unorm texture and uses a sampler2D to assign
|
|
17
|
+
* to a color.
|
|
18
|
+
*/
|
|
19
|
+
export const YCbCrToRGB = {
|
|
20
|
+
name: "ycbcr-to-rgb",
|
|
21
|
+
inject: {
|
|
22
|
+
"fs:#decl": shader,
|
|
23
|
+
"fs:DECKGL_FILTER_COLOR": /* glsl */ `
|
|
24
|
+
color.rgb = ycbcrToRgb(color.rgb);
|
|
25
|
+
`,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ycbcr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ycbcr.js","sourceRoot":"","sources":["../../../src/gpu-modules/color/ycbcr.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,UAAU,CAAC;;;;;;;;;;;;;CAazB,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE;QACN,UAAU,EAAE,MAAM;QAClB,wBAAwB,EAAE,UAAU,CAAC;;KAEpC;KACF;CACkC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Texture } from "@luma.gl/core";
|
|
2
|
+
export type ColormapProps = {
|
|
3
|
+
colormapTexture: Texture;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* A shader module that injects a unorm texture and uses a sampler2D to assign
|
|
7
|
+
* to a color.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Colormap: {
|
|
10
|
+
readonly name: "colormap";
|
|
11
|
+
readonly inject: {
|
|
12
|
+
readonly "fs:#decl": "uniform sampler2D colormapTexture;";
|
|
13
|
+
readonly "fs:DECKGL_FILTER_COLOR": "\n color = texture(colormapTexture, vec2(color.r, 0.));\n ";
|
|
14
|
+
};
|
|
15
|
+
readonly getUniforms: (props: Partial<ColormapProps>) => {
|
|
16
|
+
colormapTexture: Texture | undefined;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=colormap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colormap.d.ts","sourceRoot":"","sources":["../../src/gpu-modules/colormap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAI7C,MAAM,MAAM,aAAa,GAAG;IAC1B,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ;;;;;;kCAQE,OAAO,CAAC,aAAa,CAAC;;;CAKG,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A shader module that injects a unorm texture and uses a sampler2D to assign
|
|
3
|
+
* to a color.
|
|
4
|
+
*/
|
|
5
|
+
export const Colormap = {
|
|
6
|
+
name: "colormap",
|
|
7
|
+
inject: {
|
|
8
|
+
"fs:#decl": `uniform sampler2D colormapTexture;`,
|
|
9
|
+
"fs:DECKGL_FILTER_COLOR": /* glsl */ `
|
|
10
|
+
color = texture(colormapTexture, vec2(color.r, 0.));
|
|
11
|
+
`,
|
|
12
|
+
},
|
|
13
|
+
getUniforms: (props) => {
|
|
14
|
+
return {
|
|
15
|
+
colormapTexture: props.colormapTexture,
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=colormap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colormap.js","sourceRoot":"","sources":["../../src/gpu-modules/colormap.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE;QACN,UAAU,EAAE,oCAAoC;QAChD,wBAAwB,EAAE,UAAU,CAAC;;KAEpC;KACF;IACD,WAAW,EAAE,CAAC,KAA6B,EAAE,EAAE;QAC7C,OAAO;YACL,eAAe,EAAE,KAAK,CAAC,eAAe;SACvC,CAAC;IACJ,CAAC;CAC6C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Texture } from "@luma.gl/core";
|
|
2
|
+
export type CreateTextureProps = {
|
|
3
|
+
textureName: Texture;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* A shader module that injects a unorm texture and uses a sampler2D to assign
|
|
7
|
+
* to a color.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CreateTexture: {
|
|
10
|
+
readonly name: "create-texture-unorm";
|
|
11
|
+
readonly inject: {
|
|
12
|
+
readonly "fs:#decl": "uniform sampler2D textureName;";
|
|
13
|
+
readonly "fs:DECKGL_FILTER_COLOR": "\n color = texture(textureName, geometry.uv);\n ";
|
|
14
|
+
};
|
|
15
|
+
readonly getUniforms: (props: Partial<CreateTextureProps>) => {
|
|
16
|
+
textureName: Texture | undefined;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=create-texture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-texture.d.ts","sourceRoot":"","sources":["../../src/gpu-modules/create-texture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAI7C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;kCAQH,OAAO,CAAC,kBAAkB,CAAC;;;CAKG,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A shader module that injects a unorm texture and uses a sampler2D to assign
|
|
3
|
+
* to a color.
|
|
4
|
+
*/
|
|
5
|
+
export const CreateTexture = {
|
|
6
|
+
name: "create-texture-unorm",
|
|
7
|
+
inject: {
|
|
8
|
+
"fs:#decl": `uniform sampler2D textureName;`,
|
|
9
|
+
"fs:DECKGL_FILTER_COLOR": /* glsl */ `
|
|
10
|
+
color = texture(textureName, geometry.uv);
|
|
11
|
+
`,
|
|
12
|
+
},
|
|
13
|
+
getUniforms: (props) => {
|
|
14
|
+
return {
|
|
15
|
+
textureName: props.textureName,
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=create-texture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-texture.js","sourceRoot":"","sources":["../../src/gpu-modules/create-texture.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE;QACN,UAAU,EAAE,gCAAgC;QAC5C,wBAAwB,EAAE,UAAU,CAAC;;KAEpC;KACF;IACD,WAAW,EAAE,CAAC,KAAkC,EAAE,EAAE;QAClD,OAAO;YACL,WAAW,EAAE,KAAK,CAAC,WAAW;SAC/B,CAAC;IACJ,CAAC;CACkD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type FilterNoDataValProps = {
|
|
2
|
+
value: number;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* A shader module that filters out (discards) pixels whose value matches the
|
|
6
|
+
* provided nodata value.
|
|
7
|
+
*/
|
|
8
|
+
export declare const FilterNoDataVal: {
|
|
9
|
+
readonly name: "nodata";
|
|
10
|
+
readonly fs: "uniform nodataUniforms {\n float value;\n} nodata;\n";
|
|
11
|
+
readonly inject: {
|
|
12
|
+
readonly "fs:DECKGL_FILTER_COLOR": "\n if (color.r == nodata.value) {\n discard;\n }\n ";
|
|
13
|
+
};
|
|
14
|
+
readonly uniformTypes: {
|
|
15
|
+
readonly value: "f32";
|
|
16
|
+
};
|
|
17
|
+
readonly getUniforms: (props: Partial<FilterNoDataValProps>) => {
|
|
18
|
+
value: number | undefined;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=filter-nodata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-nodata.d.ts","sourceRoot":"","sources":["../../src/gpu-modules/filter-nodata.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAWF;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;kCAaL,OAAO,CAAC,oBAAoB,CAAC;;;CAKG,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** This module name must be consistent */
|
|
2
|
+
const MODULE_NAME = "nodata";
|
|
3
|
+
const uniformBlock = `\
|
|
4
|
+
uniform ${MODULE_NAME}Uniforms {
|
|
5
|
+
float value;
|
|
6
|
+
} ${MODULE_NAME};
|
|
7
|
+
`;
|
|
8
|
+
/**
|
|
9
|
+
* A shader module that filters out (discards) pixels whose value matches the
|
|
10
|
+
* provided nodata value.
|
|
11
|
+
*/
|
|
12
|
+
export const FilterNoDataVal = {
|
|
13
|
+
name: MODULE_NAME,
|
|
14
|
+
fs: uniformBlock,
|
|
15
|
+
inject: {
|
|
16
|
+
"fs:DECKGL_FILTER_COLOR": /* glsl */ `
|
|
17
|
+
if (color.r == nodata.value) {
|
|
18
|
+
discard;
|
|
19
|
+
}
|
|
20
|
+
`,
|
|
21
|
+
},
|
|
22
|
+
uniformTypes: {
|
|
23
|
+
value: "f32",
|
|
24
|
+
},
|
|
25
|
+
getUniforms: (props) => {
|
|
26
|
+
return {
|
|
27
|
+
value: props.value,
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=filter-nodata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-nodata.js","sourceRoot":"","sources":["../../src/gpu-modules/filter-nodata.ts"],"names":[],"mappings":"AAMA,0CAA0C;AAC1C,MAAM,WAAW,GAAG,QAAQ,CAAC;AAE7B,MAAM,YAAY,GAAG;UACX,WAAW;;IAEjB,WAAW;CACd,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,WAAW;IACjB,EAAE,EAAE,YAAY;IAChB,MAAM,EAAE;QACN,wBAAwB,EAAE,UAAU,CAAC;;;;KAIpC;KACF;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,KAAK;KACb;IACD,WAAW,EAAE,CAAC,KAAoC,EAAE,EAAE;QACpD,OAAO;YACL,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC;IACJ,CAAC;CACoD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { CMYKToRGB, cieLabToRGB, YCbCrToRGB } from "./color";
|
|
2
|
+
export { Colormap } from "./colormap";
|
|
3
|
+
export { CreateTexture } from "./create-texture";
|
|
4
|
+
export { FilterNoDataVal } from "./filter-nodata";
|
|
5
|
+
export type { RasterModule } from "./types";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gpu-modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gpu-modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Texture } from "@luma.gl/core";
|
|
2
|
+
import type { ShaderModule } from "@luma.gl/shadertools";
|
|
3
|
+
export type RasterModule<PropsT extends Record<string, number | Texture> = Record<string, number | Texture>> = {
|
|
4
|
+
module: ShaderModule<PropsT>;
|
|
5
|
+
props?: Partial<PropsT>;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/gpu-modules/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,MAAM,YAAY,CACtB,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,MAAM,CACtD,MAAM,EACN,MAAM,GAAG,OAAO,CACjB,IACC;IACF,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;CACzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/gpu-modules/types.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { RasterModule } from "./gpu-modules/types.js";
|
|
2
2
|
export type { RasterLayerProps } from "./raster-layer.js";
|
|
3
|
+
export { RasterLayer } from "./raster-layer.js";
|
|
3
4
|
export { RasterTileset2D } from "./raster-tileset/index.js";
|
|
4
5
|
export type { TileMatrix, TileMatrixSet, TileMatrixSetBoundingBox, } from "./raster-tileset/types.js";
|
|
5
6
|
export declare const __TEST_EXPORTS: {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,YAAY,EACV,UAAU,EACV,aAAa,EACb,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AAInC,eAAO,MAAM,cAAc;;;;;;;;;CAA8B,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAO5D,OAAO,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEnG,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,GAAG,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a vendored copy of the SimpleMeshLayer's fragment shader:
|
|
3
|
+
* https://github.com/visgl/deck.gl/blob/a15c8cea047993c8a861bf542835c1988f30165c/modules/mesh-layers/src/simple-mesh-layer/simple-mesh-layer-fragment.glsl.ts
|
|
4
|
+
* under the MIT license.
|
|
5
|
+
*
|
|
6
|
+
* We edited this to remove the hard-coded texture uniform because we want to
|
|
7
|
+
* support integer and signed integer textures, not only normalized unsigned
|
|
8
|
+
* textures.
|
|
9
|
+
*/
|
|
10
|
+
declare const _default: "#version 300 es\n#define SHADER_NAME simple-mesh-layer-fs\n\nprecision highp float;\n\nin vec2 vTexCoord;\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n geometry.uv = vTexCoord;\n\n vec3 normal;\n if (simpleMesh.flatShading) {\n\n normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n } else {\n normal = normals_commonspace;\n }\n\n // We initialize color here before passing into DECKGL_FILTER_COLOR\n vec4 color;\n DECKGL_FILTER_COLOR(color, geometry);\n\n vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n fragColor = vec4(lightColor, color.a * layer.opacity);\n}\n";
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=mesh-layer-fragment.glsl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mesh-layer-fragment.glsl.d.ts","sourceRoot":"","sources":["../../src/mesh-layer/mesh-layer-fragment.glsl.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;;AACH,wBA+BE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a vendored copy of the SimpleMeshLayer's fragment shader:
|
|
3
|
+
* https://github.com/visgl/deck.gl/blob/a15c8cea047993c8a861bf542835c1988f30165c/modules/mesh-layers/src/simple-mesh-layer/simple-mesh-layer-fragment.glsl.ts
|
|
4
|
+
* under the MIT license.
|
|
5
|
+
*
|
|
6
|
+
* We edited this to remove the hard-coded texture uniform because we want to
|
|
7
|
+
* support integer and signed integer textures, not only normalized unsigned
|
|
8
|
+
* textures.
|
|
9
|
+
*/
|
|
10
|
+
export default /* glsl */ `#version 300 es
|
|
11
|
+
#define SHADER_NAME simple-mesh-layer-fs
|
|
12
|
+
|
|
13
|
+
precision highp float;
|
|
14
|
+
|
|
15
|
+
in vec2 vTexCoord;
|
|
16
|
+
in vec3 cameraPosition;
|
|
17
|
+
in vec3 normals_commonspace;
|
|
18
|
+
in vec4 position_commonspace;
|
|
19
|
+
in vec4 vColor;
|
|
20
|
+
|
|
21
|
+
out vec4 fragColor;
|
|
22
|
+
|
|
23
|
+
void main(void) {
|
|
24
|
+
geometry.uv = vTexCoord;
|
|
25
|
+
|
|
26
|
+
vec3 normal;
|
|
27
|
+
if (simpleMesh.flatShading) {
|
|
28
|
+
|
|
29
|
+
normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));
|
|
30
|
+
} else {
|
|
31
|
+
normal = normals_commonspace;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// We initialize color here before passing into DECKGL_FILTER_COLOR
|
|
35
|
+
vec4 color;
|
|
36
|
+
DECKGL_FILTER_COLOR(color, geometry);
|
|
37
|
+
|
|
38
|
+
vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);
|
|
39
|
+
fragColor = vec4(lightColor, color.a * layer.opacity);
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
//# sourceMappingURL=mesh-layer-fragment.glsl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mesh-layer-fragment.glsl.js","sourceRoot":"","sources":["../../src/mesh-layer/mesh-layer-fragment.glsl.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAe,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BzB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SimpleMeshLayerProps } from "@deck.gl/mesh-layers";
|
|
2
|
+
import { SimpleMeshLayer } from "@deck.gl/mesh-layers";
|
|
3
|
+
import type { RasterModule } from "../gpu-modules/types.js";
|
|
4
|
+
export interface MeshTextureLayerProps extends SimpleMeshLayerProps {
|
|
5
|
+
renderPipeline: RasterModule[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A small subclass of the SimpleMeshLayer to allow dynamic shader injections.
|
|
9
|
+
*
|
|
10
|
+
* In the future this may expand to diverge more from the SimpleMeshLayer, such
|
|
11
|
+
* as allowing the texture to be a 2D _array_.
|
|
12
|
+
*/
|
|
13
|
+
export declare class MeshTextureLayer extends SimpleMeshLayer<null, MeshTextureLayerProps> {
|
|
14
|
+
static layerName: string;
|
|
15
|
+
static defaultProps: typeof SimpleMeshLayer.defaultProps;
|
|
16
|
+
getShaders(): any;
|
|
17
|
+
draw(opts: any): void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=mesh-layer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mesh-layer.d.ts","sourceRoot":"","sources":["../../src/mesh-layer/mesh-layer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG5D,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IACjE,cAAc,EAAE,YAAY,EAAE,CAAC;CAChC;AAED;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,eAAe,CACnD,IAAI,EACJ,qBAAqB,CACtB;IACC,OAAgB,SAAS,SAAwB;IACjD,OAAgB,YAAY,EAAE,OAAO,eAAe,CAAC,YAAY,CAClC;IAEtB,UAAU;IAiBV,IAAI,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI;CAa/B"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SimpleMeshLayer } from "@deck.gl/mesh-layers";
|
|
2
|
+
import fs from "./mesh-layer-fragment.glsl.js";
|
|
3
|
+
/**
|
|
4
|
+
* A small subclass of the SimpleMeshLayer to allow dynamic shader injections.
|
|
5
|
+
*
|
|
6
|
+
* In the future this may expand to diverge more from the SimpleMeshLayer, such
|
|
7
|
+
* as allowing the texture to be a 2D _array_.
|
|
8
|
+
*/
|
|
9
|
+
export class MeshTextureLayer extends SimpleMeshLayer {
|
|
10
|
+
static layerName = "mesh-texture-layer";
|
|
11
|
+
static defaultProps = SimpleMeshLayer.defaultProps;
|
|
12
|
+
getShaders() {
|
|
13
|
+
const upstreamShaders = super.getShaders();
|
|
14
|
+
const modules = upstreamShaders.modules;
|
|
15
|
+
for (const m of this.props.renderPipeline) {
|
|
16
|
+
modules.push(m.module);
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
...upstreamShaders,
|
|
20
|
+
// Override upstream's fragment shader with our copy with modified
|
|
21
|
+
// injection points
|
|
22
|
+
fs,
|
|
23
|
+
modules,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
draw(opts) {
|
|
27
|
+
const shaderProps = {};
|
|
28
|
+
for (const m of this.props.renderPipeline) {
|
|
29
|
+
// Props should be keyed by module name
|
|
30
|
+
shaderProps[m.module.name] = m.props || {};
|
|
31
|
+
}
|
|
32
|
+
for (const m of super.getModels()) {
|
|
33
|
+
m.shaderInputs.setProps(shaderProps);
|
|
34
|
+
}
|
|
35
|
+
super.draw(opts);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=mesh-layer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mesh-layer.js","sourceRoot":"","sources":["../../src/mesh-layer/mesh-layer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAM/C;;;;;GAKG;AACH,MAAM,OAAO,gBAAiB,SAAQ,eAGrC;IACC,MAAM,CAAU,SAAS,GAAG,oBAAoB,CAAC;IACjD,MAAM,CAAU,YAAY,GAC1B,eAAe,CAAC,YAAY,CAAC;IAEtB,UAAU;QACjB,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC;QAE3C,MAAM,OAAO,GAAmB,eAAe,CAAC,OAAO,CAAC;QACxD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;YAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC;QAED,OAAO;YACL,GAAG,eAAe;YAClB,kEAAkE;YAClE,mBAAmB;YACnB,EAAE;YACF,OAAO;SACR,CAAC;IACJ,CAAC;IAEQ,IAAI,CAAC,IAAS;QACrB,MAAM,WAAW,GAAsD,EAAE,CAAC;QAC1E,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;YAC1C,uCAAuC;YACvC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC7C,CAAC;QAED,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,SAAS,EAAE,EAAE,CAAC;YAClC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC"}
|
package/dist/raster-layer.d.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import type { CompositeLayerProps, Layer, UpdateParameters } from "@deck.gl/core";
|
|
2
2
|
import { CompositeLayer } from "@deck.gl/core";
|
|
3
|
-
import type { SimpleMeshLayerProps } from "@deck.gl/mesh-layers";
|
|
4
3
|
import type { ReprojectionFns } from "@developmentseed/raster-reproject";
|
|
5
4
|
import { RasterReprojector } from "@developmentseed/raster-reproject";
|
|
6
|
-
type
|
|
7
|
-
idx: number;
|
|
8
|
-
geom: number[][];
|
|
9
|
-
};
|
|
5
|
+
import type { RasterModule } from "./gpu-modules/types";
|
|
10
6
|
export interface RasterLayerProps extends CompositeLayerProps {
|
|
11
7
|
/**
|
|
12
8
|
* Width of the input raster image in pixels
|
|
@@ -21,17 +17,14 @@ export interface RasterLayerProps extends CompositeLayerProps {
|
|
|
21
17
|
*/
|
|
22
18
|
reprojectionFns: ReprojectionFns;
|
|
23
19
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* -
|
|
20
|
+
* Render pipeline for visualizing textures.
|
|
21
|
+
*
|
|
22
|
+
* Can be:
|
|
23
|
+
*
|
|
24
|
+
* - ImageData representing RGBA pixel data
|
|
25
|
+
* - Sequence of shader modules to be composed into a shader program
|
|
29
26
|
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Customize the [texture parameters](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texParameter).
|
|
33
|
-
*/
|
|
34
|
-
textureParameters?: SimpleMeshLayerProps["textureParameters"];
|
|
27
|
+
renderPipeline: ImageData | RasterModule[];
|
|
35
28
|
/**
|
|
36
29
|
* Maximum reprojection error in pixels for mesh refinement.
|
|
37
30
|
* Lower values create denser meshes with higher accuracy.
|
|
@@ -50,8 +43,8 @@ export interface RasterLayerProps extends CompositeLayerProps {
|
|
|
50
43
|
export declare class RasterLayer extends CompositeLayer<RasterLayerProps> {
|
|
51
44
|
static layerName: string;
|
|
52
45
|
static defaultProps: {
|
|
53
|
-
maxError: number;
|
|
54
46
|
debug: boolean;
|
|
47
|
+
debugOpacity: number;
|
|
55
48
|
};
|
|
56
49
|
state: {
|
|
57
50
|
reprojector?: RasterReprojector;
|
|
@@ -60,13 +53,13 @@ export declare class RasterLayer extends CompositeLayer<RasterLayerProps> {
|
|
|
60
53
|
indices: Uint32Array;
|
|
61
54
|
texCoords: Float32Array;
|
|
62
55
|
};
|
|
63
|
-
debugTriangles?: ParsedTriangle[];
|
|
64
56
|
};
|
|
65
57
|
initializeState(): void;
|
|
66
58
|
updateState(params: UpdateParameters<this>): void;
|
|
67
59
|
_generateMesh(): void;
|
|
68
|
-
|
|
60
|
+
renderDebugLayer(): Layer | null;
|
|
61
|
+
/** Create assembled render pipeline from the renderPipeline prop input. */
|
|
62
|
+
_createRenderPipeline(): RasterModule[];
|
|
69
63
|
renderLayers(): Layer<{}>[] | null;
|
|
70
64
|
}
|
|
71
|
-
export {};
|
|
72
65
|
//# sourceMappingURL=raster-layer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"raster-layer.d.ts","sourceRoot":"","sources":["../src/raster-layer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,KAAK,EACL,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"raster-layer.d.ts","sourceRoot":"","sources":["../src/raster-layer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,KAAK,EACL,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAmCxD,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,eAAe,EAAE,eAAe,CAAC;IAEjC;;;;;;;OAOG;IACH,cAAc,EAAE,SAAS,GAAG,YAAY,EAAE,CAAC;IAE3C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAOD;;;;;GAKG;AACH,qBAAa,WAAY,SAAQ,cAAc,CAAC,gBAAgB,CAAC;IAC/D,OAAgB,SAAS,SAAiB;IAC1C,OAAgB,YAAY;;;MAAgB;IAEpC,KAAK,EAAE;QACb,WAAW,CAAC,EAAE,iBAAiB,CAAC;QAChC,IAAI,CAAC,EAAE;YACL,SAAS,EAAE,YAAY,CAAC;YACxB,OAAO,EAAE,WAAW,CAAC;YACrB,SAAS,EAAE,YAAY,CAAC;SACzB,CAAC;KACH,CAAC;IAEO,eAAe,IAAI,IAAI;IAIvB,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAkBnD,aAAa,IAAI,IAAI;IAiCrB,gBAAgB,IAAI,KAAK,GAAG,IAAI;IA6DhC,2EAA2E;IAC3E,qBAAqB,IAAI,YAAY,EAAE;IAqBvC,YAAY;CAmDb"}
|