Skip to main content

Polygon and vertex format

Describe a mesh as elements and properties.

The PLY module reads flexible vertex and face elements in ASCII or binary form, preserving common properties such as colors, normals, texture coordinates, and confidence values.

The element model

Read the header, then read the elements it describes.

PLY headers declare element counts and properties before the payload. This makes the format flexible enough for meshes and useful for point-cloud-style vertex data.

Header

Format, elements, property types, and counts

Vertices

Positions plus optional normals, color, or UVs

Faces

Variable-length index lists and face properties

Output

Mesh objects or Mesh Arrow tables

The @loaders.gl/pointclouds/ply module handles the Polygon file format, a file format for 3D graphical objects described as a collection of polygons that is sometimes used to store point clouds.

Detailed guide

PLY module reference

The sections below cover installation, loader and writer entry points, and the parser attribution.

Installation​

npm install @loaders.gl/core @loaders.gl/pointclouds

Loaders and Writers​

Loader or WriterDescription
PLYLoaderLoads PLY meshes as Mesh objects or Mesh Arrow tables.
PLYWriterWrites Mesh or Mesh Arrow table data as ASCII PLY text.

Attribution​

PLYLoader is a fork of the THREE.js PLYLoader under MIT License. The THREE.js source files contained the following attributions:

@author Wei Meng / http://about.me/menway

Sources and credits​

See the package source and license inventory and the project-wide Attributions and Credits.