Chevron Down
Table of Contents
Chevron DownAPI Reference

Writer Object

To be compatible with @loaders.gl/core functions such as encode, writer objects need to conform to the following specification:

Common Fields

FieldTypeDefaultDescription
nameStringRequiredShort name of the loader ('OBJ', 'PLY' etc)
extensionStringRequiredThree letter (typically) extension used by files of this format
categoryStringOptionalIndicates the type/shape of data

Encoder Function

FieldTypeDefaultDescription
encodeSyncFunctionnullEncodes synchronously
encodeFunctionnullEncodes asynchronously
encodeInBatches (Experimental)FunctionnullEncodes and releases batches through an async iterator

Note: The format of the input data to the encoders depends on the loader. Several loader categories are defined to provided standardized data formats for similar loaders.