GltfFormat
Overview
GltfFormat is the built-in format handler for glTF (.gltf/.glb) files in Aspose.3D for TypeScript. It inherits from FileFormat and exposes factory methods that create the detector, importer, and exporter for this format. When a Scene loads or saves a .gltf file, it delegates all I/O work to this class internally. The class also provides access to default GltfFormatLoadOptions and GltfFormatSaveOptions instances that control parsing and serialisation behaviour for every read and write operation.
Description
GltfFormat is a class in the Aspose.3D FOSS library for TypeScript that exposes 8 methods and 8 properties for programmatic use. It extends FileFormat, inheriting shared functionality from its parent type.
Core capabilities include: string; string[]; string. These operations enable developers to integrate gltfformat functionality directly into TypeScript applications.
The class also provides the extension property (property holds the primary gltf file extension string), the extensions property (returns an array of all supported gltf file extensions), the contentType property (property contains the mime type for gltf files).
Instances are created through a single constructor that initializes the object with default values.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
extension | string | Read | Property holds the primary GLTF file extension string |
extensions | string[] | Read | Returns an array of all supported GLTF file extensions |
contentType | string | Read | Property contains the MIME type for GLTF files |
fileFormatType | any | Read | Property indicates the internal format identifier for GLTF |
version | string | Read | Property stores the GLTF version string supported by this format |
canExport | boolean | Read | Property indicates whether GLTF export is supported |
canImport | boolean | Read | Property indicates whether GLTF import is supported |
formats | any[] | Read | Property lists format descriptors associated with GLTF handling |
Methods
| Signature | Description |
|---|---|
canImport() → boolean | Property indicates whether GLTF import is supported |
canExport() → boolean | Property indicates whether GLTF export is supported |
extension() → string | Property holds the primary GLTF file extension string |
extensions() → string[] | Returns an array of all supported GLTF file extensions |
version() → string | Property stores the GLTF version string supported by this format |
constructor() | |
getInstance() → GltfFormat | |
createLoadOptions() → GltfLoadOptions | Creates a GltfLoadOptions instance for importing GLTF files |
createSaveOptions() → GltfSaveOptions | Creates a GltfSaveOptions instance for exporting GLTF files |