# bakeTransform

Function

Source: https://github.com/playcanvas/splat-transform/blob/b6424a5b3b929695fbaafe738a995adb1240d675/src/lib/ops/bake-transform.ts#L31

```ts
bakeTransform(src: ChunkSource, targetSpace: Transform): ChunkSource
```

Bake a source's pending coordinate-space transform into a target space,
lazily and per chunk — the streaming analog of `convertToSpace`.

Computes `delta = targetSpace⁻¹ · meta.transform` once; each `read` delegates
to the parent (filling the caller's buffers with raw data) and then applies
`delta` in place to whichever layers were requested, exactly as
`transformColumns` does for a `DataTable`:
 - `position`  — full TRS via `transformPoint`
 - `geometric` — compose the rotation onto the quaternion; add `log(scale)` to the log-scales
 - `color`     — rotate the SH rest coefficients (DC is unaffected)
 - `other`     — untouched (user data, not coordinate-dependent)

The returned source reports `meta.transform = targetSpace` (its data is now
baked). Consumers (writers, GPU feeds) wrap their input with this once and
never reimplement transform handling.

**Parameters**

- `src` ([`ChunkSource`](https://api.playcanvas.com/splat-transform/interfaces/ChunkSource.md)): The parent source.
- `targetSpace` ([`Transform`](https://api.playcanvas.com/splat-transform/classes/Transform.md)): The coordinate space to bake into (e.g. `Transform.PLY`).

**Returns** [`ChunkSource`](https://api.playcanvas.com/splat-transform/interfaces/ChunkSource.md): A derived source whose reads yield data in `targetSpace`.
