BGE/Urls
Alias: BGE.Urls
Static Methods
isUrl(path: dynamic): boolean
static
Whether a path is an http:// or https:// URL rather than a local file.
Parameters
path(dynamic)
Returns
boolean
stripQuery(url: string): string
static
A URL without its query string or fragment.
Parameters
url(string)
Returns
string
fileExtension(url: string): string
static
The lowercase file extension of a URL's path (e.g. ".png"), or "" if it has none.
Parameters
url(string)
Returns
string
resolveRelative(baseUrl: string, relativePath: string): string
static
Resolves a path found inside a downloaded file (e.g. an .obj's mtllib) against that file's URL. "./" and "../" are resolved, and a "//host/path" URL takes the base URL's scheme.
Parameters
baseUrl(string) — the URL of the file the path came fromrelativePath(string) — a relative path, a root-relative path ("/a/b.png") or a full URL
Returns
string— the full URL
normalizePath(urlPath: string): string
static
Collapses "." and ".." segments in a URL path that starts with "/", never going above the root.
Parameters
urlPath(string)
Returns
string