<sk-edge-paint>

← prev index next →

Draws a mesh's edges as a wireframe in a material — the way to reveal an object's structure as clean lines, on its own or laid over a filled surface.

Remarks

This is the edge member of the Paint family: like every paint it applies a material to one part of a node's geometry; here that part is the mesh edges, rendered as a wireframe. Edges composite with the node's surface paints in document order (source-over): an edge paint declared after a surface paint renders above it, one declared before renders below — there is no depth-bias separation, so ordering is how you control which shows on top.

Key attributes. material (inherited from Paint) references the material to draw the wireframe with, by id. show toggles the wireframe on and off (default true), so it can be hidden without removing the paint. Beyond those, the visual result is governed by that material and by paint order relative to the node's other paints.

Related. Its sibling paints cover the other parts of the geometry: sk-surface-paint (filled faces) and sk-stroke-paint (spline strokes); stack several on one node in document order to combine fill and wireframe. The material it applies is a sk-plain-material.

Serve these docs to run the live example. WebGPU needs a secure context — open this page via grunt serve rather than double-clicking the file. The Markup tab works from disk.

Attributes

AttributeTypeDefaultDescription
id <id> The element's unique identifier — the standard HTML global id attribute.
materialanimatable <id-ref> Gets the material this paint applies. reference by id
show <boolean> true Whether edges are visible.

Children

Optional spatial-field children modulating per-pixel edge coverage.