Skip to content
Shapemetry

@huukhanhnguyen/geometry / wireMaterial

wireMaterial

materialFromWire()

materialFromWire<T>(row): T

Wire row → TS row: the material moves OUT of attributes onto the field. An attributes bag left holding nothing else is dropped, so a row that only ever named a material comes back with no claims — what it had before it crossed.

Type Parameters

T

T extends { attributes?: Record<string, unknown> | null; material?: string; }

Parameters

row

T

Returns

T


materialToWire()

materialToWire<T>(row): T

TS row → wire row: the material moves INTO attributes, where the crates read it. A row naming none rides through by reference.

Type Parameters

T

T extends { attributes?: Record<string, unknown> | null; material?: string; }

Parameters

row

T

Returns

T

Last updated: 📖 1 min readEdit on GitHub