<sk-mesh-vertex-points-source>

← prev index next →

Places one clone at every vertex of a mesh — the way to snap copies of an object exactly onto another shape's points, so the clones trace that shape's wireframe geometry.

Remarks

This is a mesh-driven member of the points-source family (see ShaderFunctionPointsSource): a points-source defines the set of positions at which a sk-cloner places copies of its content, so it lives as a child of a <sk-cloner> and the cloner's other child is the template cloned at each point. Unlike the procedural sources — which compute their points from a formula — this one reads its positions from an existing sk-mesh (or any geometry primitive), one point per vertex, and uses each vertex normal to orient the clone. It follows the referenced mesh live: when the mesh regenerates, the clone set updates to match.

Key attributes. mesh references (by #id) the mesh whose vertices become the points; the referenced element is the geometry source, not something drawn at those points. deduplicate (on by default) merges vertices that share a position — meshes split a shared corner into several vertices with different normals to render hard edges, so without merging you would get several clones stacked at every such corner; the merged clone takes the averaged normal. Turn it off to place a clone at every raw vertex.

Related. To scatter clones across a mesh's surface (rather than exactly on its vertices), see sk-mesh-surface-points-source. For placements from an explicit buffer see sk-buffer-points-source; from the GPU see sk-compute-buffer-points-source and sk-custom-wgsl-points-source; from another cloner see sk-cloner-points-source. For built-in procedural shapes see sk-grid-points-source and sk-sphere-points-source. Its host is always a sk-cloner.

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.
meshrequiredanimatable <id-ref> The source mesh INSTANCE for the imperative path. reference by id
deduplicate <boolean> true Whether to deduplicate vertices that share the same position.