@webviz/subsurface-viewer 1.11.8 → 1.11.10
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/components/ColorLegend.d.ts +3 -3
- package/dist/components/ColorLegend.js.map +1 -1
- package/dist/components/ColorLegends.d.ts +2 -2
- package/dist/components/Map.d.ts +1 -7
- package/dist/components/Map.js.map +1 -1
- package/dist/layers/axes/box.fs.glsl.d.ts +1 -1
- package/dist/layers/axes/box.fs.glsl.js +3 -3
- package/dist/layers/axes/box.vs.glsl.d.ts +1 -1
- package/dist/layers/axes/box.vs.glsl.js +4 -0
- package/dist/layers/axes/box.vs.glsl.js.map +1 -1
- package/dist/layers/axes/boxLayer.d.ts +1 -2
- package/dist/layers/axes/boxLayer.js +4 -8
- package/dist/layers/axes/boxLayer.js.map +1 -1
- package/dist/layers/axes2d/axes2DLayer.js +13 -24
- package/dist/layers/axes2d/axes2DLayer.js.map +1 -1
- package/dist/layers/colormap/colormap.fs.glsl.d.ts +1 -1
- package/dist/layers/colormap/colormap.fs.glsl.js +4 -4
- package/dist/layers/colormap/colormapLayer.d.ts +4 -3
- package/dist/layers/colormap/colormapLayer.js +31 -50
- package/dist/layers/colormap/colormapLayer.js.map +1 -1
- package/dist/layers/drawing/drawingLayer.js.map +1 -1
- package/dist/layers/gpglLayers/typeDefs.d.ts +24 -0
- package/dist/layers/gpglLayers/typeDefs.js +3 -0
- package/dist/layers/gpglLayers/typeDefs.js.map +1 -0
- package/dist/layers/grid3d/cellProperty.fs.glsl.d.ts +1 -1
- package/dist/layers/grid3d/cellProperty.fs.glsl.js +13 -12
- package/dist/layers/grid3d/cellProperty.fs.glsl.js.map +1 -1
- package/dist/layers/grid3d/cellProperty.vs.glsl.d.ts +1 -1
- package/dist/layers/grid3d/cellProperty.vs.glsl.js +3 -2
- package/dist/layers/grid3d/cellProperty.vs.glsl.js.map +1 -1
- package/dist/layers/grid3d/grid3dLayer.d.ts +5 -4
- package/dist/layers/grid3d/grid3dLayer.js +7 -7
- package/dist/layers/grid3d/line.fs.glsl.d.ts +1 -1
- package/dist/layers/grid3d/line.fs.glsl.js +3 -1
- package/dist/layers/grid3d/line.fs.glsl.js.map +1 -1
- package/dist/layers/grid3d/line.vs.glsl.d.ts +1 -1
- package/dist/layers/grid3d/line.vs.glsl.js +4 -0
- package/dist/layers/grid3d/line.vs.glsl.js.map +1 -1
- package/dist/layers/grid3d/nodeProperty.fs.glsl.d.ts +1 -1
- package/dist/layers/grid3d/nodeProperty.fs.glsl.js +5 -4
- package/dist/layers/grid3d/nodeProperty.fs.glsl.js.map +1 -1
- package/dist/layers/grid3d/nodeProperty.vs.glsl.d.ts +1 -1
- package/dist/layers/grid3d/nodeProperty.vs.glsl.js +3 -2
- package/dist/layers/grid3d/nodeProperty.vs.glsl.js.map +1 -1
- package/dist/layers/grid3d/privateGrid3dLayer.d.ts +7 -25
- package/dist/layers/grid3d/privateGrid3dLayer.js +59 -97
- package/dist/layers/grid3d/privateGrid3dLayer.js.map +1 -1
- package/dist/layers/grid3d/typeDefs.d.ts +0 -6
- package/dist/layers/hillshading2d/hillshading2dLayer.js +10 -10
- package/dist/layers/map/line.fs.glsl.d.ts +1 -1
- package/dist/layers/map/line.fs.glsl.js +2 -1
- package/dist/layers/map/line.fs.glsl.js.map +1 -1
- package/dist/layers/map/line.vs.glsl.d.ts +1 -1
- package/dist/layers/map/line.vs.glsl.js +4 -0
- package/dist/layers/map/line.vs.glsl.js.map +1 -1
- package/dist/layers/map/map.fs.glsl.d.ts +1 -1
- package/dist/layers/map/map.fs.glsl.js +9 -11
- package/dist/layers/map/map.fs.glsl.js.map +1 -1
- package/dist/layers/map/map.vs.glsl.d.ts +1 -1
- package/dist/layers/map/map.vs.glsl.js +2 -4
- package/dist/layers/map/map.vs.glsl.js.map +1 -1
- package/dist/layers/map/mapLayer.d.ts +2 -1
- package/dist/layers/map/mapLayer.js +5 -62
- package/dist/layers/map/mapLayer.js.map +1 -1
- package/dist/layers/map/privateMapLayer.d.ts +7 -7
- package/dist/layers/map/privateMapLayer.js +46 -45
- package/dist/layers/map/privateMapLayer.js.map +1 -1
- package/dist/layers/northarrow/northArrow3DLayer.js +4 -8
- package/dist/layers/northarrow/northArrow3DLayer.js.map +1 -1
- package/dist/layers/northarrow/northarrow.fs.glsl.d.ts +1 -1
- package/dist/layers/northarrow/northarrow.fs.glsl.js +1 -1
- package/dist/layers/piechart/pieChartLayer.js +4 -7
- package/dist/layers/piechart/pieChartLayer.js.map +1 -1
- package/dist/layers/piechart/piechart.fs.glsl.d.ts +1 -1
- package/dist/layers/piechart/piechart.fs.glsl.js +1 -1
- package/dist/layers/points/point.vs.glsl.d.ts +1 -1
- package/dist/layers/points/point.vs.glsl.js +2 -2
- package/dist/layers/polylines/polyline.vs.glsl.d.ts +1 -1
- package/dist/layers/polylines/polyline.vs.glsl.js +1 -1
- package/dist/layers/polylines/polylinesLayer.js +1 -1
- package/dist/layers/polylines/polylinesLayer.js.map +1 -1
- package/dist/layers/selectable_geojson/selectableGeoJsonLayer.js.map +1 -1
- package/dist/layers/shader_modules/decoder.fs.glsl.d.ts +1 -1
- package/dist/layers/shader_modules/decoder.fs.glsl.js +4 -4
- package/dist/layers/triangle/line.fs.glsl.d.ts +1 -1
- package/dist/layers/triangle/line.fs.glsl.js +4 -1
- package/dist/layers/triangle/line.fs.glsl.js.map +1 -1
- package/dist/layers/triangle/line.vs.glsl.d.ts +1 -1
- package/dist/layers/triangle/line.vs.glsl.js +4 -1
- package/dist/layers/triangle/line.vs.glsl.js.map +1 -1
- package/dist/layers/triangle/privateTriangleLayer.d.ts +2 -3
- package/dist/layers/triangle/privateTriangleLayer.js +4 -12
- package/dist/layers/triangle/privateTriangleLayer.js.map +1 -1
- package/dist/layers/triangle/triangle.fs.glsl.d.ts +1 -1
- package/dist/layers/triangle/triangle.fs.glsl.js +5 -5
- package/dist/layers/triangle/triangle.vs.glsl.d.ts +1 -1
- package/dist/layers/triangle/triangle.vs.glsl.js +3 -5
- package/dist/layers/triangle/triangle.vs.glsl.js.map +1 -1
- package/dist/layers/triangle/triangleLayer.d.ts +2 -1
- package/dist/layers/triangle/triangleLayer.js.map +1 -1
- package/dist/layers/utils/colormapTools.d.ts +46 -0
- package/dist/layers/utils/colormapTools.js +79 -0
- package/dist/layers/utils/colormapTools.js.map +1 -0
- package/dist/layers/utils/layerTools.d.ts +9 -19
- package/dist/layers/utils/layerTools.js +0 -42
- package/dist/layers/utils/layerTools.js.map +1 -1
- package/dist/layers/well_markers/marker.fs.glsl.d.ts +1 -1
- package/dist/layers/well_markers/marker.fs.glsl.js +2 -2
- package/dist/layers/well_markers/marker.vs.glsl.d.ts +1 -1
- package/dist/layers/well_markers/marker.vs.glsl.js +3 -5
- package/dist/layers/well_markers/marker.vs.glsl.js.map +1 -1
- package/dist/layers/wells/wellsLayer.d.ts +2 -1
- package/dist/layers/wells/wellsLayer.js.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/serialize.d.ts +23 -0
- package/dist/utils/serialize.js +105 -0
- package/dist/utils/serialize.js.map +1 -0
- package/dist/utils/typedArray.d.ts +44 -0
- package/dist/utils/typedArray.js +42 -0
- package/dist/utils/typedArray.js.map +1 -0
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pieChartLayer.js","sourceRoot":"","sources":["../../../src/layers/piechart/pieChartLayer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,cAAc,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AAK,CAAC,CAAC,CAAC,CAAC;QACxB,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACxB,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAExB,MAAM,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QAE7C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAe,CAAC;QACpD,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QAChD,MAAM,gBAAgB,GAAuB,EAAE,CAAC;QAChD,gBAAgB,CAAC,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;QAE/D,uCACO,IAAI,KACP,UAAU,EAAE,gBAAgB,IAC9B;IACN,CAAC;CACJ;AAED,aAAa,CAAC,SAAS,GAAG,eAAe,CAAC;AAC1C,aAAa,CAAC,YAAY,GAAG,YAAY,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: "#version 300 es\n#define SHADER_NAME piechart-fragment-shader\n\nprecision highp float;\n\nflat in int pie_index_;\n\nout vec4 fragColor;\n\nin vec4 vColor;\n\nvoid main(void) {\n\n //Picking pass.\n if (picking.isActive > 0.5) {\n // Express triangle index in 255 system.\n float r = 0.0;\n float g = 0.0;\n float b = 0.0;\n \n int idx = pie_index_;\n \n if (idx >= (256 * 256) - 1) {\n r = floor(float(idx) / (256.0 * 256.0));\n idx -= int(r * (256.0 * 256.0));\n }\n \n if (idx >= 256 - 1) {\n g = floor(float(idx) / 256.0);\n idx -= int(g * 256.0);\n }\n \n b = float(idx);\n \n fragColor = vec4(r / 255.0, g / 255.0, b / 255.0,
|
1
|
+
declare const _default: "#version 300 es\n#define SHADER_NAME piechart-fragment-shader\n\nprecision highp float;\n\nflat in int pie_index_;\n\nout vec4 fragColor;\n\nin vec4 vColor;\n\nvoid main(void) {\n\n //Picking pass.\n if (picking.isActive > 0.5) {\n // Express triangle index in 255 system.\n float r = 0.0;\n float g = 0.0;\n float b = 0.0;\n \n int idx = pie_index_;\n \n if (idx >= (256 * 256) - 1) {\n r = floor(float(idx) / (256.0 * 256.0));\n idx -= int(r * (256.0 * 256.0));\n }\n \n if (idx >= 256 - 1) {\n g = floor(float(idx) / 256.0);\n idx -= int(g * 256.0);\n }\n \n b = float(idx);\n \n fragColor = vec4(r / 255.0, g / 255.0, b / 255.0, layer.opacity);\n return;\n }\n\n fragColor = vColor;\n}\n";
|
2
2
|
export default _default;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: "#version 300 es\n#define SHADER_NAME points-vertex-shader\n\nin vec3 positions;\n\nin vec3 instancePositions;\nin vec3 instancePositions64Low;\nin float instanceRadius;\nin float instanceLineWidths;\nin vec4 instanceFillColors;\nin vec4 instanceLineColors;\nin vec3 instancePickingColors;\n\nout vec4 vFillColor;\nout vec4 vLineColor;\nout vec2 unitPosition;\nout float innerUnitRadius;\nout float outerRadiusPixels;\n\n\nvoid main(void) {\n vec3 position = instancePositions;\n vec3 position64low = instancePositions64Low;\n\n if(points.ZIncreasingDownwards) {\n position.z *= -1.0;\n position64low.z *= -1.0;\n }\n geometry.worldPosition = position;\n\n // Multiply out radius and clamp to limits\n outerRadiusPixels = clamp(\n project_size_to_pixel(scatterplot.radiusScale * instanceRadius, scatterplot.radiusUnits),\n scatterplot.radiusMinPixels, scatterplot.radiusMaxPixels\n );\n \n // Multiply out line width and clamp to limits\n float lineWidthPixels = clamp(\n project_size_to_pixel(scatterplot.lineWidthScale * instanceLineWidths, scatterplot.lineWidthUnits),\n scatterplot.lineWidthMinPixels, scatterplot.lineWidthMaxPixels\n );\n\n // outer radius needs to offset by half stroke width\n outerRadiusPixels += scatterplot.stroked * lineWidthPixels / 2.0;\n\n // Expand geometry to accommodate edge smoothing\n float edgePadding = scatterplot.antialiasing ? (outerRadiusPixels + SMOOTH_EDGE_RADIUS) / outerRadiusPixels : 1.0;\n\n // position on the containing square in [-1, 1] space\n unitPosition = edgePadding * positions.xy;\n geometry.uv = unitPosition;\n geometry.pickingColor = instancePickingColors;\n\n innerUnitRadius = 1.0 - scatterplot.stroked * lineWidthPixels / outerRadiusPixels;\n \n if (scatterplot.billboard) {\n gl_Position = project_position_to_clipspace(position, position64low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n vec3 offset = edgePadding * positions * outerRadiusPixels;\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n } else {\n vec3 offset = edgePadding * positions * project_pixel_size(outerRadiusPixels);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position = project_position_to_clipspace(position, position64low, offset, geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n\n // Apply opacity to instance color, or return instance picking color\n vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * points.opacity);\n DECKGL_FILTER_COLOR(vFillColor, geometry);\n vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * points.opacity);\n DECKGL_FILTER_COLOR(vLineColor, geometry);\n}\n";
|
1
|
+
declare const _default: "#version 300 es\n#define SHADER_NAME points-vertex-shader\n\nin vec3 positions;\n\nin vec3 instancePositions;\nin vec3 instancePositions64Low;\nin float instanceRadius;\nin float instanceLineWidths;\nin vec4 instanceFillColors;\nin vec4 instanceLineColors;\nin vec3 instancePickingColors;\n\nout vec4 vFillColor;\nout vec4 vLineColor;\nout vec2 unitPosition;\nout float innerUnitRadius;\nout float outerRadiusPixels;\n\n\nvoid main(void) {\n vec3 position = instancePositions;\n vec3 position64low = instancePositions64Low;\n\n if(points.ZIncreasingDownwards) {\n position.z *= -1.0;\n position64low.z *= -1.0;\n }\n geometry.worldPosition = position;\n\n // Multiply out radius and clamp to limits\n outerRadiusPixels = clamp(\n project_size_to_pixel(scatterplot.radiusScale * instanceRadius, scatterplot.radiusUnits),\n scatterplot.radiusMinPixels, scatterplot.radiusMaxPixels\n );\n \n // Multiply out line width and clamp to limits\n float lineWidthPixels = clamp(\n project_size_to_pixel(scatterplot.lineWidthScale * instanceLineWidths, scatterplot.lineWidthUnits),\n scatterplot.lineWidthMinPixels, scatterplot.lineWidthMaxPixels\n );\n\n // outer radius needs to offset by half stroke width\n outerRadiusPixels += scatterplot.stroked * lineWidthPixels / 2.0;\n\n // Expand geometry to accommodate edge smoothing\n float edgePadding = scatterplot.antialiasing ? (outerRadiusPixels + SMOOTH_EDGE_RADIUS) / outerRadiusPixels : 1.0;\n\n // position on the containing square in [-1, 1] space\n unitPosition = edgePadding * positions.xy;\n geometry.uv = unitPosition;\n geometry.pickingColor = instancePickingColors;\n\n innerUnitRadius = 1.0 - scatterplot.stroked * lineWidthPixels / outerRadiusPixels;\n \n if (scatterplot.billboard) {\n gl_Position = project_position_to_clipspace(position, position64low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n vec3 offset = edgePadding * positions * outerRadiusPixels;\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n } else {\n vec3 offset = edgePadding * positions * project_pixel_size(outerRadiusPixels);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position = project_position_to_clipspace(position, position64low, offset, geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n\n // Apply opacity to instance color, or return instance picking color\n vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * points.opacity * layer.opacity);\n DECKGL_FILTER_COLOR(vFillColor, geometry);\n vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * points.opacity * layer.opacity);\n DECKGL_FILTER_COLOR(vLineColor, geometry);\n}\n";
|
2
2
|
export default _default;
|
@@ -87,9 +87,9 @@ void main(void) {
|
|
87
87
|
}
|
88
88
|
|
89
89
|
// Apply opacity to instance color, or return instance picking color
|
90
|
-
vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * points.opacity);
|
90
|
+
vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * points.opacity * layer.opacity);
|
91
91
|
DECKGL_FILTER_COLOR(vFillColor, geometry);
|
92
|
-
vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * points.opacity);
|
92
|
+
vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * points.opacity * layer.opacity);
|
93
93
|
DECKGL_FILTER_COLOR(vLineColor, geometry);
|
94
94
|
}
|
95
95
|
`;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: "#version 300 es\n#define SHADER_NAME polylines-vertex-shader\n\nin vec2 positions;\n\nin float instanceTypes;\nin vec3 instanceStartPositions;\nin vec3 instanceEndPositions;\nin vec3 instanceLeftPositions;\nin vec3 instanceRightPositions;\nin vec3 instanceLeftPositions64Low;\nin vec3 instanceStartPositions64Low;\nin vec3 instanceEndPositions64Low;\nin vec3 instanceRightPositions64Low;\nin float instanceStrokeWidths;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\n\nout vec4 vColor;\nout vec2 vCornerOffset;\nout float vMiterLength;\nout vec2 vPathPosition;\nout float vPathLength;\nout float vJointType;\n\nconst float EPSILON = 0.001;\nconst vec3 ZERO_OFFSET = vec3(0.0);\n\nfloat flipIfTrue(bool flag) {\n return -(float(flag) * 2. - 1.);\n}\n\n// calculate line join positions\nvec3 getLineJoinOffset(\n vec3 prevPoint, vec3 currPoint, vec3 nextPoint,\n vec2 width\n) {\n bool isEnd = positions.x > 0.0;\n // side of the segment - -1: left, 0: center, 1: right\n float sideOfPath = positions.y;\n float isJoint = float(sideOfPath == 0.0);\n\n vec3 deltaA3 = (currPoint - prevPoint);\n vec3 deltaB3 = (nextPoint - currPoint);\n\n mat3 rotationMatrix;\n bool needsRotation = !path.billboard && project_needs_rotation(currPoint, rotationMatrix);\n if (needsRotation) {\n deltaA3 = deltaA3 * rotationMatrix;\n deltaB3 = deltaB3 * rotationMatrix;\n }\n vec2 deltaA = deltaA3.xy / width;\n vec2 deltaB = deltaB3.xy / width;\n\n float lenA = length(deltaA);\n float lenB = length(deltaB);\n\n vec2 dirA = lenA > 0. ? normalize(deltaA) : vec2(0.0, 0.0);\n vec2 dirB = lenB > 0. ? normalize(deltaB) : vec2(0.0, 0.0);\n\n vec2 perpA = vec2(-dirA.y, dirA.x);\n vec2 perpB = vec2(-dirB.y, dirB.x);\n\n // tangent of the corner\n vec2 tangent = dirA + dirB;\n tangent = length(tangent) > 0. ? normalize(tangent) : perpA;\n // direction of the corner\n vec2 miterVec = vec2(-tangent.y, tangent.x);\n // direction of the segment\n vec2 dir = isEnd ? dirA : dirB;\n // direction of the extrusion\n vec2 perp = isEnd ? perpA : perpB;\n // length of the segment\n float L = isEnd ? lenA : lenB;\n\n // A = angle of the corner\n float sinHalfA = abs(dot(miterVec, perp));\n float cosHalfA = abs(dot(dirA, miterVec));\n\n // -1: right, 1: left\n float turnDirection = flipIfTrue(dirA.x * dirB.y >= dirA.y * dirB.x);\n\n // relative position to the corner:\n // -1: inside (smaller side of the angle)\n // 0: center\n // 1: outside (bigger side of the angle)\n float cornerPosition = sideOfPath * turnDirection;\n\n float miterSize = 1.0 / max(sinHalfA, EPSILON);\n // trim if inside corner extends further than the line segment\n miterSize = mix(\n min(miterSize, max(lenA, lenB) / max(cosHalfA, EPSILON)),\n miterSize,\n step(0.0, cornerPosition)\n );\n\n vec2 offsetVec = mix(miterVec * miterSize, perp, step(0.5, cornerPosition))\n * (sideOfPath + isJoint * turnDirection);\n\n // special treatment for start cap and end cap\n bool isStartCap = lenA == 0.0 || (!isEnd && (instanceTypes == 1.0 || instanceTypes == 3.0));\n bool isEndCap = lenB == 0.0 || (isEnd && (instanceTypes == 2.0 || instanceTypes == 3.0));\n bool isCap = isStartCap || isEndCap;\n\n // extend out a triangle to envelope the round cap\n if (isCap) {\n offsetVec = mix(perp * sideOfPath, dir * path.capType * 4.0 * flipIfTrue(isStartCap), isJoint);\n vJointType = path.capType;\n } else {\n vJointType = path.jointType;\n }\n\n // Generate variables for fragment shader\n vPathLength = L;\n vCornerOffset = offsetVec;\n vMiterLength = dot(vCornerOffset, miterVec * turnDirection);\n vMiterLength = isCap ? isJoint : vMiterLength;\n\n vec2 offsetFromStartOfPath = vCornerOffset + deltaA * float(isEnd);\n vPathPosition = vec2(\n dot(offsetFromStartOfPath, perp),\n dot(offsetFromStartOfPath, dir)\n );\n geometry.uv = vPathPosition;\n\n float isValid = step(instanceTypes, 3.5);\n vec3 offset = vec3(offsetVec * width * isValid, 0.0);\n\n if (needsRotation) {\n offset = rotationMatrix * offset;\n }\n return offset;\n}\n\n// In clipspace extrusion, if a line extends behind the camera, clip it to avoid visual artifacts\nvoid clipLine(inout vec4 position, vec4 refPosition) {\n if (position.w < EPSILON) {\n float r = (EPSILON - refPosition.w) / (position.w - refPosition.w);\n position = refPosition + (position - refPosition) * r;\n }\n}\n\nvoid main() {\n geometry.pickingColor = instancePickingColors;\n\n vColor = vec4(instanceColors.rgb, instanceColors.a * polylines.opacity);\n vec3 leftPosition = instanceLeftPositions;\n vec3 startPosition = instanceStartPositions;\n vec3 leftPos64Low = instanceLeftPositions64Low;\n vec3 startPos64Low = instanceStartPositions64Low;\n\n vec3 rightposition = instanceRightPositions;\n vec3 endPosition = instanceEndPositions;\n vec3 rightPos64Low = instanceRightPositions64Low;\n vec3 endPos64Low = instanceEndPositions64Low;\n\n if(polylines.ZIncreasingDownwards) {\n leftPosition.z *= -1.0;\n startPosition.z *= -1.0;\n leftPos64Low.z *= -1.0;\n startPos64Low.z *= -1.0;\n rightposition.z *= -1.0;\n endPosition.z *= -1.0;\n rightPos64Low.z *= -1.0;\n endPos64Low.z *= -1.0; \n }\n\n float isEnd = positions.x;\n\n vec3 prevPosition = mix(leftPosition, startPosition, isEnd);\n vec3 prevPosition64Low = mix(leftPos64Low, startPos64Low, isEnd);\n\n vec3 currPosition = mix(startPosition, endPosition, isEnd);\n vec3 currPosition64Low = mix(startPos64Low, endPos64Low, isEnd);\n\n vec3 nextPosition = mix(endPosition, rightposition, isEnd);\n vec3 nextPosition64Low = mix(endPos64Low, rightPos64Low, isEnd);\n\n geometry.worldPosition = currPosition;\n vec2 widthPixels = vec2(clamp(\n project_size_to_pixel(instanceStrokeWidths * path.widthScale, path.widthUnits),\n path.widthMinPixels, path.widthMaxPixels) / 2.0);\n vec3 width;\n\n if (path.billboard) {\n // Extrude in clipspace\n vec4 prevPositionScreen = project_position_to_clipspace(prevPosition, prevPosition64Low, ZERO_OFFSET);\n vec4 currPositionScreen = project_position_to_clipspace(currPosition, currPosition64Low, ZERO_OFFSET, geometry.position);\n vec4 nextPositionScreen = project_position_to_clipspace(nextPosition, nextPosition64Low, ZERO_OFFSET);\n\n clipLine(prevPositionScreen, currPositionScreen);\n clipLine(nextPositionScreen, currPositionScreen);\n clipLine(currPositionScreen, mix(nextPositionScreen, prevPositionScreen, isEnd));\n\n width = vec3(widthPixels, 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec3 offset = getLineJoinOffset(\n prevPositionScreen.xyz / prevPositionScreen.w,\n currPositionScreen.xyz / currPositionScreen.w,\n nextPositionScreen.xyz / nextPositionScreen.w,\n project_pixel_size_to_clipspace(width.xy)\n );\n\n DECKGL_FILTER_GL_POSITION(currPositionScreen, geometry);\n gl_Position = vec4(currPositionScreen.xyz + offset * currPositionScreen.w, currPositionScreen.w);\n } else {\n // Extrude in commonspace\n prevPosition = project_position(prevPosition, prevPosition64Low);\n currPosition = project_position(currPosition, currPosition64Low);\n nextPosition = project_position(nextPosition, nextPosition64Low);\n\n width = vec3(project_pixel_size(widthPixels), 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec3 offset = getLineJoinOffset(prevPosition, currPosition, nextPosition, width.xy);\n geometry.position = vec4(currPosition + offset, 1.0);\n gl_Position = project_common_position_to_clipspace(geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n";
|
1
|
+
declare const _default: "#version 300 es\n#define SHADER_NAME polylines-vertex-shader\n\nin vec2 positions;\n\nin float instanceTypes;\nin vec3 instanceStartPositions;\nin vec3 instanceEndPositions;\nin vec3 instanceLeftPositions;\nin vec3 instanceRightPositions;\nin vec3 instanceLeftPositions64Low;\nin vec3 instanceStartPositions64Low;\nin vec3 instanceEndPositions64Low;\nin vec3 instanceRightPositions64Low;\nin float instanceStrokeWidths;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\n\nout vec4 vColor;\nout vec2 vCornerOffset;\nout float vMiterLength;\nout vec2 vPathPosition;\nout float vPathLength;\nout float vJointType;\n\nconst float EPSILON = 0.001;\nconst vec3 ZERO_OFFSET = vec3(0.0);\n\nfloat flipIfTrue(bool flag) {\n return -(float(flag) * 2. - 1.);\n}\n\n// calculate line join positions\nvec3 getLineJoinOffset(\n vec3 prevPoint, vec3 currPoint, vec3 nextPoint,\n vec2 width\n) {\n bool isEnd = positions.x > 0.0;\n // side of the segment - -1: left, 0: center, 1: right\n float sideOfPath = positions.y;\n float isJoint = float(sideOfPath == 0.0);\n\n vec3 deltaA3 = (currPoint - prevPoint);\n vec3 deltaB3 = (nextPoint - currPoint);\n\n mat3 rotationMatrix;\n bool needsRotation = !path.billboard && project_needs_rotation(currPoint, rotationMatrix);\n if (needsRotation) {\n deltaA3 = deltaA3 * rotationMatrix;\n deltaB3 = deltaB3 * rotationMatrix;\n }\n vec2 deltaA = deltaA3.xy / width;\n vec2 deltaB = deltaB3.xy / width;\n\n float lenA = length(deltaA);\n float lenB = length(deltaB);\n\n vec2 dirA = lenA > 0. ? normalize(deltaA) : vec2(0.0, 0.0);\n vec2 dirB = lenB > 0. ? normalize(deltaB) : vec2(0.0, 0.0);\n\n vec2 perpA = vec2(-dirA.y, dirA.x);\n vec2 perpB = vec2(-dirB.y, dirB.x);\n\n // tangent of the corner\n vec2 tangent = dirA + dirB;\n tangent = length(tangent) > 0. ? normalize(tangent) : perpA;\n // direction of the corner\n vec2 miterVec = vec2(-tangent.y, tangent.x);\n // direction of the segment\n vec2 dir = isEnd ? dirA : dirB;\n // direction of the extrusion\n vec2 perp = isEnd ? perpA : perpB;\n // length of the segment\n float L = isEnd ? lenA : lenB;\n\n // A = angle of the corner\n float sinHalfA = abs(dot(miterVec, perp));\n float cosHalfA = abs(dot(dirA, miterVec));\n\n // -1: right, 1: left\n float turnDirection = flipIfTrue(dirA.x * dirB.y >= dirA.y * dirB.x);\n\n // relative position to the corner:\n // -1: inside (smaller side of the angle)\n // 0: center\n // 1: outside (bigger side of the angle)\n float cornerPosition = sideOfPath * turnDirection;\n\n float miterSize = 1.0 / max(sinHalfA, EPSILON);\n // trim if inside corner extends further than the line segment\n miterSize = mix(\n min(miterSize, max(lenA, lenB) / max(cosHalfA, EPSILON)),\n miterSize,\n step(0.0, cornerPosition)\n );\n\n vec2 offsetVec = mix(miterVec * miterSize, perp, step(0.5, cornerPosition))\n * (sideOfPath + isJoint * turnDirection);\n\n // special treatment for start cap and end cap\n bool isStartCap = lenA == 0.0 || (!isEnd && (instanceTypes == 1.0 || instanceTypes == 3.0));\n bool isEndCap = lenB == 0.0 || (isEnd && (instanceTypes == 2.0 || instanceTypes == 3.0));\n bool isCap = isStartCap || isEndCap;\n\n // extend out a triangle to envelope the round cap\n if (isCap) {\n offsetVec = mix(perp * sideOfPath, dir * path.capType * 4.0 * flipIfTrue(isStartCap), isJoint);\n vJointType = path.capType;\n } else {\n vJointType = path.jointType;\n }\n\n // Generate variables for fragment shader\n vPathLength = L;\n vCornerOffset = offsetVec;\n vMiterLength = dot(vCornerOffset, miterVec * turnDirection);\n vMiterLength = isCap ? isJoint : vMiterLength;\n\n vec2 offsetFromStartOfPath = vCornerOffset + deltaA * float(isEnd);\n vPathPosition = vec2(\n dot(offsetFromStartOfPath, perp),\n dot(offsetFromStartOfPath, dir)\n );\n geometry.uv = vPathPosition;\n\n float isValid = step(instanceTypes, 3.5);\n vec3 offset = vec3(offsetVec * width * isValid, 0.0);\n\n if (needsRotation) {\n offset = rotationMatrix * offset;\n }\n return offset;\n}\n\n// In clipspace extrusion, if a line extends behind the camera, clip it to avoid visual artifacts\nvoid clipLine(inout vec4 position, vec4 refPosition) {\n if (position.w < EPSILON) {\n float r = (EPSILON - refPosition.w) / (position.w - refPosition.w);\n position = refPosition + (position - refPosition) * r;\n }\n}\n\nvoid main() {\n geometry.pickingColor = instancePickingColors;\n\n vColor = vec4(instanceColors.rgb, instanceColors.a * polylines.opacity * layer.opacity);\n vec3 leftPosition = instanceLeftPositions;\n vec3 startPosition = instanceStartPositions;\n vec3 leftPos64Low = instanceLeftPositions64Low;\n vec3 startPos64Low = instanceStartPositions64Low;\n\n vec3 rightposition = instanceRightPositions;\n vec3 endPosition = instanceEndPositions;\n vec3 rightPos64Low = instanceRightPositions64Low;\n vec3 endPos64Low = instanceEndPositions64Low;\n\n if(polylines.ZIncreasingDownwards) {\n leftPosition.z *= -1.0;\n startPosition.z *= -1.0;\n leftPos64Low.z *= -1.0;\n startPos64Low.z *= -1.0;\n rightposition.z *= -1.0;\n endPosition.z *= -1.0;\n rightPos64Low.z *= -1.0;\n endPos64Low.z *= -1.0; \n }\n\n float isEnd = positions.x;\n\n vec3 prevPosition = mix(leftPosition, startPosition, isEnd);\n vec3 prevPosition64Low = mix(leftPos64Low, startPos64Low, isEnd);\n\n vec3 currPosition = mix(startPosition, endPosition, isEnd);\n vec3 currPosition64Low = mix(startPos64Low, endPos64Low, isEnd);\n\n vec3 nextPosition = mix(endPosition, rightposition, isEnd);\n vec3 nextPosition64Low = mix(endPos64Low, rightPos64Low, isEnd);\n\n geometry.worldPosition = currPosition;\n vec2 widthPixels = vec2(clamp(\n project_size_to_pixel(instanceStrokeWidths * path.widthScale, path.widthUnits),\n path.widthMinPixels, path.widthMaxPixels) / 2.0);\n vec3 width;\n\n if (path.billboard) {\n // Extrude in clipspace\n vec4 prevPositionScreen = project_position_to_clipspace(prevPosition, prevPosition64Low, ZERO_OFFSET);\n vec4 currPositionScreen = project_position_to_clipspace(currPosition, currPosition64Low, ZERO_OFFSET, geometry.position);\n vec4 nextPositionScreen = project_position_to_clipspace(nextPosition, nextPosition64Low, ZERO_OFFSET);\n\n clipLine(prevPositionScreen, currPositionScreen);\n clipLine(nextPositionScreen, currPositionScreen);\n clipLine(currPositionScreen, mix(nextPositionScreen, prevPositionScreen, isEnd));\n\n width = vec3(widthPixels, 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec3 offset = getLineJoinOffset(\n prevPositionScreen.xyz / prevPositionScreen.w,\n currPositionScreen.xyz / currPositionScreen.w,\n nextPositionScreen.xyz / nextPositionScreen.w,\n project_pixel_size_to_clipspace(width.xy)\n );\n\n DECKGL_FILTER_GL_POSITION(currPositionScreen, geometry);\n gl_Position = vec4(currPositionScreen.xyz + offset * currPositionScreen.w, currPositionScreen.w);\n } else {\n // Extrude in commonspace\n prevPosition = project_position(prevPosition, prevPosition64Low);\n currPosition = project_position(currPosition, currPosition64Low);\n nextPosition = project_position(nextPosition, nextPosition64Low);\n\n width = vec3(project_pixel_size(widthPixels), 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec3 offset = getLineJoinOffset(prevPosition, currPosition, nextPosition, width.xy);\n geometry.position = vec4(currPosition + offset, 1.0);\n gl_Position = project_common_position_to_clipspace(geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n";
|
2
2
|
export default _default;
|
@@ -163,7 +163,7 @@ void clipLine(inout vec4 position, vec4 refPosition) {
|
|
163
163
|
void main() {
|
164
164
|
geometry.pickingColor = instancePickingColors;
|
165
165
|
|
166
|
-
vColor = vec4(instanceColors.rgb, instanceColors.a * polylines.opacity);
|
166
|
+
vColor = vec4(instanceColors.rgb, instanceColors.a * polylines.opacity * layer.opacity);
|
167
167
|
vec3 leftPosition = instanceLeftPositions;
|
168
168
|
vec3 startPosition = instanceStartPositions;
|
169
169
|
vec3 leftPos64Low = instanceLeftPositions64Low;
|
@@ -88,7 +88,7 @@ export default class PolylinesLayer extends CompositeLayer {
|
|
88
88
|
}
|
89
89
|
loadData() {
|
90
90
|
// The input arrays can be used as deck.gl binary inputs.
|
91
|
-
// Explicit pathType prevents deck.gl from
|
91
|
+
// Explicit pathType prevents deck.gl from additional computations.
|
92
92
|
if (this.props.polylinePoints instanceof Float32Array &&
|
93
93
|
this.props.startIndices instanceof Uint32Array &&
|
94
94
|
!this.props.polylinesClosed) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"polylinesLayer.js","sourceRoot":"","sources":["../../../src/layers/polylines/polylinesLayer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAQjC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAwDhE,MAAM,YAAY,GAAG;IACjB,QAAQ,EAAE,gBAAgB;IAC1B,IAAI,EAAE,gBAAgB;IACtB,EAAE,EAAE,iBAAiB;IACrB,UAAU,EAAE,QAAQ;IACpB,UAAU,EAAE,CAAC;IACb,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC;IACvB,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,IAAI;IACf,oBAAoB,EAAE,IAAI;CAC7B,CAAC;AAcF,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,cAAmC;IAC3E,YAAY;QACR,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAoB,CAAC;QAC7D,MAAM,SAAS,GAAa,IAAI,CAAC,QAAoB,CAAC;QACtD,MAAM,KAAK,GAAG,IAAI,qBAAqB,CACnC,IA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AAM,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;IAEO,kBAAkB;QAItB,IAAI,IAAI,CAAC,KAAK,CAAC,eAAe,KAAK,IAAI,EAAE,CAAC;YACtC,OAAO;gBACH,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI;gBAChB,QAAQ,EAAE,MAAM;aACnB,CAAC;QACN,CAAC;QACD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,CAAC;YAC5C,OAAO;gBACH,IAAI,EAAE,CAAC,SAAiB,EAAE,EAAE;oBACxB,OAAQ,IAAI,CAAC,KAAK,CAAC,eAA6B,CAAC,SAAS,CAAC,CAAC;gBAChE,CAAC;gBACD,QAAQ,EAAE,IAAI;aACjB,CAAC;QACN,CAAC;QACD,OAAO;YACH,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,MAAM;SACnB,CAAC;IACN,CAAC;CACJ;AAED,cAAc,CAAC,SAAS,GAAG,gBAAgB,CAAC;AAC5C,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"selectableGeoJsonLayer.js","sourceRoot":"","sources":["../../../src/layers/selectable_geojson/selectableGeoJsonLayer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
1
|
+
{"version":3,"file":"selectableGeoJsonLayer.js","sourceRoot":"","sources":["../../../src/layers/selectable_geojson/selectableGeoJsonLayer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,YAAqB;IACrE,OAAO,CAAC,IAAiB;QACrB,+CAA+C;QAC/C,IAAI,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;YAC9C,OAAO,KAAK,CAAC;QACjB,CAAC;aAAM,CAAC;YACH,IAAI,CAAC,OAA8B,CAAC,QAAQ,CAAC,aAAa,CAAC;gBACxD,sBAAsB,EAAE,IAAI,CAAC,MAAM;aACtC,CAAC,CAAC;YACH,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;CACJ;AAED,sBAAsB,CAAC,SAAS,GAAG,wBAAwB,CAAC;AAC5D,sBAAsB,CAAC,YAAY,GAAG;IAClC,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;CACjB,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: "struct Decoder\n{\n vec3 rgbScaler; // r, g and b multipliers\n float floatScaler; // value multiplier\n float offset; // translation of the r, g, b sum\n float step; // discretize the value in a number of steps\n};\n\nuniform Decoder decoder;\n\nuniform float valueRangeMin;\nuniform float valueRangeMax;\nuniform float
|
1
|
+
declare const _default: "struct Decoder\n{\n vec3 rgbScaler; // r, g and b multipliers\n float floatScaler; // value multiplier\n float offset; // translation of the r, g, b sum\n float step; // discretize the value in a number of steps\n};\n\nuniform Decoder decoder;\n\nuniform float valueRangeMin;\nuniform float valueRangeMax;\nuniform float colormapRangeMin;\nuniform float colormapRangeMax;\n\n// Decode the RGB value using the decoder parameter.\nfloat decode_rgb2float(vec3 rgb, Decoder dec) {\n rgb *= dec.rgbScaler * vec3(16711680.0, 65280.0, 255.0); //255*256*256, 255*256, 255\n float value = (rgb.r + rgb.g + rgb.b + dec.offset) * dec.floatScaler;\n\n // Value must be in [0, 1] and step in (0, 1]\n value = floor(value / dec.step + 0.5) * dec.step;\n\n // If colormapRangeMin/Max specified, color map will span this interval.\n float x = value * (valueRangeMax - valueRangeMin) + valueRangeMin;\n x = (x - colormapRangeMin) / (colormapRangeMax - colormapRangeMin);\n x = max(0.0, x);\n x = min(1.0, x);\n\n return x;\n}\n\n// Decode the RGB value using the decoder uniform.\nfloat decode_rgb2float(vec3 rgb) {\n return decode_rgb2float(rgb, decoder);\n}\n";
|
2
2
|
export default _default;
|
@@ -11,8 +11,8 @@ uniform Decoder decoder;
|
|
11
11
|
|
12
12
|
uniform float valueRangeMin;
|
13
13
|
uniform float valueRangeMax;
|
14
|
-
uniform float
|
15
|
-
uniform float
|
14
|
+
uniform float colormapRangeMin;
|
15
|
+
uniform float colormapRangeMax;
|
16
16
|
|
17
17
|
// Decode the RGB value using the decoder parameter.
|
18
18
|
float decode_rgb2float(vec3 rgb, Decoder dec) {
|
@@ -22,9 +22,9 @@ float decode_rgb2float(vec3 rgb, Decoder dec) {
|
|
22
22
|
// Value must be in [0, 1] and step in (0, 1]
|
23
23
|
value = floor(value / dec.step + 0.5) * dec.step;
|
24
24
|
|
25
|
-
// If
|
25
|
+
// If colormapRangeMin/Max specified, color map will span this interval.
|
26
26
|
float x = value * (valueRangeMax - valueRangeMin) + valueRangeMin;
|
27
|
-
x = (x -
|
27
|
+
x = (x - colormapRangeMin) / (colormapRangeMax - colormapRangeMin);
|
28
28
|
x = max(0.0, x);
|
29
29
|
x = min(1.0, x);
|
30
30
|
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: "#version 300 es\n#define SHADER_NAME triangle-lines-fragment-shader\n\nprecision highp float;\n\nout vec4 fragColor;\n\nvoid main(void) {\n\n // Picking pass.\n if (picking.isActive > 0.5) {\n discard;\n return;\n }\n\n fragColor =
|
1
|
+
declare const _default: "#version 300 es\n#define SHADER_NAME triangle-lines-fragment-shader\n\nprecision highp float;\n\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n\n // Picking pass.\n if (picking.isActive > 0.5) {\n discard;\n return;\n }\n\n fragColor = vColor;\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n";
|
2
2
|
export default _default;
|
@@ -4,6 +4,8 @@ export default `\
|
|
4
4
|
|
5
5
|
precision highp float;
|
6
6
|
|
7
|
+
in vec4 vColor;
|
8
|
+
|
7
9
|
out vec4 fragColor;
|
8
10
|
|
9
11
|
void main(void) {
|
@@ -14,7 +16,8 @@ void main(void) {
|
|
14
16
|
return;
|
15
17
|
}
|
16
18
|
|
17
|
-
fragColor =
|
19
|
+
fragColor = vColor;
|
20
|
+
DECKGL_FILTER_COLOR(fragColor, geometry);
|
18
21
|
}
|
19
22
|
`;
|
20
23
|
//# sourceMappingURL=line.fs.glsl.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"line.fs.glsl.js","sourceRoot":"","sources":["../../../src/layers/triangle/line.fs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe
|
1
|
+
{"version":3,"file":"line.fs.glsl.js","sourceRoot":"","sources":["../../../src/layers/triangle/line.fs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;CAqBd,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: "#version 300 es\n#define SHADER_NAME triangle-lines-vertex-shader\n\nprecision highp float;\n\nin vec3 positions;\n\nout vec4
|
1
|
+
declare const _default: "#version 300 es\n#define SHADER_NAME triangle-lines-vertex-shader\n\nprecision highp float;\n\nin vec3 positions;\n\nout vec4 vColor;\n\nvoid main(void) {\n vec3 position = positions;\n position[2] *= triangleMesh.ZIncreasingDownwards ? -1.0 : 1.0;\n\n vec3 position_commonspace = project_position(position);\n gl_Position = project_common_position_to_clipspace(vec4(position_commonspace, 0.0));\n\n vColor = vec4(0.0, 0.0, 0.0, layer.opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n";
|
2
2
|
export default _default;
|
@@ -6,7 +6,7 @@ precision highp float;
|
|
6
6
|
|
7
7
|
in vec3 positions;
|
8
8
|
|
9
|
-
out vec4
|
9
|
+
out vec4 vColor;
|
10
10
|
|
11
11
|
void main(void) {
|
12
12
|
vec3 position = positions;
|
@@ -14,6 +14,9 @@ void main(void) {
|
|
14
14
|
|
15
15
|
vec3 position_commonspace = project_position(position);
|
16
16
|
gl_Position = project_common_position_to_clipspace(vec4(position_commonspace, 0.0));
|
17
|
+
|
18
|
+
vColor = vec4(0.0, 0.0, 0.0, layer.opacity);
|
19
|
+
DECKGL_FILTER_COLOR(vColor, geometry);
|
17
20
|
}
|
18
21
|
`;
|
19
22
|
//# sourceMappingURL=line.vs.glsl.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"line.vs.glsl.js","sourceRoot":"","sources":["../../../src/layers/triangle/line.vs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe
|
1
|
+
{"version":3,"file":"line.vs.glsl.js","sourceRoot":"","sources":["../../../src/layers/triangle/line.vs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe;;;;;;;;;;;;;;;;;;;;CAoBd,CAAC"}
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import type { PickingInfo, UpdateParameters } from "@deck.gl/core";
|
2
2
|
import { Layer } from "@deck.gl/core";
|
3
|
+
import type { Device } from "@luma.gl/core";
|
3
4
|
import type { GeometryProps } from "@luma.gl/engine";
|
4
5
|
import { Model } from "@luma.gl/engine";
|
5
|
-
import type {
|
6
|
-
import type { DeckGLLayerContext } from "../../components/Map";
|
7
|
-
import type { ExtendedLayerProps, LayerPickInfo } from "../utils/layerTools";
|
6
|
+
import type { DeckGLLayerContext, ExtendedLayerProps, LayerPickInfo } from "../utils/layerTools";
|
8
7
|
export type GeometryTriangles = {
|
9
8
|
topology: GeometryProps["topology"];
|
10
9
|
attributes: {
|
@@ -46,12 +46,9 @@ export default class PrivateTriangleLayer extends Layer {
|
|
46
46
|
this.initializeState(context);
|
47
47
|
}
|
48
48
|
_getModels(device) {
|
49
|
-
const triangleModel = new Model(device, {
|
50
|
-
id: `${this.props.id}-mesh`,
|
49
|
+
const triangleModel = new Model(device, Object.assign(Object.assign({ id: `${this.props.id}-mesh` }, super.getShaders({
|
51
50
|
vs: vsShader,
|
52
51
|
fs: fsShader,
|
53
|
-
bufferLayout: this.getAttributeManager().getBufferLayouts(),
|
54
|
-
geometry: new Geometry(this.props.geometryTriangles),
|
55
52
|
modules: [
|
56
53
|
project32,
|
57
54
|
picking,
|
@@ -59,17 +56,12 @@ export default class PrivateTriangleLayer extends Layer {
|
|
59
56
|
phongMaterial,
|
60
57
|
trianglesUniforms,
|
61
58
|
],
|
62
|
-
|
63
|
-
}
|
64
|
-
const lineModel = new Model(device, {
|
65
|
-
id: `${this.props.id}-lines`,
|
59
|
+
})), { bufferLayout: this.getAttributeManager().getBufferLayouts(), geometry: new Geometry(this.props.geometryTriangles), isInstanced: false }));
|
60
|
+
const lineModel = new Model(device, Object.assign(Object.assign({ id: `${this.props.id}-lines` }, super.getShaders({
|
66
61
|
vs: vsLineShader,
|
67
62
|
fs: fsLineShader,
|
68
|
-
bufferLayout: this.getAttributeManager().getBufferLayouts(),
|
69
|
-
geometry: new Geometry(this.props.geometryLines),
|
70
63
|
modules: [project32, picking, triangleMeshUniforms],
|
71
|
-
|
72
|
-
});
|
64
|
+
})), { bufferLayout: this.getAttributeManager().getBufferLayouts(), geometry: new Geometry(this.props.geometryLines), isInstanced: false }));
|
73
65
|
return [triangleModel, lineModel];
|
74
66
|
}
|
75
67
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"privateTriangleLayer.js","sourceRoot":"","sources":["../../../src/layers/triangle/privateTriangleLayer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE7E,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"privateTriangleLayer.js","sourceRoot":"","sources":["../../../src/layers/triangle/privateTriangleLayer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE7E,OAAO,E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E;AAClE,MAAM,iBAAiB,GAAG;IACtB,IAAI,EAAE,WAAW;IACjB,EAAE,EAAE,qBAAqB;IACzB,EAAE,EAAE,qBAAqB;IACzB,YAAY,EAAE;QACV,eAAe,EAAE,KAAK;QACtB,qBAAqB,EAAE,KAAK;QAC5B,eAAe,EAAE,KAAK;QACtB,MAAM,EAAE,WAAW;QACnB,aAAa,EAAE,KAAK;QACpB,oBAAoB,EAAE,KAAK;KAC9B;CAC8D,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: "#version 300 es\n#define SHADER_NAME triangle-fragment-shader\n\nprecision highp float;\n\nin
|
1
|
+
declare const _default: "#version 300 es\n#define SHADER_NAME triangle-fragment-shader\n\nprecision highp float;\n\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec3 worldPos;\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n vec3 normal = normals_commonspace;\n\n if (!triangles.smoothShading) {\n normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n }\n\n vec4 color = vColor;\n \n bool is_contours = triangles.contourReferencePoint != -1.0 && triangles.contourInterval != -1.0;\n if (is_contours) {\n // Contours are made of either depths or properties.\n float val = (abs(worldPos.z) - triangles.contourReferencePoint) / triangles.contourInterval;\n\n float f = fract(val);\n float df = fwidth(val);\n\n // keep: float c = smoothstep(df * 1.0, df * 2.0, f); // smoothstep from/to no of pixels distance from contour line.\n float c = smoothstep(0.0, df * 2.0, f);\n\n color = color * vec4(c, c, c, 1.0);\n }\n\n // Use two sided phong lighting. This has no effect if \"material\" property is not set.\n vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n fragColor = vec4(lightColor, vColor.a);\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n";
|
2
2
|
export default _default;
|
@@ -3,12 +3,11 @@ export default `#version 300 es
|
|
3
3
|
|
4
4
|
precision highp float;
|
5
5
|
|
6
|
-
in vec2 vTexCoord;
|
7
6
|
in vec3 cameraPosition;
|
8
7
|
in vec3 normals_commonspace;
|
9
8
|
in vec4 position_commonspace;
|
10
9
|
in vec3 worldPos;
|
11
|
-
in
|
10
|
+
in vec4 vColor;
|
12
11
|
|
13
12
|
out vec4 fragColor;
|
14
13
|
|
@@ -17,9 +16,10 @@ void main(void) {
|
|
17
16
|
|
18
17
|
if (!triangles.smoothShading) {
|
19
18
|
normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));
|
20
|
-
}
|
19
|
+
}
|
21
20
|
|
22
|
-
vec4 color =
|
21
|
+
vec4 color = vColor;
|
22
|
+
|
23
23
|
bool is_contours = triangles.contourReferencePoint != -1.0 && triangles.contourInterval != -1.0;
|
24
24
|
if (is_contours) {
|
25
25
|
// Contours are made of either depths or properties.
|
@@ -36,7 +36,7 @@ void main(void) {
|
|
36
36
|
|
37
37
|
// Use two sided phong lighting. This has no effect if "material" property is not set.
|
38
38
|
vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);
|
39
|
-
fragColor = vec4(lightColor,
|
39
|
+
fragColor = vec4(lightColor, vColor.a);
|
40
40
|
DECKGL_FILTER_COLOR(fragColor, geometry);
|
41
41
|
}
|
42
42
|
`;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: "#version 300 es\n#define SHADER_NAME triangle-vertex-shader\n\nprecision highp float;\n\n// Primitive attributes\nin vec3 positions;\nin float properties;\nin vec3 normals;\n\n// Outputs to fragment shader\nout vec3 cameraPosition;\nout vec3 normals_commonspace;\nout vec4 position_commonspace;\nout
|
1
|
+
declare const _default: "#version 300 es\n#define SHADER_NAME triangle-vertex-shader\n\nprecision highp float;\n\n// Primitive attributes\nin vec3 positions;\nin float properties;\nin vec3 normals;\n\n// Outputs to fragment shader\nout vec3 cameraPosition;\nout vec3 normals_commonspace;\nout vec4 position_commonspace;\nout vec4 vColor;\nout vec3 worldPos;\n\nconst vec3 pickingColor = vec3(1.0, 1.0, 0.0);\n\nvoid main(void) {\n geometry.pickingColor = pickingColor;\n\n cameraPosition = project.cameraPosition;\n\n vec3 position = positions;\n position[2] *= triangles.ZIncreasingDownwards ? -1.0 : 1.0;\n\n worldPos = position;\n\n normals_commonspace = normals;\n\n position_commonspace = vec4(project_position(position), 0.0);\n gl_Position = project_common_position_to_clipspace(position_commonspace);\n\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n vColor = vec4(triangles.uColor.rgb, triangles.uColor.a * layer.opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n";
|
2
2
|
export default _default;
|
@@ -13,8 +13,8 @@ in vec3 normals;
|
|
13
13
|
out vec3 cameraPosition;
|
14
14
|
out vec3 normals_commonspace;
|
15
15
|
out vec4 position_commonspace;
|
16
|
+
out vec4 vColor;
|
16
17
|
out vec3 worldPos;
|
17
|
-
out float property;
|
18
18
|
|
19
19
|
const vec3 pickingColor = vec3(1.0, 1.0, 0.0);
|
20
20
|
|
@@ -30,15 +30,13 @@ void main(void) {
|
|
30
30
|
|
31
31
|
normals_commonspace = normals;
|
32
32
|
|
33
|
-
property = properties;
|
34
|
-
|
35
33
|
position_commonspace = vec4(project_position(position), 0.0);
|
36
34
|
gl_Position = project_common_position_to_clipspace(position_commonspace);
|
37
35
|
|
38
36
|
DECKGL_FILTER_GL_POSITION(gl_Position, geometry);
|
39
37
|
|
40
|
-
|
41
|
-
DECKGL_FILTER_COLOR(
|
38
|
+
vColor = vec4(triangles.uColor.rgb, triangles.uColor.a * layer.opacity);
|
39
|
+
DECKGL_FILTER_COLOR(vColor, geometry);
|
42
40
|
}
|
43
41
|
`;
|
44
42
|
//# sourceMappingURL=triangle.vs.glsl.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"triangle.vs.glsl.js","sourceRoot":"","sources":["../../../src/layers/triangle/triangle.vs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe
|
1
|
+
{"version":3,"file":"triangle.vs.glsl.js","sourceRoot":"","sources":["../../../src/layers/triangle/triangle.vs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCd,CAAC"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type React from "react";
|
2
|
-
import type {
|
2
|
+
import type { UpdateParameters } from "@deck.gl/core";
|
3
3
|
import { CompositeLayer } from "@deck.gl/core";
|
4
|
+
import type { Material } from "../gpglLayers/typeDefs";
|
4
5
|
import type { ExtendedLayerProps, ReportBoundingBoxAction } from "../utils/layerTools";
|
5
6
|
import PrivateTriangleLayer from "./privateTriangleLayer";
|
6
7
|
export type Params = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"triangleLayer.js","sourceRoot":"","sources":["../../../src/layers/triangle/triangleLayer.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAIjC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,UAAU,MAAM,YAAY,CAAC;
|
1
|
+
{"version":3,"file":"triangleLayer.js","sourceRoot":"","sources":["../../../src/layers/triangle/triangleLayer.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAIjC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,UAAU,MAAM,YAAY,CAAC;AAOpC,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,MAAM,MAAM,6BAA6B,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AASrD,kBAAkB;AAClB,MAAM,gBAAgB,GAAG,UAAU,CAC/B,MAAM,EACN,mBAAmB,EACnB,uCAAuC,CAC1C,CAAC;AAEF,MAAM,IAAI,GAAG,UAA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AAc;SACjB,CAAC,CACL,CAAC;QACF,OAAO,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;CACJ;AAED,aAAa,CAAC,SAAS,GAAG,eAAe,CAAC;AAC1C,aAAa,CAAC,YAAY,GAAG,YAAY,CAAC"}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import type { Texture } from "@luma.gl/core";
|
2
|
+
import type { colorTablesArray, createColorMapFunction as createColormapFunction } from "@emerson-eps/color-tables/";
|
3
|
+
import type { DeckGLLayerContext } from "./layerTools";
|
4
|
+
/** Type of functions returning a color from a value in the [0,1] range. */
|
5
|
+
export type ColorMapFunctionType = ReturnType<typeof createColormapFunction>;
|
6
|
+
/** @deprecated Use ColorMapFunctionType instead. */
|
7
|
+
export type colorMapFunctionType = ColorMapFunctionType;
|
8
|
+
export interface IColormapHints {
|
9
|
+
discreteData: boolean;
|
10
|
+
colormapSize: number;
|
11
|
+
}
|
12
|
+
/**
|
13
|
+
* Colormap definition, taken from the application color tables,
|
14
|
+
* used for mapping data values to colors.
|
15
|
+
*
|
16
|
+
* @property colormapName - The name of the colormap.
|
17
|
+
*/
|
18
|
+
export interface ColorTableProps {
|
19
|
+
colormapName: string;
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* Colormap definition used for mapping data values to colors.
|
23
|
+
*
|
24
|
+
* @property colorTables - An array or collection of color tables from which to select the colormap.
|
25
|
+
*/
|
26
|
+
export interface ColorTableDef extends ColorTableProps {
|
27
|
+
colorTables: colorTablesArray;
|
28
|
+
}
|
29
|
+
export type ColormapProps = ColorMapFunctionType | Uint8Array | ColorTableProps;
|
30
|
+
/**
|
31
|
+
* Represents the possible types that can be used as colormap properties.
|
32
|
+
*
|
33
|
+
* - `ColorMapFunctionType`: A function converting a value to a color.
|
34
|
+
* - `Uint8Array`: A typed array containing color data.
|
35
|
+
* - `ColorTableDef`: An object representing a color table.
|
36
|
+
*/
|
37
|
+
export type TColormapDef = ColorMapFunctionType | Uint8Array | ColorTableDef;
|
38
|
+
/**
|
39
|
+
* Creates an array of colors as RGB triplets in range [0, 1] using the colormap definition.
|
40
|
+
* @param colormapDef Definition of the colormap.
|
41
|
+
* @param colormapSize Number of colors in the color map.
|
42
|
+
* @param discreteColormapFunction If true, the color map function is targeting indices ranging from 0 to colormapSize.
|
43
|
+
* @returns Array of colors.
|
44
|
+
*/
|
45
|
+
export declare function getImageData(colormapDef: TColormapDef, colormapSize?: number, discreteColormapFunction?: boolean): Uint8Array;
|
46
|
+
export declare function createColormapTexture(colormap: TColormapDef, context: DeckGLLayerContext, colormapHints: IColormapHints): Texture;
|