Assembly Along the Spline
import { Steps } from ‘@astrojs/starlight/components’;
Assembly along the spline is an optional effect where a multi-part mesh starts as scattered, exploded pieces and assembles itself as it travels the path. It’s entirely opt-in. With assembly off, the deformation is bit-for-bit the normal flow.
Setting it up has two halves: baking pieces (splitting the mesh) on the Pieces tab, then tuning the assembly on the Behavior tab.
1. Bake the pieces
Section titled “1. Bake the pieces”The Pieces tab splits one mesh into rigid chunks. Open it from the tab strip, or from a Bake Pieces… button (on the component’s hero card or the Behavior tab’s Assembly section).
-
Pick a split mode for how the mesh breaks into pieces:
Split mode How it splits Connected Faces Into separate connected shells (the natural choice for a mesh of distinct parts). Materials One piece per material slot. Lattice A grid shatter, the always-works fallback that chops any mesh into chunks. Vertex Dissolve A finer per-vertex break-up. -
The Pieces tab takes over the viewport preview. Use the in-tab Play / Stop toggle to check the split:
- Stopped → Segmentation: each piece is tinted a distinct color so you can confirm the mesh actually split. A welded mesh that collapses to a single piece is flagged here; switch split modes if you see that.
- Playing → Assemble: the looping explode → settle, driven by the Assembly controls.
-
Click Commit to write a durable pieces mesh and bind it to the actor.
2. Tune the assembly
Section titled “2. Tune the assembly”Once pieces are committed, the Behavior tab’s Assembly section swaps from the Bake Pieces… button to the real controls:
| Control | What it does |
|---|---|
| Enable Assembly | Turns the effect on. Off = pure flow deformation. |
| Assemble Curve | The eased global sweep that resolves pieces over the journey. |
| Explode Radius | How far pieces scatter while unresolved. |
| Tumble Turns | How much each piece spins while exploded. |
| Assemble Window | The fraction of the journey a single piece takes to snap into place. |
| Assemble Lag | Staggers pieces in time by index (0 = a purely spatial assembly front). |
How it fits together
Section titled “How it fits together”- The Pieces tab owns the pieces asset: baking, previewing, and committing.
- The Behavior tab owns the assembly tuning.
- The settings panel’s Recreate action only rebuilds the material variants; it never touches your committed pieces.
Each Meshes & Materials card shows a Pieces baked ✓ / No piece bake indicator so you can see at a glance which meshes are assembly-ready.