Documentation / @sw-file-lib/core / parseMeshOrPhys
Function: parseMeshOrPhys()
ts
function parseMeshOrPhys(input: BinaryReaderInput):
| MeshData
| PhysData;Defined in: mesh/index.ts:117
Parses either a Stormworks mesh or physics mesh.
The file type is detected automatically from the binary header.
Parameters
| Parameter | Type | Description |
|---|---|---|
input | BinaryReaderInput | Binary data to parse. |
Returns
The parsed mesh or physics mesh.
Throws
If the file signature is neither "mesh" nor "phys".