Skip to main content

Mesh format

A flexible interchange for polygon geometry.

PLY describes vertices, faces, and additional element properties in a simple header-driven file. loaders.gl turns supported data into common mesh or Mesh Arrow output and can write compatible ASCII files.

Polygon data path

Read the elements, keep the useful attributes.

PLY files can vary in element names, property layouts, and storage encoding. The loader handles the supported combinations and exposes geometry through the same mesh contract as other formats.

Header

Declare elements, properties, counts, and storage encoding.

Decode

Read vertices, faces, colors, normals, and supported attributes.

Output

Return Mesh objects or Mesh Arrow tables.

Write

Encode compatible mesh data as ASCII PLY text.

Detailed guide

PLY format and API details

The reference below covers header syntax, element/property handling, encodings, decoded attributes, and writer behavior.

Loaders and Writers​

CharacteristicValue
File FormatPLY
Data FormatMesh, Mesh Arrow table
File Extension.ply
MIME TypeNot standardized
File TypeBinary/Text
Loader Decoder TypeSynchronous
Loader Worker Thread✅ Yes
Loader Streaming❌ No
Writer File TypeText
Writer APIsencode, encodeSync, encodeTextSync

Supported Encodings​

PLY supports ASCII, binary little-endian, and binary big-endian encodings. PLYWriter currently writes ASCII PLY text.

Mesh Data​

PLY files describe mesh elements such as vertices and faces. PLYLoader maps common vertex properties to Mesh Arrow table columns by default. Set ply.shape: 'mesh' for the legacy Mesh object. Common attributes include POSITION, NORMAL, TEXCOORD_0, and COLOR_0.