Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ImageData

Hierarchy

  • ImageData

Index

Constructors

constructor

Properties

asset

asset: GltfAsset

baseUri

baseUri: string

crossOrigin

crossOrigin: string = "anonymous"

crossorigin value for file and image requests

Private imageCache

imageCache: Array<HTMLImageElement> = []

manager

Methods

get

  • get(index: GlTfId): Promise<HTMLImageElement>
  • Get the image data. Triggers a network request if image is in an external file and is accessed for the first time (cached afterwards). To avoid any delays, use preFetchAll to pre-fetch everything.

    Parameters

    Returns Promise<HTMLImageElement>

preFetchAll

  • preFetchAll(): Promise<void[]>