<sk-buffer-points-source>

← prev index next →

Places clones at an explicit list of transforms you supply — the way to array copies at hand-authored or externally computed positions when no procedural shape fits.

Remarks

This is the raw data-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. Where the procedural sources generate their points from a formula, this one takes them verbatim from a buffer of placement matrices you provide — one 4×4 matrix per clone, carrying its full position, rotation, and scale — which is the escape hatch for imported layouts or CPU-generated distributions that no built-in shape captures.

Key attributes. local-matrices is the placement buffer: a list of column-major mat4x4 frames (16 numbers each), one per clone, given as an array of 16-number arrays. Each matrix's translation column positions that clone; its upper-left basis orients and scales it (an identity basis with a position in the last column places a clone with no rotation). The clone count is simply the number of matrices supplied.

Related. For placements generated on the GPU instead of authored, see sk-compute-buffer-points-source and sk-custom-wgsl-points-source; for placements taken from a mesh see sk-mesh-vertex-points-source and sk-mesh-surface-points-source; for another cloner's output 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
local-matricesrequired <matrix3d-list> (<matrix3d>[,<matrix3d>]*) The per-element local matrices: a flat Float32Array of column-major