ObjFormat
Overview
ObjFormat is the built-in format handler for Wavefront OBJ (.obj) 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 .obj file, it delegates all I/O work to this class internally. The class also provides access to default ObjFormatLoadOptions and ObjFormatSaveOptions instances that control parsing and serialisation behaviour for every read and write operation.
Description
ObjFormat is a class in the Aspose.3D FOSS library for TypeScript that exposes 3 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 objformat functionality directly into TypeScript applications.
The class also provides the extension property (returns the primary file extension for obj format (e.g., “.obj”)), the extensions property (returns an array of supported file extensions for obj format), the contentType property (returns the mime type associated with obj files).
Instances are created through a single constructor that initializes the object with default values.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
extension | string | Read | Returns the primary file extension for OBJ format (e.g., “.obj”) |
extensions | string[] | Read | Returns an array of supported file extensions for OBJ format |
contentType | string | Read | Returns the MIME type associated with OBJ files |
fileFormatType | any | Read | Returns the enumeration value identifying the OBJ file format |
version | string | Read | Returns the version string of the OBJ format implementation |
canExport | boolean | Read | Indicates whether OBJ format supports exporting |
canImport | boolean | Read | Indicates whether OBJ format supports importing |
formats | any[] | Read | Returns a collection of format descriptors related to OBJ handling |
Methods
| Signature | Description |
|---|---|
constructor() | |
getInstance() → ObjFormat | Returns a singleton ObjFormat instance |
createLoadOptions() → ObjLoadOptions | Creates a default ObjLoadOptions object for importing OBJ files |
createSaveOptions() → ObjSaveOptions | Creates a default ObjSaveOptions object for exporting OBJ files |