Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BufferData

Hierarchy

  • BufferData

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

asset

asset: GltfAsset

baseUri

baseUri: string

Private bufferCache

bufferCache: Array<Uint8Array> = []

loader

loader: FileLoader

manager

Methods

get

  • get(index: GlTfId): Promise<Uint8Array>
  • Get the buffer data. Triggers a network request if this buffer resides in an external .bin file and is accessed for the first time (cached afterwards). when it's accessed for the first time and preFetchAll has not been used. To avoid any delays, use preFetchAll to pre-fetch everything. NOTE: To avoid any unnessary copies, the data is returned as a Uint8Array instead of an ArrayBuffer.

    Parameters

    Returns Promise<Uint8Array>

preFetchAll

  • preFetchAll(): Promise<void[]>