Use this if a file is a external file URL. The file can be any arbitrary binary data like a videofile or a text asset

Constructors

Properties

Methods

Constructors

Properties

url: string

The resolved url to the file

Methods

  • Load the file binary data

    Returns Promise<Blob>

    a promise that resolves to the binary data of the file. Make sure to await this request or use .then(res => {...}) to get the result.

  • Load the file as text (if the referenced file is a text file like a .txt or .json file)

    Returns Promise<string>

    a promise that resolves to the text data of the file. Make sure to await this request or use .then(res => {...}) to get the result. If the format is json you can use JSON.parse(result) to convert it to a json object

Generated using TypeDoc