TextureCache

Available in: Interface Scripts Client Entity Scripts

API to manage texture cache resources.
Methods

Signals

Properties:
Name Type Description
numTotal number Total number of total resources. Read-only.
numCached number Total number of cached resource. Read-only.
sizeTotal number Size in bytes of all resources. Read-only.
sizeCached number Size in bytes of all cached resources. Read-only.

Methods

getResourceList() → {Array.<string>}
Get the list of all resource URLs.
Returns:
Type: Array.<string>
prefetch(url, extraopt) → {ResourceObject}
Prefetches a resource.
Parameters:
Name Type Attributes Default Description
url string URL of the resource to prefetch.
extra object <optional>
null
Returns:
Type: ResourceObject
prefetch(url, type, maxNumPixelsopt) → {ResourceObject}
Parameters:
Name Type Attributes Default Description
url string
type number
maxNumPixels number <optional>
67108864
Returns:
Type: ResourceObject
updateTotalSize(deltaSize)
Parameters:
Name Type Description
deltaSize number

Signals

dirty() → {Signal}
Returns:
Type: Signal
spectatorCameraFramebufferReset() → {Signal}
Returns:
Type: Signal