Options
All
  • Public
  • Public/Protected
  • All
Menu

Class glTFAsset

glTF assets are JSON files plus supporting external data.

Hierarchy

  • glTFAsset

Index

Constructors

constructor

  • Creates a new glTF asset using the specified JSON descriptor. The resources (buffers and images) will not be loaded automatically.

    Parameters

    • descriptor: any

      The JSON descriptor to create the asset from.

    Returns glTFAsset

Properties

Private _buffers

_buffers: ArrayBuffer[] = []

Private _descriptor

_descriptor: any

Private _images

_images: Texture[] = []

Accessors

buffers

  • get buffers(): ArrayBuffer[]

descriptor

  • get descriptor(): any

images

  • get images(): Texture[]

Methods

Static getEmbeddedBuffer

  • getEmbeddedBuffer(value: string): ArrayBuffer | SharedArrayBuffer

Static isEmbeddedResource

  • isEmbeddedResource(uri: string): boolean

Static load

  • load(descriptor: any, loader?: glTFAssetResourceLoader): glTFAsset
  • Loads a new glTF asset (including resources) using the specified JSON descriptor.

    Parameters

    • descriptor: any

      The JSON descriptor to create the asset from.

    • Optional loader: glTFAssetResourceLoader

      The resource loader to use for external resources. The loader can be empty when all resources in the descriptor is embedded.

    Returns glTFAsset

Generated using TypeDoc