Skip to content

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 ​

ParameterTypeDescription
inputBinaryReaderInputBinary data to parse.

Returns ​

| MeshData | PhysData

The parsed mesh or physics mesh.

Throws ​

If the file signature is neither "mesh" nor "phys".