generateFindEdgeDistanceForShapes
generateFindEdgeDistanceForShapes(
shapes,shapeGlobalIds?):object
Defined in: packages/sigma/src/rendering/glsl.ts:226
Generates the findEdgeDistance(vec2 direction, float size) GLSL used to
place labels at a shape’s boundary, handling both single- and multi-shape
programs. For multi-shape it also emits queryShapeSDF and the
int g_shapeId; global the caller must set (from the node’s shape id).
The caller must include the shapes’ SDF functions (getShapeGLSLForShapes)
before the returned code. Shared by the label-background and attachment
shaders so they query the boundary exactly like the label program.
Parameters
Section titled “Parameters”shapes
Section titled “shapes”SDFShape[]
shapeGlobalIds?
Section titled “shapeGlobalIds?”number[]
Returns
Section titled “Returns”object
code:
string
multiShape
Section titled “multiShape”multiShape:
boolean