PlatformIO

Abstract I/O service.

The most common use of the I/O service is to read/write a Document with a given path. Methods are also available for converting in-memory representations of raw glTF files, both binary (Uint8Array) and JSON (JSONDocument).

For platform-specific implementations, see NodeIO, WebIO, and DenoIO.

Properties

Methods

  • binaryToJSON(glb: Uint8Array): Promise<JSONDocument>
  • read(uri: string): Promise<Document>
  • readAsJSON(uri: string): Promise<JSONDocument>
  • readBinary(glb: Uint8Array): Promise<Document>
  • registerDependencies(dependencies: { [key: string]: unknown }): PlatformIO
  • registerExtensions(extensions: (typeof Extension)[]): PlatformIO
  • writeBinary(doc: Document): Promise<Uint8Array>
  • writeJSON(doc: Document, _options?: PublicWriterOptions): Promise<JSONDocument>
Function symbol, where the argument and output are a box labeled 'glTF'.

Made by Don McCurdy Documented with greendoc © 2023 MIT License