LoaderUtils - Verge3D User Manual - Soft8Soft
Description: Learn how to use LoaderUtils in your interactive 3D apps made with Verge3D

# LoaderUtils

An object with several loader utility functions.

## Functions

### # .decodeText(array : TypedArray) → String

array — a stream of bytes as a typed array.

The function takes a stream of bytes as input and returns a Unicode string representation.

### # .extractUrlBase(url : String) → String

url — the url to extract the base url from.

Extract the base from the URL. E.g. `https://example.com/mydata.csv` becomes `https://example.com/`.

### # .resolveURL(url : String, path : String) → String

- url — the absolute or relative url resolve.
- path — the base path for relative urls to be resolved against.

Resolves relative urls against the given path. Absolute paths, Data URLs, and Blob URLs will be returned as is. Invalid urls will return an empty string.

## Source

For more info on how to obtain the source code of this module see this page.