Skip to content

Documentation / @sw-file-lib/core / serializePhys

Function: serializePhys() ​

ts
function serializePhys(data: Readonly<PhysData>): Uint8Array<ArrayBuffer>;

Defined in: mesh/index.ts:183

Serializes a physics collision mesh into Stormworks physics format.

Parameters ​

ParameterTypeDescription
dataReadonly<PhysData>Physics mesh to serialize.

Returns ​

Uint8Array<ArrayBuffer>

The serialized binary physics mesh.