<sk-plane-points-source>

← prev index next →

Scatters clones over a rectangular flat panel — the way to array copies in an even grid across a plane, for a field, a floor, or a wall of instances.

Remarks

This is the flat-panel member of the points-source family: 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 that gets cloned at each point. Because the positions are generated procedurally in the shader (see ShaderFunctionPointsSource), a million-point field costs the same handful of parameters as a small one.

Key attributes. width and height set the panel's two in-plane extents, each spanning symmetrically about the centre. width-segments and height-segments set how finely each axis is subdivided (points land on the cell grid, so more segments mean a denser field). orientation is the axis the panel faces — the axis perpendicular to its plane, one of +x, -x, +y, -y, +z, -z — so +y lays it flat like a floor and +z stands it up like a wall. center offsets the panel from the origin.

Related. For a circular patch use sk-disc-points-source; for a filled 3D volume use sk-grid-points-source, and for the full six-sided shell of a box use sk-cube-points-source. To scatter over an arbitrary object's surface rather than an analytic plane, see sk-mesh-surface-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
width <number> 1.0 Width of the plane along the first in-plane axis (extends from -width/2 to +width/2).
height <number> 1.0 Height of the plane along the second in-plane axis (extends from -height/2 to +height/2).
width-segments <number> 1 Number of segments along the width axis.
height-segments <number> 1 Number of segments along the height axis.
orientationanimatable <orientation-axis> ("+x" | "-x" | "+y" | "-y" | "+z" | "-z") "+y" Axis perpendicular to the plane.
center <3d-position> ([<number>, <number>, <number>]) [0, 0, 0] Center position of the plane.