# concatSource

Function

Source: https://github.com/playcanvas/splat-transform/blob/b6424a5b3b929695fbaafe738a995adb1240d675/src/lib/ops/concat-source.ts#L34

```ts
concatSource(allSources: ChunkSource[], pool: ChunkDataPool): ChunkSource
```

Concatenate several sources end-to-end into one, as a lazy view.

Output gaussians are the inputs' gaussians in order: all of `sources[0]`, then
all of `sources[1]`, and so on. Every source must agree on layout (chunk size,
SH bands, available layers, extra columns) and on the pending coordinate-space
**transform** — concatenating data in mismatched spaces is silently wrong, so
a transform mismatch throws (the caller must bake to a common space first).

Single-LOD only. Reads stitch contiguous row ranges: an output chunk is filled
by block-copying the overlapping span out of each contributing source chunk
(order is preserved, so each overlap is a contiguous byte range — one
`set()` per layer, not a per-row gather). Source chunks are read on demand;
peak extra memory is one source chunk-set of temporaries.

**Parameters**

- `allSources` ([`ChunkSource`](https://api.playcanvas.com/splat-transform/interfaces/ChunkSource.md)`[]`): The sources to concatenate (at least one; empty sources contribute no rows but are still closed by `close()`).
- `pool` ([`ChunkDataPool`](https://api.playcanvas.com/splat-transform/interfaces/ChunkDataPool.md)): Pool for the temporary source read buffers; `chunkSize` must match the sources'.

**Returns** [`ChunkSource`](https://api.playcanvas.com/splat-transform/interfaces/ChunkSource.md): A derived source serving the concatenated gaussians chunk-by-chunk.
